Mercurial > hg > xemacs-beta
comparison src/objects-x-impl.h @ 3094:ad2f4ae9895b
[xemacs-hg @ 2005-11-26 11:45:47 by stephent]
Xft merge. <87k6ev4p8q.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Sat, 26 Nov 2005 11:46:25 +0000 |
parents | 79c6ff3eef26 |
children | 87175eb65ff4 |
comparison
equal
deleted
inserted
replaced
3093:769dc945b085 | 3094:ad2f4ae9895b |
---|---|
27 #ifndef INCLUDED_objects_x_impl_h_ | 27 #ifndef INCLUDED_objects_x_impl_h_ |
28 #define INCLUDED_objects_x_impl_h_ | 28 #define INCLUDED_objects_x_impl_h_ |
29 | 29 |
30 #include "objects-impl.h" | 30 #include "objects-impl.h" |
31 #include "objects-x.h" | 31 #include "objects-x.h" |
32 #ifdef USE_XFT | |
33 /* for resource name definitions, etc */ | |
34 #include "../lwlib/lwlib-fonts.h" | |
35 #endif | |
32 | 36 |
33 #ifdef HAVE_X_WINDOWS | 37 #ifdef HAVE_X_WINDOWS |
34 | 38 |
35 /***************************************************************************** | 39 /***************************************************************************** |
36 Color-Instance | 40 Color-Instance |
37 ****************************************************************************/ | 41 ****************************************************************************/ |
38 | 42 |
39 struct x_color_instance_data | 43 struct x_color_instance_data |
40 { | 44 { |
41 XColor color; | 45 XColor color; |
46 /* Yes, it looks crazy to have both the XColor and the XftColor, but | |
47 pragmatically both are used. */ | |
48 #ifdef USE_XFT | |
49 XftColor xftColor; | |
50 #endif | |
42 char dealloc_on_gc; | 51 char dealloc_on_gc; |
43 }; | 52 }; |
44 | 53 |
45 #define X_COLOR_INSTANCE_DATA(c) ((struct x_color_instance_data *) (c)->data) | 54 #define X_COLOR_INSTANCE_DATA(c) ((struct x_color_instance_data *) (c)->data) |
46 #define COLOR_INSTANCE_X_COLOR(c) (X_COLOR_INSTANCE_DATA (c)->color) | 55 #define COLOR_INSTANCE_X_COLOR(c) (X_COLOR_INSTANCE_DATA (c)->color) |
56 #ifdef USE_XFT | |
57 #define COLOR_INSTANCE_X_XFTCOLOR(c) (X_COLOR_INSTANCE_DATA (c)->xftColor) | |
58 #endif | |
47 #define COLOR_INSTANCE_X_DEALLOC(c) (X_COLOR_INSTANCE_DATA (c)->dealloc_on_gc) | 59 #define COLOR_INSTANCE_X_DEALLOC(c) (X_COLOR_INSTANCE_DATA (c)->dealloc_on_gc) |
48 | 60 |
49 /***************************************************************************** | 61 /***************************************************************************** |
50 Font-Instance | 62 Font-Instance |
51 ****************************************************************************/ | 63 ****************************************************************************/ |
52 | 64 |
53 struct x_font_instance_data | 65 struct x_font_instance_data |
54 { | 66 { |
55 /* X-specific information */ | 67 /* X-specific information */ |
56 XFontStruct *font; | 68 /* Yes, it looks crazy to have both the XFontStruct and the XftFont, but |
69 pragmatically both are used (lwlib delegates labels to the widget sets, | |
70 which internally use XFontStructs). */ | |
71 XFontStruct * font; | |
72 #ifdef USE_XFT | |
73 XftFont *xftFont; | |
74 #endif | |
75 | |
57 }; | 76 }; |
58 | 77 |
59 #define X_FONT_INSTANCE_DATA(f) ((struct x_font_instance_data *) (f)->data) | 78 #define X_FONT_INSTANCE_DATA(f) ((struct x_font_instance_data *) (f)->data) |
60 #define FONT_INSTANCE_X_FONT(f) (X_FONT_INSTANCE_DATA (f)->font) | 79 #define FONT_INSTANCE_X_FONT(f) (X_FONT_INSTANCE_DATA (f)->font) |
80 #ifdef USE_XFT | |
81 #define FONT_INSTANCE_X_XFTFONT(f) (X_FONT_INSTANCE_DATA (f)->xftFont) | |
82 #endif | |
61 | 83 |
62 #endif /* HAVE_X_WINDOWS */ | 84 #endif /* HAVE_X_WINDOWS */ |
63 | 85 |
64 #endif /* INCLUDED_objects_x_impl_h_ */ | 86 #endif /* INCLUDED_objects_x_impl_h_ */ |