comparison src/xterm.h @ 17051:fd0b17a79b07

(struct font_info): This definition is moved to fontset.h. (struct x_display_info): New members Xatom_PIXEL_SIZE, Xatom_MULE_BASELINE_OFFSET, Xatom_RELATIVE_COMPOSE, and null_pixel. (x_list_fonts, x_get_font_info, x_load_font, x_query_font): Declare external. (struct x_output): New members font_baseline and fontset. (FRAME_FONTSET, FRAME_X_FONT_TABLE): New macros.
author Karl Heuer <kwzh@gnu.org>
date Thu, 20 Feb 1997 07:00:06 +0000
parents eed1157f0587
children b2a15ee1d181
comparison
equal deleted inserted replaced
17050:1e5fa2dc98cf 17051:fd0b17a79b07
120 120
121 extern Visual *select_visual (); 121 extern Visual *select_visual ();
122 122
123 enum text_cursor_kinds { 123 enum text_cursor_kinds {
124 filled_box_cursor, hollow_box_cursor, bar_cursor 124 filled_box_cursor, hollow_box_cursor, bar_cursor
125 };
126
127 /* This data type is used for the font_table field
128 of struct x_display_info. */
129
130 struct font_info
131 {
132 XFontStruct *font;
133 char *name;
134 char *full_name;
135 }; 125 };
136 126
137 /* Structure recording X pixmap and reference count. 127 /* Structure recording X pixmap and reference count.
138 If REFCOUNT is 0 then this record is free to be reused. */ 128 If REFCOUNT is 0 then this record is free to be reused. */
139 129
264 /* Other WM communication */ 254 /* Other WM communication */
265 Atom Xatom_wm_configure_denied; /* When our config request is denied */ 255 Atom Xatom_wm_configure_denied; /* When our config request is denied */
266 Atom Xatom_wm_window_moved; /* When the WM moves us. */ 256 Atom Xatom_wm_window_moved; /* When the WM moves us. */
267 /* EditRes protocol */ 257 /* EditRes protocol */
268 Atom Xatom_editres; 258 Atom Xatom_editres;
269 /* Atom `FONT' */
270 Atom Xatom_FONT;
271 259
272 /* More atoms, which are selection types. */ 260 /* More atoms, which are selection types. */
273 Atom Xatom_CLIPBOARD, Xatom_TIMESTAMP, Xatom_TEXT, Xatom_DELETE, 261 Atom Xatom_CLIPBOARD, Xatom_TIMESTAMP, Xatom_TEXT, Xatom_DELETE,
262 Xatom_COMPOUND_TEXT,
274 Xatom_MULTIPLE, Xatom_INCR, Xatom_EMACS_TMP, Xatom_TARGETS, Xatom_NULL, 263 Xatom_MULTIPLE, Xatom_INCR, Xatom_EMACS_TMP, Xatom_TARGETS, Xatom_NULL,
275 Xatom_ATOM_PAIR; 264 Xatom_ATOM_PAIR;
265
266 /* More atoms for font properties. The last two are private
267 properties, see the comments in src/fontset.h. */
268 Atom Xatom_PIXEL_SIZE,
269 Xatom_MULE_BASELINE_OFFSET, Xatom_MULE_RELATIVE_COMPOSE;
270
276 #ifdef MULTI_KBOARD 271 #ifdef MULTI_KBOARD
277 struct kboard *kboard; 272 struct kboard *kboard;
278 #endif 273 #endif
279 int cut_buffers_initialized; /* Whether we're sure they all exist */ 274 int cut_buffers_initialized; /* Whether we're sure they all exist */
280 275
295 keyboard input (other sorts of input have the frame encoded in the 290 keyboard input (other sorts of input have the frame encoded in the
296 event). It points to the X focus frame's selected window's 291 event). It points to the X focus frame's selected window's
297 frame. It differs from x_focus_frame when we're using a global 292 frame. It differs from x_focus_frame when we're using a global
298 minibuffer. */ 293 minibuffer. */
299 struct frame *x_highlight_frame; 294 struct frame *x_highlight_frame;
295
296 /* The null pixel used for filling a character background with
297 background color of a gc. */
298 Pixmap null_pixel;
300 }; 299 };
301 300
302 /* This is a chain of structures for all the X displays currently in use. */ 301 /* This is a chain of structures for all the X displays currently in use. */
303 extern struct x_display_info *x_display_list; 302 extern struct x_display_info *x_display_list;
304 303
306 one for each element of x_display_list and in the same order. 305 one for each element of x_display_list and in the same order.
307 NAME is the name of the frame. 306 NAME is the name of the frame.
308 FONT-LIST-CACHE records previous values returned by x-list-fonts. */ 307 FONT-LIST-CACHE records previous values returned by x-list-fonts. */
309 extern Lisp_Object x_display_name_list; 308 extern Lisp_Object x_display_name_list;
310 309
310 /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */
311 extern Lisp_Object Vx_pixel_size_width_font_regexp;
312
311 extern struct x_display_info *x_display_info_for_display (); 313 extern struct x_display_info *x_display_info_for_display ();
312 extern struct x_display_info *x_display_info_for_name (); 314 extern struct x_display_info *x_display_info_for_name ();
313 315
314 extern struct x_display_info *x_term_init (); 316 extern struct x_display_info *x_term_init ();
317
318 extern Lisp_Object x_list_fonts ();
319 extern struct font_info *x_get_font_info(), *x_load_font (), *x_query_font ();
315 320
316 /* Each X frame object points to its own struct x_output object 321 /* Each X frame object points to its own struct x_output object
317 in the output_data.x field. The x_output structure contains 322 in the output_data.x field. The x_output structure contains
318 the information that is specific to X windows. */ 323 the information that is specific to X windows. */
319 324
380 385
381 /* If >=0, a bitmap index. The indicated bitmap is used for the 386 /* If >=0, a bitmap index. The indicated bitmap is used for the
382 icon. */ 387 icon. */
383 int icon_bitmap; 388 int icon_bitmap;
384 389
390 /* Default ASCII font of this frame. */
385 XFontStruct *font; 391 XFontStruct *font;
392
393 /* The baseline position of the default ASCII font. */
394 int font_baseline;
395
396 /* If a fontset is specified for this frame instead of font, this
397 value contains an ID of the fontset, else -1. */
398 int fontset;
386 399
387 /* Pixel values used for various purposes. 400 /* Pixel values used for various purposes.
388 border_pixel may be -1 meaning use a gray tile. */ 401 border_pixel may be -1 meaning use a gray tile. */
389 unsigned long background_pixel; 402 unsigned long background_pixel;
390 unsigned long foreground_pixel; 403 unsigned long foreground_pixel;
494 #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc) 507 #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc)
495 508
496 #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel) 509 #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
497 #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel) 510 #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
498 #define FRAME_FONT(f) ((f)->output_data.x->font) 511 #define FRAME_FONT(f) ((f)->output_data.x->font)
512 #define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
499 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width) 513 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width)
500 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height) 514 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)
501 515
502 /* This gives the x_display_info structure for the display F is on. */ 516 /* This gives the x_display_info structure for the display F is on. */
503 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info) 517 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
505 /* This is the `Display *' which frame F is on. */ 519 /* This is the `Display *' which frame F is on. */
506 #define FRAME_X_DISPLAY(f) (FRAME_X_DISPLAY_INFO (f)->display) 520 #define FRAME_X_DISPLAY(f) (FRAME_X_DISPLAY_INFO (f)->display)
507 521
508 /* This is the `Screen *' which frame F is on. */ 522 /* This is the `Screen *' which frame F is on. */
509 #define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen) 523 #define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen)
524
525 /* This is the 'font_info *' which frame F has. */
526 #define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table)
510 527
511 /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */ 528 /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
512 #define PIXEL_WIDTH(f) ((f)->output_data.x->pixel_width) 529 #define PIXEL_WIDTH(f) ((f)->output_data.x->pixel_width)
513 #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height) 530 #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height)
514 531