Mercurial > hg > xemacs-beta
comparison src/glyphs-x.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 501cfd01ee6d |
children | 41dbb7a9d5f2 |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
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 INCLUDED_glyphs_x_h_ | 26 #ifndef _XEMACS_GLYPHS_X_H_ |
27 #define INCLUDED_glyphs_x_h_ | 27 #define _XEMACS_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* pixmaps; | 42 Pixmap pixmap; |
43 Pixmap mask; | |
43 Cursor cursor; | 44 Cursor cursor; |
44 | 45 |
45 /* If depth>0, then that means that other colors were allocated when | 46 /* If depth>0, then that means that other colors were allocated when |
46 this pixmap was loaded. These are they; we need to free them when | 47 this pixmap was loaded. These are they; we need to free them when |
47 finalizing the image instance. */ | 48 finalizing the image instance. */ |
53 the textual color table and the comments? Is that useful? */ | 54 the textual color table and the comments? Is that useful? */ |
54 }; | 55 }; |
55 | 56 |
56 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data) | 57 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data) |
57 | 58 |
58 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmaps[0]) | 59 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap) |
59 #define IMAGE_INSTANCE_X_PIXMAP_SLICE(i,slice) \ | 60 #define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask) |
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)) | |
65 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor) | 61 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor) |
66 #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap) | 62 #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap) |
67 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels) | 63 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels) |
68 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels) | 64 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels) |
69 | 65 |
70 #define XIMAGE_INSTANCE_X_PIXMAP(i) \ | 66 #define XIMAGE_INSTANCE_X_PIXMAP(i) \ |
71 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i)) | 67 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)) | |
76 #define XIMAGE_INSTANCE_X_MASK(i) \ | 68 #define XIMAGE_INSTANCE_X_MASK(i) \ |
77 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i)) | 69 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i)) |
78 #define XIMAGE_INSTANCE_X_CURSOR(i) \ | 70 #define XIMAGE_INSTANCE_X_CURSOR(i) \ |
79 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i)) | 71 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i)) |
80 #define XIMAGE_INSTANCE_X_PIXELS(i) \ | 72 #define XIMAGE_INSTANCE_X_PIXELS(i) \ |
86 * Subwindow Object * | 78 * Subwindow Object * |
87 ****************************************************************************/ | 79 ****************************************************************************/ |
88 | 80 |
89 struct x_subwindow_data | 81 struct x_subwindow_data |
90 { | 82 { |
91 union | 83 Screen *xscreen; |
92 { | 84 Window parent_window; |
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; | |
107 }; | 85 }; |
108 | 86 |
109 #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) | 87 #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) |
110 | 88 |
111 #define IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ | 89 #define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ |
112 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.display) | 90 (X_SUBWINDOW_INSTANCE_DATA (i)->xscreen) |
113 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ | 91 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ |
114 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window) | 92 (X_SUBWINDOW_INSTANCE_DATA (i)->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) | |
125 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ | |
126 (* (Window *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) | |
127 #define IMAGE_INSTANCE_X_WIDGET_ID(i) \ | |
128 (* (Widget *) & IMAGE_INSTANCE_SUBWINDOW_ID (i)) | |
129 | |
130 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ | 93 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ |
131 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) | 94 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) |
132 #define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ | 95 #define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ |
133 IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (XIMAGE_INSTANCE (i)) | 96 IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i)) |
134 #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ | 97 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ |
135 IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i)) | 98 ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i)) |
136 #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ | |
137 IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i)) | |
138 #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \ | |
139 IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i)) | |
140 #define XIMAGE_INSTANCE_X_CLIPWIDGET(i) \ | |
141 IMAGE_INSTANCE_X_CLIPWIDGET (XIMAGE_INSTANCE (i)) | |
142 #define XIMAGE_INSTANCE_X_CLIPWINDOW(i) \ | |
143 IMAGE_INSTANCE_X_CLIPWINDOW (XIMAGE_INSTANCE (i)) | |
144 #define XIMAGE_INSTANCE_X_WIDGET_ID(i) \ | |
145 IMAGE_INSTANCE_X_WIDGET_ID (XIMAGE_INSTANCE (i)) | |
146 | |
147 #define DOMAIN_X_WIDGET(domain) \ | |
148 ((IMAGE_INSTANCEP (domain) && \ | |
149 X_SUBWINDOW_INSTANCE_DATA (XIMAGE_INSTANCE (domain))) ? \ | |
150 XIMAGE_INSTANCE_X_WIDGET_ID (domain) : \ | |
151 FRAME_X_CONTAINER_WIDGET (f) (DOMAIN_XFRAME (domain))) | |
152 | 99 |
153 #endif /* HAVE_X_WINDOWS */ | 100 #endif /* HAVE_X_WINDOWS */ |
154 #endif /* INCLUDED_glyphs_x_h_ */ | 101 #endif /* _XEMACS_GLYPHS_X_H_ */ |