]> code.delx.au - gnu-emacs/commitdiff
Drop unnecessary functions that deals with frame pixel size.
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 31 Jul 2013 12:50:59 +0000 (16:50 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Wed, 31 Jul 2013 12:50:59 +0000 (16:50 +0400)
* frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
(x_pixel_height): Drop prototypes.
* msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
(x_pixel_height): Drop implementations.
* frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
which should be always valid for window frame.
(Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
* w32menu.c (Fx_popup_dialog):
* xmenu.c (Fx_popup_dialog): Likewise for both.

12 files changed:
src/ChangeLog
src/frame.c
src/frame.h
src/msdos.c
src/msdos.h
src/nsfns.m
src/w32fns.c
src/w32menu.c
src/w32term.h
src/xfns.c
src/xmenu.c
src/xterm.h

index 1c4880e3356f4af273cbf40f0699f76e435e39fc..76ef664ccd0ba8509cf7a67eb13b4116d8822675 100644 (file)
@@ -1,3 +1,16 @@
+2013-07-31  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Drop unnecessary functions that deals with frame pixel size.
+       * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
+       (x_pixel_height): Drop prototypes.
+       * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
+       (x_pixel_height): Drop implementations.
+       * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
+       which should be always valid for window frame.
+       (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
+       * w32menu.c (Fx_popup_dialog):
+       * xmenu.c (Fx_popup_dialog): Likewise for both.
+
 2013-07-31  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
index 271d99904c35dc59d501d17931532fea17156f41..6e56a20f85039c799c014ae37b9a5a0d9bd57a6d 100644 (file)
@@ -2361,7 +2361,7 @@ to `frame-height'). */)
 
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (f))
-    return make_number (x_pixel_height (f));
+    return make_number (FRAME_PIXEL_HEIGHT (f));
   else
 #endif
     return make_number (FRAME_LINES (f));
@@ -2378,7 +2378,7 @@ If FRAME is omitted or nil, the selected frame is used.  */)
 
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (f))
-    return make_number (x_pixel_width (f));
+    return make_number (FRAME_PIXEL_WIDTH (f));
   else
 #endif
     return make_number (FRAME_COLS (f));
index 2e54477009486e012b5d8159d3aa79915dfac37d..98cf54c13a49fdd79b6ee81f28c7cd06edc3f825 100644 (file)
@@ -1264,8 +1264,6 @@ extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
 extern void x_make_frame_visible (struct frame *f);
 extern void x_make_frame_invisible (struct frame *f);
 extern void x_iconify_frame (struct frame *f);
-extern int x_pixel_width (struct frame *f);
-extern int x_pixel_height (struct frame *f);
 extern void x_set_frame_alpha (struct frame *f);
 extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_tool_bar_lines (struct frame *f,
index a2bcc06ac1702ece852b5944fa2f60ae9a23c5f5..16308d06c85e9f1ba2c031573f3d2cdf5938aa86 100644 (file)
@@ -3320,18 +3320,6 @@ XMenuDestroy (Display *foo, XMenu *menu)
   xfree (menu);
   menu_help_message = prev_menu_help_message = NULL;
 }
-
-int
-x_pixel_width (struct frame *f)
-{
-  return FRAME_COLS (f);
-}
-
-int
-x_pixel_height (struct frame *f)
-{
-  return FRAME_LINES (f);
-}
 #endif /* !HAVE_X_WINDOWS */
 \f
 /* ----------------------- DOS / UNIX conversion --------------------- */
index ee0d49464ae22bcff3de5ba9b69d050f62dc25ac..6a6fe3491312c0bb529c12860f72e4b94ec33aad 100644 (file)
@@ -74,8 +74,6 @@ struct window;
 /* Defined in xfns.c; emulated on msdos.c */
 
 extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-extern int x_pixel_width (struct frame *);
-extern int x_pixel_height (struct frame *);
 
 #define XFreeGC (void)
 #define x_destroy_bitmap(p1,p2)
index 71f971a9f5b4cdb38bb831b7f78c05b2f96a2c69..3a4d95360c486528e5935f47113ecafe5d490005 100644 (file)
@@ -2231,21 +2231,6 @@ x_get_focus_frame (struct frame *frame)
   return nsfocus;
 }
 
-
-int
-x_pixel_width (struct frame *f)
-{
-  return FRAME_PIXEL_WIDTH (f);
-}
-
-
-int
-x_pixel_height (struct frame *f)
-{
-  return FRAME_PIXEL_HEIGHT (f);
-}
-
-
 void
 x_sync (struct frame *f)
 {
index 2b06936d119f03e4f43175fc5114ab9a35dad8eb..e46608f9d722bf754cae5c3f6179f43c657727b6 100644 (file)
@@ -5139,19 +5139,6 @@ SOUND is nil to use the normal beep.  */)
   return sound;
 }
 
-\f
-int
-x_pixel_width (register struct frame *f)
-{
-  return FRAME_PIXEL_WIDTH (f);
-}
-
-int
-x_pixel_height (register struct frame *f)
-{
-  return FRAME_PIXEL_HEIGHT (f);
-}
-
 int
 x_screen_planes (register struct frame *f)
 {
index 346402b7c6bbcb8d3d30a322dc78b1deba55a1e7..aa13f26383fa4c2c3cb40b354db724e3378d2b3a 100644 (file)
@@ -206,8 +206,8 @@ otherwise it is "Question". */)
           in the middle of frame F.  */
        Lisp_Object x, y, frame, newpos;
        XSETFRAME (frame, f);
-       XSETINT (x, x_pixel_width (f) / 2);
-       XSETINT (y, x_pixel_height (f) / 2);
+       XSETINT (x, FRAME_PIXEL_WIDTH (f) / 2);
+       XSETINT (y, FRAME_PIXEL_HEIGHT (f) / 2);
        newpos = Fcons (Fcons (x, Fcons (y, Qnil)), Fcons (frame, Qnil));
        return Fx_popup_menu (newpos,
                              Fcons (Fcar (contents), Fcons (contents, Qnil)));
index ace58758302c85afe888b1d64fd29d238759af67..032047a2751403d3562766cbcefc1d6c00351db7 100644 (file)
@@ -218,8 +218,6 @@ extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
 extern void x_make_frame_visible (struct frame *f);
 extern void x_make_frame_invisible (struct frame *f);
 extern void x_iconify_frame (struct frame *f);
-extern int x_pixel_width (struct frame *f);
-extern int x_pixel_height (struct frame *f);
 extern void x_set_frame_alpha (struct frame *f);
 extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_tool_bar_lines (struct frame *f,
index a4492a10fdbc53178cb1a18b736554c73e488b63..e86f71fb711623fe8e08059fa682029fac5d80e1 100644 (file)
@@ -4325,19 +4325,6 @@ Internal use only, use `display-monitor-attributes-list' instead.  */)
   return attributes_list;
 }
 
-\f
-int
-x_pixel_width (register struct frame *f)
-{
-  return FRAME_PIXEL_WIDTH (f);
-}
-
-int
-x_pixel_height (register struct frame *f)
-{
-  return FRAME_PIXEL_HEIGHT (f);
-}
-
 /************************************************************************
                              X Displays
  ************************************************************************/
index 5cc37842da92389e38c0bcdacc2c53636f466d9c..1292e264ffbe434cbcbe071beec95a8f801df9df 100644 (file)
@@ -294,8 +294,8 @@ for instance using the window manager, then this produces a quit and
   {
     Lisp_Object x, y, frame, newpos;
     XSETFRAME (frame, f);
-    XSETINT (x, x_pixel_width (f) / 2);
-    XSETINT (y, x_pixel_height (f) / 2);
+    XSETINT (x, FRAME_PIXEL_WIDTH (f) / 2);
+    XSETINT (y, FRAME_PIXEL_HEIGHT (f) / 2);
     newpos = list2 (list2 (x, y), frame);
 
     return Fx_popup_menu (newpos,
index 6bdc708220b23184e32193651fd00de8e4e6db07..311b32c7930d817fa201139575051af26a36841b 100644 (file)
@@ -1031,8 +1031,6 @@ extern void destroy_frame_xic (struct frame *);
 extern void xic_set_preeditarea (struct window *, int, int);
 extern void xic_set_statusarea (struct frame *);
 extern void xic_set_xfontset (struct frame *, const char *);
-extern int x_pixel_width (struct frame *);
-extern int x_pixel_height (struct frame *);
 extern bool x_defined_color (struct frame *, const char *, XColor *, bool);
 #ifdef HAVE_X_I18N
 extern void free_frame_xic (struct frame *);