Commit f435830e authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

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.
parent 2412ee1a
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> 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
* frame.c (Fmake_terminal_frame): Use store_in_alist to setup * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
......
...@@ -2361,7 +2361,7 @@ to `frame-height'). */) ...@@ -2361,7 +2361,7 @@ to `frame-height'). */)
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)) if (FRAME_WINDOW_P (f))
return make_number (x_pixel_height (f)); return make_number (FRAME_PIXEL_HEIGHT (f));
else else
#endif #endif
return make_number (FRAME_LINES (f)); return make_number (FRAME_LINES (f));
...@@ -2378,7 +2378,7 @@ If FRAME is omitted or nil, the selected frame is used. */) ...@@ -2378,7 +2378,7 @@ If FRAME is omitted or nil, the selected frame is used. */)
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)) if (FRAME_WINDOW_P (f))
return make_number (x_pixel_width (f)); return make_number (FRAME_PIXEL_WIDTH (f));
else else
#endif #endif
return make_number (FRAME_COLS (f)); return make_number (FRAME_COLS (f));
......
...@@ -1264,8 +1264,6 @@ extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); ...@@ -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_visible (struct frame *f);
extern void x_make_frame_invisible (struct frame *f); extern void x_make_frame_invisible (struct frame *f);
extern void x_iconify_frame (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_frame_alpha (struct frame *f);
extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_tool_bar_lines (struct frame *f, extern void x_set_tool_bar_lines (struct frame *f,
......
...@@ -3320,18 +3320,6 @@ XMenuDestroy (Display *foo, XMenu *menu) ...@@ -3320,18 +3320,6 @@ XMenuDestroy (Display *foo, XMenu *menu)
xfree (menu); xfree (menu);
menu_help_message = prev_menu_help_message = NULL; 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 */ #endif /* !HAVE_X_WINDOWS */
/* ----------------------- DOS / UNIX conversion --------------------- */ /* ----------------------- DOS / UNIX conversion --------------------- */
......
...@@ -74,8 +74,6 @@ struct window; ...@@ -74,8 +74,6 @@ struct window;
/* Defined in xfns.c; emulated on msdos.c */ /* Defined in xfns.c; emulated on msdos.c */
extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); 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 XFreeGC (void)
#define x_destroy_bitmap(p1,p2) #define x_destroy_bitmap(p1,p2)
......
...@@ -2231,21 +2231,6 @@ and GNUstep implementations ("distributor-specific release ...@@ -2231,21 +2231,6 @@ and GNUstep implementations ("distributor-specific release
return nsfocus; 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 void
x_sync (struct frame *f) x_sync (struct frame *f)
{ {
......
...@@ -5139,19 +5139,6 @@ SOUND is nil to use the normal beep. */) ...@@ -5139,19 +5139,6 @@ SOUND is nil to use the normal beep. */)
return sound; return sound;
} }
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 int
x_screen_planes (register struct frame *f) x_screen_planes (register struct frame *f)
{ {
......
...@@ -206,8 +206,8 @@ otherwise it is "Question". */) ...@@ -206,8 +206,8 @@ otherwise it is "Question". */)
in the middle of frame F. */ in the middle of frame F. */
Lisp_Object x, y, frame, newpos; Lisp_Object x, y, frame, newpos;
XSETFRAME (frame, f); XSETFRAME (frame, f);
XSETINT (x, x_pixel_width (f) / 2); XSETINT (x, FRAME_PIXEL_WIDTH (f) / 2);
XSETINT (y, x_pixel_height (f) / 2); XSETINT (y, FRAME_PIXEL_HEIGHT (f) / 2);
newpos = Fcons (Fcons (x, Fcons (y, Qnil)), Fcons (frame, Qnil)); newpos = Fcons (Fcons (x, Fcons (y, Qnil)), Fcons (frame, Qnil));
return Fx_popup_menu (newpos, return Fx_popup_menu (newpos,
Fcons (Fcar (contents), Fcons (contents, Qnil))); Fcons (Fcar (contents), Fcons (contents, Qnil)));
......
...@@ -218,8 +218,6 @@ extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); ...@@ -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_visible (struct frame *f);
extern void x_make_frame_invisible (struct frame *f); extern void x_make_frame_invisible (struct frame *f);
extern void x_iconify_frame (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_frame_alpha (struct frame *f);
extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_tool_bar_lines (struct frame *f, extern void x_set_tool_bar_lines (struct frame *f,
......
...@@ -4325,19 +4325,6 @@ Internal use only, use `display-monitor-attributes-list' instead. */) ...@@ -4325,19 +4325,6 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
return attributes_list; return attributes_list;
} }
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 X Displays
************************************************************************/ ************************************************************************/
......
...@@ -294,8 +294,8 @@ for instance using the window manager, then this produces a quit and ...@@ -294,8 +294,8 @@ for instance using the window manager, then this produces a quit and
{ {
Lisp_Object x, y, frame, newpos; Lisp_Object x, y, frame, newpos;
XSETFRAME (frame, f); XSETFRAME (frame, f);
XSETINT (x, x_pixel_width (f) / 2); XSETINT (x, FRAME_PIXEL_WIDTH (f) / 2);
XSETINT (y, x_pixel_height (f) / 2); XSETINT (y, FRAME_PIXEL_HEIGHT (f) / 2);
newpos = list2 (list2 (x, y), frame); newpos = list2 (list2 (x, y), frame);
return Fx_popup_menu (newpos, return Fx_popup_menu (newpos,
......
...@@ -1031,8 +1031,6 @@ extern void destroy_frame_xic (struct frame *); ...@@ -1031,8 +1031,6 @@ extern void destroy_frame_xic (struct frame *);
extern void xic_set_preeditarea (struct window *, int, int); extern void xic_set_preeditarea (struct window *, int, int);
extern void xic_set_statusarea (struct frame *); extern void xic_set_statusarea (struct frame *);
extern void xic_set_xfontset (struct frame *, const char *); 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); extern bool x_defined_color (struct frame *, const char *, XColor *, bool);
#ifdef HAVE_X_I18N #ifdef HAVE_X_I18N
extern void free_frame_xic (struct frame *); extern void free_frame_xic (struct frame *);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment