comparison src/xterm.h @ 94910:3c91cba34532

Throughout the file, delete all USE_FONT_BACKEND conditionals. (FONT_WIDTH): Return (f)->max_width. (struct x_display_info): Delete member `font'. (x_list_fonts, x_get_font_info, x_load_font, x_query_font) (x_find_ccl_program, x_get_font_repertory): Delete externs. (struct x_output): Change type of `font' to `struct font *'.
author Kenichi Handa <handa@m17n.org>
date Wed, 14 May 2008 00:38:39 +0000
parents 4d9fc08769fa
children 29adfc9354e7
comparison
equal deleted inserted replaced
94909:11f28d8c2c22 94910:3c91cba34532
67 #define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \ 67 #define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
68 XScreenNumberOfScreen (FRAME_X_SCREEN (f))) 68 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
69 #define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \ 69 #define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
70 XScreenNumberOfScreen (FRAME_X_SCREEN (f))) 70 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
71 71
72 #define FONT_WIDTH(f) ((f)->max_bounds.width) 72 #define FONT_WIDTH(f) ((f)->max_width)
73 #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) 73 #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
74 #define FONT_BASE(f) ((f)->ascent) 74 #define FONT_BASE(f) ((f)->ascent)
75 #define FONT_DESCENT(f) ((f)->descent) 75 #define FONT_DESCENT(f) ((f)->descent)
76 76
77 /* The mask of events that text windows always want to receive. This 77 /* The mask of events that text windows always want to receive. This
168 #endif 168 #endif
169 169
170 /* X Resource data base */ 170 /* X Resource data base */
171 XrmDatabase xrdb; 171 XrmDatabase xrdb;
172 172
173 /* A table of all the fonts we have already loaded. */
174 struct font_info *font_table;
175
176 /* The current capacity of x_font_table. */
177 int font_table_size;
178
179 #ifdef USE_FONT_BACKEND
180 /* This provides a commonly used Font ID on this display. */
181 XFontStruct *font;
182 #endif
183
184 /* Minimum width over all characters in all fonts in font_table. */ 173 /* Minimum width over all characters in all fonts in font_table. */
185 int smallest_char_width; 174 int smallest_char_width;
186 175
187 /* Minimum font height over all fonts in font_table. */ 176 /* Minimum font height over all fonts in font_table. */
188 int smallest_font_height; 177 int smallest_font_height;
221 210
222 int mouse_face_image_state; 211 int mouse_face_image_state;
223 212
224 char *x_id_name; 213 char *x_id_name;
225 214
226 /* The number of fonts actually stored in x_font_table. 215 /* The number of fonts opened for this display. */
227 font_table[n] is used and valid if 0 <= n < n_fonts. 0 <=
228 n_fonts <= font_table_size and font_table[i].name != 0. */
229 int n_fonts; 216 int n_fonts;
230 217
231 /* Pointer to bitmap records. */ 218 /* Pointer to bitmap records. */
232 struct x_bitmap_record *bitmaps; 219 struct x_bitmap_record *bitmaps;
233 220
402 extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); 389 extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
403 390
404 extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *)); 391 extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *));
405 extern int x_display_ok P_ ((const char *)); 392 extern int x_display_ok P_ ((const char *));
406 393
407 extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
408 extern void select_visual P_ ((struct x_display_info *)); 394 extern void select_visual P_ ((struct x_display_info *));
409 extern struct font_info *x_get_font_info P_ ((struct frame *f, int));
410 extern struct font_info *x_load_font P_ ((struct frame *, char *, int));
411 extern struct font_info *x_query_font P_ ((struct frame *, char *));
412 extern void x_find_ccl_program P_ ((struct font_info *));
413 extern Lisp_Object x_get_font_repertory P_ ((struct frame *,
414 struct font_info *));
415 395
416 396
397 struct font;
398
417 /* Each X frame object points to its own struct x_output object 399 /* Each X frame object points to its own struct x_output object
418 in the output_data.x field. The x_output structure contains 400 in the output_data.x field. The x_output structure contains
419 the information that is specific to X windows. */ 401 the information that is specific to X windows. */
420 402
421 struct x_output 403 struct x_output
490 /* If >=0, a bitmap index. The indicated bitmap is used for the 472 /* If >=0, a bitmap index. The indicated bitmap is used for the
491 icon. */ 473 icon. */
492 int icon_bitmap; 474 int icon_bitmap;
493 475
494 /* Default ASCII font of this frame. */ 476 /* Default ASCII font of this frame. */
495 XFontStruct *font; 477 struct font *font;
496
497 #ifdef USE_FONT_BACKEND
498 struct font *fontp;
499 #endif /* USE_FONT_BACKEND */
500 478
501 /* The baseline offset of the default ASCII font. */ 479 /* The baseline offset of the default ASCII font. */
502 int baseline_offset; 480 int baseline_offset;
503 481
504 /* If a fontset is specified for this frame instead of font, this 482 /* If a fontset is specified for this frame instead of font, this
682 #define FRAME_FONT(f) ((f)->output_data.x->font) 660 #define FRAME_FONT(f) ((f)->output_data.x->font)
683 #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) 661 #define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
684 #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) 662 #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
685 #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height) 663 #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height)
686 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) 664 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset)
687
688 #ifdef USE_FONT_BACKEND
689 #define FRAME_FONT_OBJECT(f) ((f)->output_data.x->fontp)
690 #endif /* USE_FONT_BACKEND */
691 665
692 /* This gives the x_display_info structure for the display F is on. */ 666 /* This gives the x_display_info structure for the display F is on. */
693 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info) 667 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
694 668
695 /* This is the `Display *' which frame F is on. */ 669 /* This is the `Display *' which frame F is on. */