summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-13 19:03:51 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-13 19:03:51 +0400
commitaad3612f9eb7280bd4db8ee697186e75b1e82765 (patch)
treefd251b7978e9a570a6b66c93a43b0021bac0c7b7 /src/frame.h
parent7830899f39515bcb4938715ebf58d1ba855deb41 (diff)
Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
All of them are replaced with FRAME_DISPLAY_INFO, defined in each port to reference the port-specific window system data. * msdos.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * xterm.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify. * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m: * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c: * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c: * xselect.c, xterm.c: All related users changed.
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h52
1 files changed, 20 insertions, 32 deletions
diff --git a/src/frame.h b/src/frame.h
index 3aea0cfa27..4184ce24a1 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -600,36 +600,6 @@ default_pixels_per_inch_y (void)
#define FRAME_NS_P(f) ((f)->output_method == output_ns)
#endif
-/* Dots per inch of the screen the frame F is on. */
-
-#ifdef HAVE_X_WINDOWS
-#define FRAME_RES_X(f) \
- (eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resx)
-#define FRAME_RES_Y(f) \
- (eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resy)
-#endif
-
-#ifdef HAVE_NTGUI
-#define FRAME_RES_X(f) \
- (eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resx)
-#define FRAME_RES_Y(f) \
- (eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resy)
-#endif
-
-#ifdef HAVE_NS
-#define FRAME_RES_X(f) \
- (eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resx)
-#define FRAME_RES_Y(f) \
- (eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resy)
-#endif
-
-/* Defaults when no window system available. */
-
-#ifndef FRAME_RES_X
-#define FRAME_RES_X(f) default_pixels_per_inch_x ()
-#define FRAME_RES_Y(f) default_pixels_per_inch_y ()
-#endif
-
/* FRAME_WINDOW_P tests whether the frame is a window, and is
defined to be the predicate for the window system being used. */
@@ -646,14 +616,32 @@ default_pixels_per_inch_y (void)
#define FRAME_WINDOW_P(f) ((void) (f), 0)
#endif
+/* Dots per inch of the screen the frame F is on. */
+
+#ifdef HAVE_WINDOW_SYSTEM
+
+#define FRAME_RES_X(f) \
+ (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resx)
+#define FRAME_RES_Y(f) \
+ (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
+
+#else /* !HAVE_WINDOW_SYSTEM */
+
+/* Defaults when no window system available. */
+
+#define FRAME_RES_X(f) default_pixels_per_inch_x ()
+#define FRAME_RES_Y(f) default_pixels_per_inch_y ()
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Return a pointer to the structure holding information about the
region of text, if any, that is currently shown in mouse-face on
frame F. We need to define two versions because a TTY-only build
- does not have FRAME_X_DISPLAY_INFO. */
+ does not have FRAME_DISPLAY_INFO. */
#ifdef HAVE_WINDOW_SYSTEM
# define MOUSE_HL_INFO(F) \
(FRAME_WINDOW_P(F) \
- ? &FRAME_X_DISPLAY_INFO(F)->mouse_highlight \
+ ? &FRAME_DISPLAY_INFO(F)->mouse_highlight \
: &(F)->output_data.tty->display_info->mouse_highlight)
#else
# define MOUSE_HL_INFO(F) \