comparison src/glyphs.h @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents e804706bfb8c
children 11054d720c21
comparison
equal deleted inserted replaced
419:66615b78f1a5 420:41dbb7a9d5f2
83 Lisp_Object symbol; 83 Lisp_Object symbol;
84 84
85 Lisp_Object device; /* sometimes used */ 85 Lisp_Object device; /* sometimes used */
86 86
87 ii_keyword_entry_dynarr *keywords; 87 ii_keyword_entry_dynarr *keywords;
88 /* consoles this ii is supported on */
89 console_type_entry_dynarr *consoles;
88 /* Implementation specific methods: */ 90 /* Implementation specific methods: */
89 91
90 /* Validate method: Given an instantiator vector, signal an error if 92 /* Validate method: Given an instantiator vector, signal an error if
91 it's invalid for this image-instantiator format. Note that this 93 it's invalid for this image-instantiator format. Note that this
92 validation only occurs after all the keyword-specific validation 94 validation only occurs after all the keyword-specific validation
168 xnew_and_zero (struct image_instantiator_methods); \ 170 xnew_and_zero (struct image_instantiator_methods); \
169 format##_image_instantiator_methods->symbol = Q##format; \ 171 format##_image_instantiator_methods->symbol = Q##format; \
170 format##_image_instantiator_methods->device = Qnil; \ 172 format##_image_instantiator_methods->device = Qnil; \
171 format##_image_instantiator_methods->keywords = \ 173 format##_image_instantiator_methods->keywords = \
172 Dynarr_new (ii_keyword_entry); \ 174 Dynarr_new (ii_keyword_entry); \
175 format##_image_instantiator_methods->consoles = \
176 Dynarr_new (console_type_entry); \
173 add_entry_to_image_instantiator_format_list \ 177 add_entry_to_image_instantiator_format_list \
174 (Q##format, format##_image_instantiator_methods); \ 178 (Q##format, format##_image_instantiator_methods); \
175 } while (0) 179 } while (0)
176 180
177 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \ 181 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \
213 entry.multiple_p = 1; \ 217 entry.multiple_p = 1; \
214 Dynarr_add (format##_image_instantiator_methods->keywords, \ 218 Dynarr_add (format##_image_instantiator_methods->keywords, \
215 entry); \ 219 entry); \
216 } while (0) 220 } while (0)
217 221
222 /* Declare that image-instantiator format FORMAT is supported on
223 CONSOLE type. */
224 #define IIFORMAT_VALID_CONSOLE(console, format) \
225 do { \
226 struct console_type_entry entry; \
227 \
228 entry.symbol = Q##console; \
229 entry.meths = console##_console_methods; \
230 Dynarr_add (format##_image_instantiator_methods->consoles, \
231 entry); \
232 } while (0)
233
218 #define DEFINE_DEVICE_IIFORMAT(type, format)\ 234 #define DEFINE_DEVICE_IIFORMAT(type, format)\
235 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \
219 struct image_instantiator_methods *type##_##format##_image_instantiator_methods 236 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
220 237
221 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \ 238 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \
222 do { \ 239 do { \
223 type##_##format##_image_instantiator_methods = \ 240 type##_##format##_image_instantiator_methods = \
226 type##_##format##_image_instantiator_methods->device = Q##type; \ 243 type##_##format##_image_instantiator_methods->device = Q##type; \
227 type##_##format##_image_instantiator_methods->keywords = \ 244 type##_##format##_image_instantiator_methods->keywords = \
228 Dynarr_new (ii_keyword_entry); \ 245 Dynarr_new (ii_keyword_entry); \
229 add_entry_to_device_ii_format_list \ 246 add_entry_to_device_ii_format_list \
230 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ 247 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \
248 IIFORMAT_VALID_CONSOLE(type,format); \
231 } while (0) 249 } while (0)
232 250
233 /* Declare that image-instantiator format FORMAT has method M; used in 251 /* Declare that image-instantiator format FORMAT has method M; used in
234 initialization routines */ 252 initialization routines */
235 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \ 253 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \
622 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g)) 640 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g))
623 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g)) 641 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g))
624 642
625 extern Lisp_Object Qxpm, Qxface; 643 extern Lisp_Object Qxpm, Qxface;
626 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable; 644 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
627 extern Lisp_Object Qxbm, Qedit, Qgroup, Qlabel, Qcombo, Qscrollbar, Qprogress; 645 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar;
628 extern Lisp_Object Qtree, Qtab; 646 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge;
629 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; 647 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
630 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; 648 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group;
631 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; 649 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
632 extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error; 650 extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error;
633 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; 651 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph;