Mercurial > emacs
comparison src/w32term.h @ 94913:c83563acc3aa
Throughout the file, delete all USE_FONT_BACKEND
conditionals. Don't check enable_font_backend. Surround non-used
code by "#ifdef OLD_FONT" and "endif".
(FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
(FONT_AVG_WIDTH): Adjusted for the change of struct font.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 14 May 2008 01:00:37 +0000 |
parents | be40d8a9bcc1 |
children | 29adfc9354e7 |
comparison
equal
deleted
inserted
replaced
94912:5b153bea483d | 94913:c83563acc3aa |
---|---|
25 | 25 |
26 | 26 |
27 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) | 27 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) |
28 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) | 28 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) |
29 | 29 |
30 #define FONT_WIDTH(f) \ | 30 #define FONT_WIDTH(f) ((f)->max_width) |
31 ((f)->bdf ? (f)->bdf->width : (f)->tm.tmMaxCharWidth) | 31 #define FONT_HEIGHT(f) ((f)->height) |
32 #define FONT_HEIGHT(f) \ | 32 #define FONT_BASE(f) ((f)->ascent) |
33 ((f)->bdf ? (f)->bdf->height : (f)->tm.tmHeight) | 33 #define FONT_DESCENT(f) ((f)->descent) |
34 #define FONT_BASE(f) \ | 34 #define FONT_AVG_WIDTH(f) ((f)->average_width) |
35 ((f)->bdf ? (f)->bdf->ury : (f)->tm.tmAscent) | |
36 #define FONT_DESCENT(f) \ | |
37 ((f)->bdf ? -((f)->bdf->lly) : (f)->tm.tmDescent) | |
38 #define FONT_AVG_WIDTH(f) \ | |
39 ((f)->bdf ? (f)->bdf->width : (f)->tm.tmAveCharWidth) | |
40 | 35 |
41 #define CP_DEFAULT 1004 | 36 #define CP_DEFAULT 1004 |
42 /* Special pseudo-codepages. */ | 37 /* Special pseudo-codepages. */ |
43 #define CP_8BIT -1 | 38 #define CP_8BIT -1 |
44 #define CP_UNICODE -2 | 39 #define CP_UNICODE -2 |
150 | 145 |
151 /* Keystroke that has been faked by Emacs and will be ignored when | 146 /* Keystroke that has been faked by Emacs and will be ignored when |
152 received; value is reset after key is received. */ | 147 received; value is reset after key is received. */ |
153 int faked_key; | 148 int faked_key; |
154 | 149 |
150 #if OLD_FONT | |
155 /* A table of all the fonts we have already loaded. */ | 151 /* A table of all the fonts we have already loaded. */ |
156 struct font_info *font_table; | 152 struct font_info *font_table; |
157 | 153 |
158 /* The current capacity of font_table. */ | 154 /* The current capacity of font_table. */ |
159 int font_table_size; | 155 int font_table_size; |
156 #endif | |
160 | 157 |
161 /* Minimum width over all characters in all fonts in font_table. */ | 158 /* Minimum width over all characters in all fonts in font_table. */ |
162 int smallest_char_width; | 159 int smallest_char_width; |
163 | 160 |
164 /* Minimum font height over all fonts in font_table. */ | 161 /* Minimum font height over all fonts in font_table. */ |
254 Lisp_Object, Lisp_Object, | 251 Lisp_Object, Lisp_Object, |
255 Lisp_Object, Lisp_Object)); | 252 Lisp_Object, Lisp_Object)); |
256 | 253 |
257 extern struct w32_display_info *w32_term_init (); | 254 extern struct w32_display_info *w32_term_init (); |
258 | 255 |
256 #if OLD_FONT | |
259 extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); | 257 extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); |
260 extern struct font_info *w32_get_font_info (), *w32_query_font (); | 258 extern struct font_info *w32_get_font_info (), *w32_query_font (); |
261 extern void w32_cache_char_metrics (XFontStruct *font); | 259 extern void w32_cache_char_metrics (XFontStruct *font); |
262 extern void w32_find_ccl_program(); | 260 extern void w32_find_ccl_program(); |
263 extern Lisp_Object x_get_font_repertory P_ ((struct frame *, | 261 extern Lisp_Object x_get_font_repertory P_ ((struct frame *, |
264 struct font_info *)); | 262 struct font_info *)); |
263 #endif | |
265 | 264 |
266 #define PIX_TYPE COLORREF | 265 #define PIX_TYPE COLORREF |
267 | 266 |
268 /* Each W32 frame object points to its own struct w32_display object | 267 /* Each W32 frame object points to its own struct w32_display object |
269 in the output_data.w32 field. The w32_display structure contains all | 268 in the output_data.w32 field. The w32_display structure contains all |
322 but it can be the root window, and it can be explicitly specified | 321 but it can be the root window, and it can be explicitly specified |
323 (see the explicit_parent field, below). */ | 322 (see the explicit_parent field, below). */ |
324 Window parent_desc; | 323 Window parent_desc; |
325 | 324 |
326 /* Default ASCII font of this frame. */ | 325 /* Default ASCII font of this frame. */ |
326 #if OLD_FONT | |
327 XFontStruct *font; | 327 XFontStruct *font; |
328 | 328 #endif |
329 #ifdef USE_FONT_BACKEND | 329 struct font *font; |
330 struct font *fontp; | |
331 #endif /* USE_FONT_BACKEND */ | |
332 | 330 |
333 /* The baseline offset of the default ASCII font. */ | 331 /* The baseline offset of the default ASCII font. */ |
334 int baseline_offset; | 332 int baseline_offset; |
335 | 333 |
336 /* If a fontset is specified for this frame instead of font, this | 334 /* If a fontset is specified for this frame instead of font, this |
414 | 412 |
415 #define FRAME_FONT(f) ((f)->output_data.w32->font) | 413 #define FRAME_FONT(f) ((f)->output_data.w32->font) |
416 #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) | 414 #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) |
417 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) | 415 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) |
418 | 416 |
419 #ifdef USE_FONT_BACKEND | |
420 #define FRAME_FONT_OBJECT(f) ((f)->output_data.w32->fontp) | |
421 #endif /* USE_FONT_BACKEND */ | |
422 | |
423 /* This gives the w32_display_info structure for the display F is on. */ | 417 /* This gives the w32_display_info structure for the display F is on. */ |
424 #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) | 418 #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) |
425 #define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info) | 419 #define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info) |
426 | 420 |
427 /* This is the `Display *' which frame F is on. */ | 421 /* This is the `Display *' which frame F is on. */ |
428 #define FRAME_X_DISPLAY(f) (0) | 422 #define FRAME_X_DISPLAY(f) (0) |
429 | 423 |
424 #if OLD_FONT | |
430 /* This is the 'font_info *' which frame F has. */ | 425 /* This is the 'font_info *' which frame F has. */ |
431 #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) | 426 #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) |
427 #endif | |
432 | 428 |
433 /* Value is the smallest width of any character in any font on frame F. */ | 429 /* Value is the smallest width of any character in any font on frame F. */ |
434 | 430 |
435 #define FRAME_SMALLEST_CHAR_WIDTH(F) \ | 431 #define FRAME_SMALLEST_CHAR_WIDTH(F) \ |
436 FRAME_W32_DISPLAY_INFO(F)->smallest_char_width | 432 FRAME_W32_DISPLAY_INFO(F)->smallest_char_width |
597 w32_fill_rect (f, hdc, FRAME_BACKGROUND_PIXEL (f), lprect) | 593 w32_fill_rect (f, hdc, FRAME_BACKGROUND_PIXEL (f), lprect) |
598 | 594 |
599 #define w32_clear_area(f,hdc,px,py,nx,ny) \ | 595 #define w32_clear_area(f,hdc,px,py,nx,ny) \ |
600 w32_fill_area (f, hdc, FRAME_BACKGROUND_PIXEL (f), px, py, nx, ny) | 596 w32_fill_area (f, hdc, FRAME_BACKGROUND_PIXEL (f), px, py, nx, ny) |
601 | 597 |
598 #if OLD_FONT | |
602 extern struct font_info *w32_load_font (); | 599 extern struct font_info *w32_load_font (); |
603 extern void w32_unload_font (); | 600 extern void w32_unload_font (); |
601 #endif | |
604 | 602 |
605 /* Define for earlier versions of Visual C */ | 603 /* Define for earlier versions of Visual C */ |
606 #ifndef WM_MOUSEWHEEL | 604 #ifndef WM_MOUSEWHEEL |
607 #define WM_MOUSEWHEEL (WM_MOUSELAST + 1) | 605 #define WM_MOUSEWHEEL (WM_MOUSELAST + 1) |
608 #endif /* WM_MOUSEWHEEL */ | 606 #endif /* WM_MOUSEWHEEL */ |