Mercurial > hg > xemacs-beta
comparison src/glyphs.h @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 84b14dcb0985 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 Boston, MA 02111-1307, USA. */ | 20 Boston, MA 02111-1307, USA. */ |
21 | 21 |
22 /* Synched up with: Not in FSF. */ | 22 /* Synched up with: Not in FSF. */ |
23 | 23 |
24 #ifndef _XEMACS_GLYPHS_H_ | 24 #ifndef INCLUDED_glyphs_h_ |
25 #define _XEMACS_GLYPHS_H_ | 25 #define INCLUDED_glyphs_h_ |
26 | 26 |
27 #include "specifier.h" | 27 #include "specifier.h" |
28 #include "gui.h" | 28 #include "gui.h" |
29 | 29 |
30 /************************************************************************/ | 30 /************************************************************************/ |
53 mswindows-resource pointer | 53 mswindows-resource pointer |
54 font pointer | 54 font pointer |
55 subwindow subwindow | 55 subwindow subwindow |
56 inherit mono-pixmap | 56 inherit mono-pixmap |
57 autodetect mono-pixmap, color-pixmap, pointer, text | 57 autodetect mono-pixmap, color-pixmap, pointer, text |
58 button widget | 58 button widget |
59 edit-field widget | 59 edit-field widget |
60 combo -box widget | 60 combo -box widget |
61 progress-gauge widget | 61 progress-gauge widget |
62 tab-control widget | 62 tab-control widget |
63 tree-view widget | 63 tree-view widget |
64 scrollbar widget | 64 scrollbar widget |
65 static widget | 65 static widget |
66 */ | 66 */ |
67 | 67 |
68 /* These are methods specific to a particular format of image instantiator | 68 /* These are methods specific to a particular format of image instantiator |
69 (e.g. xpm, string, etc.). */ | 69 (e.g. xpm, string, etc.). */ |
70 | 70 |
87 enum image_instance_geometry | 87 enum image_instance_geometry |
88 { | 88 { |
89 IMAGE_GEOMETRY, | 89 IMAGE_GEOMETRY, |
90 IMAGE_DESIRED_GEOMETRY, | 90 IMAGE_DESIRED_GEOMETRY, |
91 IMAGE_MIN_GEOMETRY, | 91 IMAGE_MIN_GEOMETRY, |
92 IMAGE_MAX_GEOMETRY, | 92 IMAGE_MAX_GEOMETRY, |
93 IMAGE_UNSPECIFIED_GEOMETRY = ~0 | 93 IMAGE_UNSPECIFIED_GEOMETRY = ~0 |
94 }; | 94 }; |
95 | 95 |
96 #define WIDGET_BORDER_HEIGHT 4 | 96 #define WIDGET_BORDER_HEIGHT 4 |
97 #define WIDGET_BORDER_WIDTH 4 | 97 #define WIDGET_BORDER_WIDTH 4 |
147 /* Find out the desired geometry, as given by disp, of this image | 147 /* Find out the desired geometry, as given by disp, of this image |
148 instance. Actual geometry is stored in the appropriate slots in the | 148 instance. Actual geometry is stored in the appropriate slots in the |
149 image instance. */ | 149 image instance. */ |
150 void (*query_geometry_method) (Lisp_Object image_instance, | 150 void (*query_geometry_method) (Lisp_Object image_instance, |
151 unsigned int* width, unsigned int* height, | 151 unsigned int* width, unsigned int* height, |
152 enum image_instance_geometry disp, | 152 enum image_instance_geometry disp, |
153 Lisp_Object domain); | 153 Lisp_Object domain); |
154 | 154 |
155 /* Layout the instance and its children bounded by the provided | 155 /* Layout the instance and its children bounded by the provided |
156 dimensions. */ | 156 dimensions. */ |
157 void (*layout_method) (Lisp_Object image_instance, | 157 void (*layout_method) (Lisp_Object image_instance, |
158 unsigned int width, unsigned int height, | 158 unsigned int width, unsigned int height, |
159 Lisp_Object domain); | 159 Lisp_Object domain); |
228 | 228 |
229 /* Declare that KEYW is a valid keyword for image-instantiator format | 229 /* Declare that KEYW is a valid keyword for image-instantiator format |
230 FORMAT. VALIDATE_FUN if a function that returns whether the data | 230 FORMAT. VALIDATE_FUN if a function that returns whether the data |
231 is valid. The keyword may not appear more than once. */ | 231 is valid. The keyword may not appear more than once. */ |
232 #define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \ | 232 #define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \ |
233 do { \ | 233 do { \ |
234 struct ii_keyword_entry entry; \ | 234 struct ii_keyword_entry entry; \ |
235 \ | 235 \ |
236 entry.keyword = keyw; \ | 236 entry.keyword = keyw; \ |
237 entry.validate = validate_fun; \ | 237 entry.validate = validate_fun; \ |
238 entry.multiple_p = multi; \ | 238 entry.multiple_p = multi; \ |
239 entry.copy_p = copy; \ | 239 entry.copy_p = copy; \ |
240 Dynarr_add (format##_image_instantiator_methods->keywords, \ | 240 Dynarr_add (format##_image_instantiator_methods->keywords, \ |
241 entry); \ | 241 entry); \ |
242 } while (0) | 242 } while (0) |
243 | 243 |
253 copied by the specifier functions. This is necessary for things | 253 copied by the specifier functions. This is necessary for things |
254 like callbacks etc. */ | 254 like callbacks etc. */ |
255 #define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun) \ | 255 #define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun) \ |
256 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0) | 256 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0) |
257 | 257 |
258 /* Declare that image-instantiator format FORMAT is supported on | 258 /* Declare that image-instantiator format FORMAT is supported on |
259 CONSOLE type. */ | 259 CONSOLE type. */ |
260 #define IIFORMAT_VALID_CONSOLE(console, format) \ | 260 #define IIFORMAT_VALID_CONSOLE(console, format) \ |
261 do { \ | 261 do { \ |
262 struct console_type_entry entry; \ | 262 struct console_type_entry entry; \ |
263 \ | 263 \ |
264 entry.symbol = Q##console; \ | 264 entry.symbol = Q##console; \ |
265 entry.meths = console##_console_methods; \ | 265 entry.meths = console##_console_methods; \ |
266 Dynarr_add (format##_image_instantiator_methods->consoles, \ | 266 Dynarr_add (format##_image_instantiator_methods->consoles, \ |
267 entry); \ | 267 entry); \ |
268 } while (0) | 268 } while (0) |
269 | 269 |
270 #define DEFINE_DEVICE_IIFORMAT(type, format)\ | 270 #define DEFINE_DEVICE_IIFORMAT(type, format) \ |
271 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ | 271 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ |
272 struct image_instantiator_methods *type##_##format##_image_instantiator_methods | 272 struct image_instantiator_methods *type##_##format##_image_instantiator_methods |
273 | 273 |
274 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \ | 274 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \ |
275 do { \ | 275 do { \ |
276 type##_##format##_image_instantiator_methods = \ | 276 type##_##format##_image_instantiator_methods = \ |
319 void check_valid_int (Lisp_Object data); | 319 void check_valid_int (Lisp_Object data); |
320 void check_valid_face (Lisp_Object data); | 320 void check_valid_face (Lisp_Object data); |
321 void check_valid_vector (Lisp_Object data); | 321 void check_valid_vector (Lisp_Object data); |
322 void check_valid_item_list_1 (Lisp_Object items); | 322 void check_valid_item_list_1 (Lisp_Object items); |
323 | 323 |
324 void initialize_subwindow_image_instance (struct Lisp_Image_Instance*); | 324 void initialize_subwindow_image_instance (Lisp_Image_Instance*); |
325 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 325 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
326 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 326 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
327 int dest_mask, Lisp_Object domain); | 327 int dest_mask, Lisp_Object domain); |
328 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 328 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
329 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 329 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
330 int dest_mask, Lisp_Object domain); | 330 int dest_mask, Lisp_Object domain); |
331 void image_instance_query_geometry (Lisp_Object image_instance, | 331 void image_instance_query_geometry (Lisp_Object image_instance, |
332 unsigned int* width, unsigned int* height, | 332 unsigned int* width, unsigned int* height, |
333 enum image_instance_geometry disp, | 333 enum image_instance_geometry disp, |
334 Lisp_Object domain); | 334 Lisp_Object domain); |
335 void image_instance_layout (Lisp_Object image_instance, | 335 void image_instance_layout (Lisp_Object image_instance, |
336 unsigned int width, unsigned int height, | 336 unsigned int width, unsigned int height, |
337 Lisp_Object domain); | 337 Lisp_Object domain); |
338 int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w); | |
338 | 339 |
339 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, | 340 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, |
340 int given_dest_mask, | 341 int given_dest_mask, |
341 int desired_dest_mask)); | 342 int desired_dest_mask)); |
342 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object)); | 343 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object)); |
374 | 375 |
375 /************************************************************************/ | 376 /************************************************************************/ |
376 /* Image Instance Object */ | 377 /* Image Instance Object */ |
377 /************************************************************************/ | 378 /************************************************************************/ |
378 | 379 |
379 DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance); | 380 DECLARE_LRECORD (image_instance, Lisp_Image_Instance); |
380 #define XIMAGE_INSTANCE(x) \ | 381 #define XIMAGE_INSTANCE(x) XRECORD (x, image_instance, Lisp_Image_Instance) |
381 XRECORD (x, image_instance, struct Lisp_Image_Instance) | |
382 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance) | 382 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance) |
383 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) | 383 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) |
384 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) | 384 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) |
385 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) | 385 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) |
386 | 386 |
424 #define WIDGET_IMAGE_INSTANCEP(ii) \ | 424 #define WIDGET_IMAGE_INSTANCEP(ii) \ |
425 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET) | 425 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET) |
426 #define LAYOUT_IMAGE_INSTANCEP(ii) \ | 426 #define LAYOUT_IMAGE_INSTANCEP(ii) \ |
427 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT) | 427 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT) |
428 | 428 |
429 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ | 429 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ |
430 CHECK_IMAGE_INSTANCE (x); \ | 430 CHECK_IMAGE_INSTANCE (x); \ |
431 if (!NOTHING_IMAGE_INSTANCEP (x)) \ | 431 if (!NOTHING_IMAGE_INSTANCEP (x)) \ |
432 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \ | 432 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \ |
433 } while (0) | 433 } while (0) |
434 | 434 |
435 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \ | 435 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \ |
436 CHECK_IMAGE_INSTANCE (x); \ | 436 CHECK_IMAGE_INSTANCE (x); \ |
437 if (!TEXT_IMAGE_INSTANCEP (x)) \ | 437 if (!TEXT_IMAGE_INSTANCEP (x)) \ |
438 x = wrong_type_argument (Qtext_image_instance_p, (x)); \ | 438 x = wrong_type_argument (Qtext_image_instance_p, (x)); \ |
439 } while (0) | 439 } while (0) |
440 | 440 |
441 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \ | 441 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \ |
442 CHECK_IMAGE_INSTANCE (x); \ | 442 CHECK_IMAGE_INSTANCE (x); \ |
443 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \ | 443 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \ |
444 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \ | 444 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \ |
445 } while (0) | 445 } while (0) |
446 | 446 |
447 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \ | 447 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \ |
448 CHECK_IMAGE_INSTANCE (x); \ | 448 CHECK_IMAGE_INSTANCE (x); \ |
449 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \ | 449 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \ |
450 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \ | 450 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \ |
451 } while (0) | 451 } while (0) |
452 | 452 |
453 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \ | 453 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \ |
454 CHECK_IMAGE_INSTANCE (x); \ | 454 CHECK_IMAGE_INSTANCE (x); \ |
455 if (!POINTER_IMAGE_INSTANCEP (x)) \ | 455 if (!POINTER_IMAGE_INSTANCEP (x)) \ |
456 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \ | 456 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \ |
457 } while (0) | 457 } while (0) |
458 | 458 |
459 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \ | 459 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \ |
460 CHECK_IMAGE_INSTANCE (x); \ | 460 CHECK_IMAGE_INSTANCE (x); \ |
461 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \ | 461 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \ |
462 && !WIDGET_IMAGE_INSTANCEP (x)) \ | 462 && !WIDGET_IMAGE_INSTANCEP (x)) \ |
463 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \ | 463 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \ |
464 } while (0) | 464 } while (0) |
465 | 465 |
466 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \ | 466 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \ |
467 CHECK_IMAGE_INSTANCE (x); \ | 467 CHECK_IMAGE_INSTANCE (x); \ |
468 if (!WIDGET_IMAGE_INSTANCEP (x)) \ | 468 if (!WIDGET_IMAGE_INSTANCEP (x)) \ |
469 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \ | 469 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \ |
470 } while (0) | 470 } while (0) |
471 | 471 |
472 #define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \ | 472 #define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \ |
473 CHECK_IMAGE_INSTANCE (x); \ | 473 CHECK_IMAGE_INSTANCE (x); \ |
474 if (!LAYOUT_IMAGE_INSTANCEP (x)) \ | 474 if (!LAYOUT_IMAGE_INSTANCEP (x)) \ |
475 x = wrong_type_argument (Qlayout_image_instance_p, (x)); \ | 475 x = wrong_type_argument (Qlayout_image_instance_p, (x)); \ |
476 } while (0) | 476 } while (0) |
477 | 477 |
478 struct Lisp_Image_Instance | 478 struct Lisp_Image_Instance |
515 unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */ | 515 unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */ |
516 unsigned int v_resize : 1; /* Whether the vsize is allowed to change. */ | 516 unsigned int v_resize : 1; /* Whether the vsize is allowed to change. */ |
517 unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */ | 517 unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */ |
518 unsigned int orientation : 1; /* Vertical or horizontal. */ | 518 unsigned int orientation : 1; /* Vertical or horizontal. */ |
519 unsigned int justification : 2; /* Left, right or center. */ | 519 unsigned int justification : 2; /* Left, right or center. */ |
520 union | 520 /* Face for colors and font. We specify this here becuase we |
521 { | 521 want people to be able to put :face in the instantiator |
522 struct | 522 spec. Using gyph-face is more inconvenient, although more |
523 { | 523 general. */ |
524 /* Face for colors and font. We specify this here becuase we | 524 Lisp_Object face; |
525 want people to be able to put :face in the instantiator | 525 Lisp_Object type; |
526 spec. Using gyph-face is more inconvenient, although more | 526 Lisp_Object props; /* properties or border*/ |
527 general. */ | 527 Lisp_Object items; /* a list of gui_items or children */ |
528 Lisp_Object face; | |
529 Lisp_Object type; | |
530 Lisp_Object props; /* properties */ | |
531 Lisp_Object gui_item; /* a list of gui_items */ | |
532 } widget; /* widgets are subwindows */ | |
533 struct | |
534 { | |
535 Lisp_Object children; /* managed children */ | |
536 Lisp_Object border; /* Style of enclosing border or text. */ | |
537 } layout; | |
538 } s; | |
539 } subwindow; | 528 } subwindow; |
540 } u; | 529 } u; |
541 | 530 |
542 /* console-type- and image-type-specific data */ | 531 /* console-type- and image-type-specific data */ |
543 void *data; | 532 void *data; |
558 #define IMAGE_INSTANCE_TYPE(i) ((i)->type) | 547 #define IMAGE_INSTANCE_TYPE(i) ((i)->type) |
559 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) | 548 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) |
560 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) | 549 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) |
561 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width) | 550 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width) |
562 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) | 551 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) |
563 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ | 552 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ |
564 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ | 553 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ |
565 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) | 554 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) |
566 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) | 555 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) |
567 #define IMAGE_INSTANCE_FACE(i) \ | 556 #define IMAGE_INSTANCE_FACE(i) \ |
568 XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) | 557 XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) |
569 | 558 |
612 | 601 |
613 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ | 602 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ |
614 IMAGE_INSTANCE_WIDTH(i) | 603 IMAGE_INSTANCE_WIDTH(i) |
615 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ | 604 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ |
616 IMAGE_INSTANCE_HEIGHT(i) | 605 IMAGE_INSTANCE_HEIGHT(i) |
617 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type) | 606 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.type) |
618 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props) | 607 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.props) |
619 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \ | 608 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \ |
620 ((i)->u.subwindow.s.widget.face = f) | 609 ((i)->u.subwindow.face = f) |
621 #define IMAGE_INSTANCE_WIDGET_FACE(i) \ | 610 #define IMAGE_INSTANCE_WIDGET_FACE(i) \ |
622 (!NILP ((i)->u.subwindow.s.widget.face) ? (i)->u.subwindow.s.widget.face : \ | 611 (!NILP ((i)->u.subwindow.face) ? (i)->u.subwindow.face : \ |
623 !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \ | 612 !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \ |
624 Vwidget_face) | 613 Vwidget_face) |
625 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item) | 614 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.items) |
626 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \ | 615 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \ |
627 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ | 616 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ |
628 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ | 617 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ |
629 IMAGE_INSTANCE_WIDGET_ITEMS (i)) | 618 IMAGE_INSTANCE_WIDGET_ITEMS (i)) |
630 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name | 619 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name |
631 | 620 |
632 #define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.s.layout.children) | 621 #define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.items) |
633 #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.s.layout.border) | 622 #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.props) |
634 | 623 |
635 #define XIMAGE_INSTANCE_DEVICE(i) \ | 624 #define XIMAGE_INSTANCE_DEVICE(i) \ |
636 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) | 625 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) |
637 #define XIMAGE_INSTANCE_NAME(i) \ | 626 #define XIMAGE_INSTANCE_NAME(i) \ |
638 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) | 627 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) |
770 Lisp_Object image; /* the actual image */ | 759 Lisp_Object image; /* the actual image */ |
771 Lisp_Object contrib_p; /* whether to figure into line height */ | 760 Lisp_Object contrib_p; /* whether to figure into line height */ |
772 Lisp_Object baseline; /* percent above baseline */ | 761 Lisp_Object baseline; /* percent above baseline */ |
773 | 762 |
774 Lisp_Object face; /* if non-nil, face to use when displaying */ | 763 Lisp_Object face; /* if non-nil, face to use when displaying */ |
775 | 764 |
776 Lisp_Object plist; | 765 Lisp_Object plist; |
777 void (*after_change) (Lisp_Object glyph, Lisp_Object property, | 766 void (*after_change) (Lisp_Object glyph, Lisp_Object property, |
778 Lisp_Object locale); | 767 Lisp_Object locale); |
779 | 768 |
780 unsigned int dirty : 1; /* So that we can selectively | 769 unsigned int dirty : 1; /* So that we can selectively |
781 redisplay changed glyphs. */ | 770 redisplay changed glyphs. */ |
782 }; | 771 }; |
783 | 772 typedef struct Lisp_Glyph Lisp_Glyph; |
784 DECLARE_LRECORD (glyph, struct Lisp_Glyph); | 773 |
785 #define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph) | 774 DECLARE_LRECORD (glyph, Lisp_Glyph); |
775 #define XGLYPH(x) XRECORD (x, glyph, Lisp_Glyph) | |
786 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph) | 776 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph) |
787 #define GLYPHP(x) RECORDP (x, glyph) | 777 #define GLYPHP(x) RECORDP (x, glyph) |
788 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) | 778 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) |
789 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) | 779 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) |
790 | 780 |
856 Lisp_Object allocate_glyph (enum glyph_type type, | 846 Lisp_Object allocate_glyph (enum glyph_type type, |
857 void (*after_change) (Lisp_Object glyph, | 847 void (*after_change) (Lisp_Object glyph, |
858 Lisp_Object property, | 848 Lisp_Object property, |
859 Lisp_Object locale)); | 849 Lisp_Object locale)); |
860 void query_string_geometry ( Lisp_Object string, Lisp_Object face, | 850 void query_string_geometry ( Lisp_Object string, Lisp_Object face, |
861 unsigned int* width, unsigned int* height, | 851 unsigned int* width, unsigned int* height, |
862 unsigned int* descent, Lisp_Object domain); | 852 unsigned int* descent, Lisp_Object domain); |
863 Lisp_Object query_string_font (Lisp_Object string, | 853 Lisp_Object query_string_font (Lisp_Object string, |
864 Lisp_Object face, Lisp_Object domain); | 854 Lisp_Object face, Lisp_Object domain); |
865 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); | 855 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); |
866 void disable_glyph_animated_timeout (int i); | 856 void disable_glyph_animated_timeout (int i); |
867 | 857 |
868 /************************************************************************/ | 858 /************************************************************************/ |
964 }; | 954 }; |
965 | 955 |
966 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height); | 956 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height); |
967 extern int hold_ignored_expose_registration; | 957 extern int hold_ignored_expose_registration; |
968 | 958 |
969 #endif /* _XEMACS_GLYPHS_H_ */ | 959 #endif /* INCLUDED_glyphs_h_ */ |