Mercurial > hg > xemacs-beta
comparison src/glyphs-x.h @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | bbff43aa5eb7 |
children | b8cc9ab3f761 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
22 Boston, MA 02111-1307, USA. */ | 22 Boston, MA 02111-1307, USA. */ |
23 | 23 |
24 /* Synched up with: Not in FSF. */ | 24 /* Synched up with: Not in FSF. */ |
25 | 25 |
26 #ifndef _XEMACS_GLYPHS_X_H_ | 26 #ifndef INCLUDED_glyphs_x_h_ |
27 #define _XEMACS_GLYPHS_X_H_ | 27 #define INCLUDED_glyphs_x_h_ |
28 | 28 |
29 #include "glyphs.h" | 29 #include "glyphs.h" |
30 | 30 |
31 #ifdef HAVE_X_WINDOWS | 31 #ifdef HAVE_X_WINDOWS |
32 | 32 |
37 * Image-Instance Object * | 37 * Image-Instance Object * |
38 ****************************************************************************/ | 38 ****************************************************************************/ |
39 | 39 |
40 struct x_image_instance_data | 40 struct x_image_instance_data |
41 { | 41 { |
42 Pixmap pixmap; | 42 Pixmap* pixmaps; |
43 Pixmap mask; | |
44 Cursor cursor; | 43 Cursor cursor; |
45 | 44 |
46 /* If depth>0, then that means that other colors were allocated when | 45 /* If depth>0, then that means that other colors were allocated when |
47 this pixmap was loaded. These are they; we need to free them when | 46 this pixmap was loaded. These are they; we need to free them when |
48 finalizing the image instance. */ | 47 finalizing the image instance. */ |
54 the textual color table and the comments? Is that useful? */ | 53 the textual color table and the comments? Is that useful? */ |
55 }; | 54 }; |
56 | 55 |
57 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data) | 56 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data) |
58 | 57 |
59 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap) | 58 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmaps[0]) |
60 #define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask) | 59 #define IMAGE_INSTANCE_X_PIXMAP_SLICE(i,slice) \ |
60 (X_IMAGE_INSTANCE_DATA (i)->pixmaps[slice]) | |
61 #define IMAGE_INSTANCE_X_PIXMAP_SLICES(i) \ | |
62 (X_IMAGE_INSTANCE_DATA (i)->pixmaps) | |
63 #define IMAGE_INSTANCE_X_MASK(i) \ | |
64 (Pixmap)(IMAGE_INSTANCE_PIXMAP_MASK (i)) | |
61 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor) | 65 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor) |
62 #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap) | 66 #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap) |
63 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels) | 67 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels) |
64 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels) | 68 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels) |
65 | 69 |
66 #define XIMAGE_INSTANCE_X_PIXMAP(i) \ | 70 #define XIMAGE_INSTANCE_X_PIXMAP(i) \ |
67 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i)) | 71 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i)) |
72 #define XIMAGE_INSTANCE_X_PIXMAP_SLICES(i) \ | |
73 IMAGE_INSTANCE_X_PIXMAP_SLICES (XIMAGE_INSTANCE (i)) | |
74 #define XIMAGE_INSTANCE_X_PIXMAP_SLICE(i) \ | |
75 IMAGE_INSTANCE_X_PIXMAP_SLICE (XIMAGE_INSTANCE (i)) | |
68 #define XIMAGE_INSTANCE_X_MASK(i) \ | 76 #define XIMAGE_INSTANCE_X_MASK(i) \ |
69 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i)) | 77 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i)) |
70 #define XIMAGE_INSTANCE_X_CURSOR(i) \ | 78 #define XIMAGE_INSTANCE_X_CURSOR(i) \ |
71 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i)) | 79 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i)) |
72 #define XIMAGE_INSTANCE_X_PIXELS(i) \ | 80 #define XIMAGE_INSTANCE_X_PIXELS(i) \ |
78 * Subwindow Object * | 86 * Subwindow Object * |
79 ****************************************************************************/ | 87 ****************************************************************************/ |
80 | 88 |
81 struct x_subwindow_data | 89 struct x_subwindow_data |
82 { | 90 { |
83 Screen *xscreen; | 91 union |
84 Window parent_window; | 92 { |
93 struct | |
94 { | |
95 Display *display; | |
96 Window parent_window; | |
97 Window clip_window; | |
98 } sub; | |
99 struct | |
100 { | |
101 Widget clip_window; | |
102 Position x_offset; | |
103 Position y_offset; | |
104 LWLIB_ID id; | |
105 } wid; | |
106 } data; | |
85 }; | 107 }; |
86 | 108 |
87 #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) | 109 #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) |
88 | 110 |
89 #define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ | 111 #define IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ |
90 (X_SUBWINDOW_INSTANCE_DATA (i)->xscreen) | 112 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.display) |
91 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ | 113 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ |
92 (X_SUBWINDOW_INSTANCE_DATA (i)->parent_window) | 114 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window) |
115 #define IMAGE_INSTANCE_X_CLIPWINDOW(i) \ | |
116 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.clip_window) | |
117 #define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ | |
118 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset) | |
119 #define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ | |
120 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset) | |
121 #define IMAGE_INSTANCE_X_WIDGET_LWID(i) \ | |
122 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) | |
123 #define IMAGE_INSTANCE_X_CLIPWIDGET(i) \ | |
124 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.clip_window) | |
93 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ | 125 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ |
94 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) | 126 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) |
95 #define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ | 127 #define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ |
96 IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i)) | 128 IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (XIMAGE_INSTANCE (i)) |
129 #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ | |
130 IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i)) | |
131 #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ | |
132 IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i)) | |
133 #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \ | |
134 IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i)) | |
135 #define XIMAGE_INSTANCE_X_CLIPWIDGET(i) \ | |
136 IMAGE_INSTANCE_X_CLIPWIDGET (XIMAGE_INSTANCE (i)) | |
137 #define XIMAGE_INSTANCE_X_CLIPWINDOW(i) \ | |
138 IMAGE_INSTANCE_X_CLIPWINDOW (XIMAGE_INSTANCE (i)) | |
97 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ | 139 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ |
98 ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i)) | 140 (* (Window *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) |
141 #define IMAGE_INSTANCE_X_WIDGET_ID(i) \ | |
142 (* (Widget *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) | |
99 | 143 |
100 #endif /* HAVE_X_WINDOWS */ | 144 #endif /* HAVE_X_WINDOWS */ |
101 #endif /* _XEMACS_GLYPHS_X_H_ */ | 145 #endif /* INCLUDED_glyphs_x_h_ */ |