comparison src/glyphs-x.h @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 41dbb7a9d5f2
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
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) \
82 { 90 {
83 union 91 union
84 { 92 {
85 struct 93 struct
86 { 94 {
87 Screen *xscreen; 95 Display *display;
88 Window parent_window; 96 Window parent_window;
97 Window clip_window;
89 } sub; 98 } sub;
90 struct 99 struct
91 { 100 {
101 Widget clip_window;
92 Position x_offset; 102 Position x_offset;
93 Position y_offset; 103 Position y_offset;
94 LWLIB_ID id; 104 LWLIB_ID id;
95 } wid; 105 } wid;
96 } data; 106 } data;
97 }; 107 };
98 108
99 #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)
100 110
101 #define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ 111 #define IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \
102 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.xscreen) 112 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.display)
103 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ 113 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \
104 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.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)
105 #define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ 117 #define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \
106 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset) 118 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset)
107 #define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ 119 #define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \
108 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset) 120 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset)
109 #define IMAGE_INSTANCE_X_WIDGET_LWID(i) \ 121 #define IMAGE_INSTANCE_X_WIDGET_LWID(i) \
110 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) 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)
111 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ 125 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \
112 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) 126 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i))
113 #define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ 127 #define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \
114 IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i)) 128 IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (XIMAGE_INSTANCE (i))
115 #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ 129 #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \
116 IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i)) 130 IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i))
117 #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ 131 #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \
118 IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i)) 132 IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i))
119 #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \ 133 #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \
120 IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (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))
121 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ 139 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \
122 ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i)) 140 ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i))
123 #define IMAGE_INSTANCE_X_WIDGET_ID(i) \ 141 #define IMAGE_INSTANCE_X_WIDGET_ID(i) \
124 ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i)) 142 ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i))
125 143