aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-23 05:28:56 +0000
committerRichard M. Stallman1994-09-23 05:28:56 +0000
commitb242af8897aadc312b2d44ef9df6c253abac2bf0 (patch)
tree51c14bccc25bb74fe384d5a9e442c993c8aa0208
parent449c2cd8e572f6fefa30a6526b89cc80649328ac (diff)
downloademacs-b242af8897aadc312b2d44ef9df6c253abac2bf0.tar.gz
emacs-b242af8897aadc312b2d44ef9df6c253abac2bf0.zip
(FRAME_X_DISPLAY): New macro.
(struct x_screen): New structure. (struct x_display): New field x_screen. (FRAME_X_SCREEN): New macro.
-rw-r--r--src/xterm.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 74d807a692d..d6c4085448d 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -248,11 +248,28 @@ extern Lisp_Object Vx_screen_visual;
248extern unsigned int x_mouse_grabbed; 248extern unsigned int x_mouse_grabbed;
249 249
250#endif /* HAVE_X11 */ 250#endif /* HAVE_X11 */
251 251
252enum text_cursor_kinds { 252enum text_cursor_kinds {
253 filled_box_cursor, hollow_box_cursor, bar_cursor 253 filled_box_cursor, hollow_box_cursor, bar_cursor
254}; 254};
255
256/* For each X display, we have a structure that records
257 information about it. */
255 258
259struct x_screen
260{
261 /* Chain of all x_display structures. */
262 struct x_display *next;
263 /* This says how to access this display in Xlib. */
264 Display *x_display_value;
265 /* This records previous values returned by x-list-fonts. */
266 Lisp_Object font_list_cache;
267 /* The name of this display. */
268 Lisp_Object name;
269 /* Number of frames that are on this display. */
270 int reference_count;
271};
272
256/* Each X frame object points to its own struct x_display object 273/* Each X frame object points to its own struct x_display object
257 in the display.x field. The x_display structure contains all 274 in the display.x field. The x_display structure contains all
258 the information that is specific to X windows. */ 275 the information that is specific to X windows. */
@@ -389,6 +406,9 @@ struct x_display
389 406
390 /* The geometry flags for this window. */ 407 /* The geometry flags for this window. */
391 int size_hint_flags; 408 int size_hint_flags;
409
410 /* This is the Emacs structure for the X display this frame is on. */
411 struct x_screen *x_screen;
392}; 412};
393 413
394/* Get at the computed faces of an X window frame. */ 414/* Get at the computed faces of an X window frame. */
@@ -406,6 +426,11 @@ struct x_display
406/* Return the window associated with the frame F. */ 426/* Return the window associated with the frame F. */
407#define FRAME_X_WINDOW(f) ((f)->display.x->window_desc) 427#define FRAME_X_WINDOW(f) ((f)->display.x->window_desc)
408 428
429#define FRAME_X_SCREEN(f) ((f)->display.x->x_screen)
430
431/* This is the `Display *' which frame F is on. */
432#define FRAME_X_DISPLAY(f) ((f)->display.x->x_screen->x_display_value)
433
409/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */ 434/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
410#define PIXEL_WIDTH(f) ((f)->display.x->pixel_width) 435#define PIXEL_WIDTH(f) ((f)->display.x->pixel_width)
411#define PIXEL_HEIGHT(f) ((f)->display.x->pixel_height) 436#define PIXEL_HEIGHT(f) ((f)->display.x->pixel_height)