comparison src/xterm.h @ 9013:0ab80494b155

(FRAME_X_DISPLAY): New macro. (struct x_screen): New structure. (struct x_display): New field x_screen. (FRAME_X_SCREEN): New macro.
author Richard M. Stallman <rms@gnu.org>
date Fri, 23 Sep 1994 05:28:56 +0000
parents a6254c24d670
children 632d43f8cde2
comparison
equal deleted inserted replaced
9012:3c3786c4c56f 9013:0ab80494b155
246 246
247 /* Mask of which mouse buttons are currently held down. */ 247 /* Mask of which mouse buttons are currently held down. */
248 extern unsigned int x_mouse_grabbed; 248 extern unsigned int x_mouse_grabbed;
249 249
250 #endif /* HAVE_X11 */ 250 #endif /* HAVE_X11 */
251 251
252 enum text_cursor_kinds { 252 enum text_cursor_kinds {
253 filled_box_cursor, hollow_box_cursor, bar_cursor 253 filled_box_cursor, hollow_box_cursor, bar_cursor
254 }; 254 };
255 255
256 /* For each X display, we have a structure that records
257 information about it. */
258
259 struct 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. */
259 276
260 struct x_display 277 struct x_display
387 /* This is the gravity value for the specified window position. */ 404 /* This is the gravity value for the specified window position. */
388 int win_gravity; 405 int win_gravity;
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. */
395 #define FRAME_PARAM_FACES(f) ((f)->display.x->param_faces) 415 #define FRAME_PARAM_FACES(f) ((f)->display.x->param_faces)
396 #define FRAME_N_PARAM_FACES(f) ((f)->display.x->n_param_faces) 416 #define FRAME_N_PARAM_FACES(f) ((f)->display.x->n_param_faces)
403 #define FRAME_DEFAULT_FACE(f) ((f)->display.x->computed_faces[0]) 423 #define FRAME_DEFAULT_FACE(f) ((f)->display.x->computed_faces[0])
404 #define FRAME_MODE_LINE_FACE(f) ((f)->display.x->computed_faces[1]) 424 #define FRAME_MODE_LINE_FACE(f) ((f)->display.x->computed_faces[1])
405 425
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)
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)
408 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)
412 437