+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
#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));
#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));
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,
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 --------------------- */
/* 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)
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)
{
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)
{
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)));
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,
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
************************************************************************/
{
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,
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 *);