aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1997-02-20 07:00:06 +0000
committerKarl Heuer1997-02-20 07:00:06 +0000
commitadb572fb93ddfee88f9c5e9681434517fd241232 (patch)
tree9494de5eaea0c37fbc04d4d0a08a940d2bb82da1 /src
parentdc43ef945f98a6d5f90aa9e09ddd9d724f187856 (diff)
downloademacs-adb572fb93ddfee88f9c5e9681434517fd241232.tar.gz
emacs-adb572fb93ddfee88f9c5e9681434517fd241232.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.h41
1 files changed, 29 insertions, 12 deletions
diff --git a/src/xterm.h b/src/xterm.h
index ea649552521..b0d9212a969 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -124,16 +124,6 @@ enum text_cursor_kinds {
124 filled_box_cursor, hollow_box_cursor, bar_cursor 124 filled_box_cursor, hollow_box_cursor, bar_cursor
125}; 125};
126 126
127/* This data type is used for the font_table field
128 of struct x_display_info. */
129
130struct font_info
131{
132 XFontStruct *font;
133 char *name;
134 char *full_name;
135};
136
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
@@ -266,13 +256,18 @@ struct x_display_info
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
@@ -297,6 +292,10 @@ struct x_display_info
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. */
@@ -308,10 +307,16 @@ extern struct x_display_info *x_display_list;
308 FONT-LIST-CACHE records previous values returned by x-list-fonts. */ 307 FONT-LIST-CACHE records previous values returned by x-list-fonts. */
309extern Lisp_Object x_display_name_list; 308extern Lisp_Object x_display_name_list;
310 309
310/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */
311extern Lisp_Object Vx_pixel_size_width_font_regexp;
312
311extern struct x_display_info *x_display_info_for_display (); 313extern struct x_display_info *x_display_info_for_display ();
312extern struct x_display_info *x_display_info_for_name (); 314extern struct x_display_info *x_display_info_for_name ();
313 315
314extern struct x_display_info *x_term_init (); 316extern struct x_display_info *x_term_init ();
317
318extern Lisp_Object x_list_fonts ();
319extern 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
@@ -382,8 +387,16 @@ struct x_output
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;
386 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;
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;
@@ -496,6 +509,7 @@ struct x_output
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
@@ -508,6 +522,9 @@ struct x_output
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)
510 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)
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)