Mercurial > hg > xemacs-beta
comparison src/glyphs.h @ 438:84b14dcb0985 r21-2-27
Import from CVS: tag r21-2-27
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:32:25 +0200 |
parents | 9d177e8d4150 |
children | 8de8e3f6228a |
comparison
equal
deleted
inserted
replaced
437:e2a4e8b94b82 | 438:84b14dcb0985 |
---|---|
82 Dynarr_declare (ii_keyword_entry); | 82 Dynarr_declare (ii_keyword_entry); |
83 } ii_keyword_entry_dynarr; | 83 } ii_keyword_entry_dynarr; |
84 | 84 |
85 extern const struct struct_description iim_description; | 85 extern const struct struct_description iim_description; |
86 | 86 |
87 enum image_instance_geometry | |
88 { | |
89 IMAGE_GEOMETRY, | |
90 IMAGE_DESIRED_GEOMETRY, | |
91 IMAGE_MIN_GEOMETRY, | |
92 IMAGE_MAX_GEOMETRY, | |
93 IMAGE_UNSPECIFIED_GEOMETRY = ~0 | |
94 }; | |
95 | |
96 #define WIDGET_BORDER_HEIGHT 4 | |
97 #define WIDGET_BORDER_WIDTH 4 | |
98 | |
87 struct image_instantiator_methods | 99 struct image_instantiator_methods |
88 { | 100 { |
89 Lisp_Object symbol; | 101 Lisp_Object symbol; |
90 | 102 |
91 Lisp_Object device; /* sometimes used */ | 103 Lisp_Object device; /* sometimes used */ |
130 properties. */ | 142 properties. */ |
131 Lisp_Object (*set_property_method) (Lisp_Object image_instance, | 143 Lisp_Object (*set_property_method) (Lisp_Object image_instance, |
132 Lisp_Object property, | 144 Lisp_Object property, |
133 Lisp_Object val); | 145 Lisp_Object val); |
134 | 146 |
135 /* Find out the geometry of this image instance. */ | 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 | |
149 image instance. */ | |
136 void (*query_geometry_method) (Lisp_Object image_instance, | 150 void (*query_geometry_method) (Lisp_Object image_instance, |
137 int* width, int* height, int disp); | 151 unsigned int* width, unsigned int* height, |
138 | 152 enum image_instance_geometry disp, |
139 /* Layout the instances children. */ | 153 Lisp_Object domain); |
140 void (*layout_children_method) (Lisp_Object image_instance); | 154 |
155 /* Layout the instance and its children bounded by the provided | |
156 dimensions. */ | |
157 void (*layout_method) (Lisp_Object image_instance, | |
158 unsigned int width, unsigned int height, | |
159 Lisp_Object domain); | |
141 }; | 160 }; |
142 | 161 |
143 /***** Calling an image-instantiator method *****/ | 162 /***** Calling an image-instantiator method *****/ |
144 | 163 |
145 #define HAS_IIFORMAT_METH_P(mstruc, m) (((mstruc)->m##_method) != 0) | 164 #define HAS_IIFORMAT_METH_P(mstruc, m) (((mstruc)->m##_method) != 0) |
304 | 323 |
305 void initialize_subwindow_image_instance (struct Lisp_Image_Instance*); | 324 void initialize_subwindow_image_instance (struct Lisp_Image_Instance*); |
306 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 325 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
307 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 326 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
308 int dest_mask, Lisp_Object domain); | 327 int dest_mask, Lisp_Object domain); |
309 void widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, | 328 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
310 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 329 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
311 int dest_mask, Lisp_Object domain, int default_textheight, | 330 int dest_mask, Lisp_Object domain); |
312 int default_pixheight, int default_textwidth); | 331 void image_instance_query_geometry (Lisp_Object image_instance, |
332 unsigned int* width, unsigned int* height, | |
333 enum image_instance_geometry disp, | |
334 Lisp_Object domain); | |
335 void image_instance_layout (Lisp_Object image_instance, | |
336 unsigned int width, unsigned int height, | |
337 Lisp_Object domain); | |
313 | 338 |
314 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, | 339 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, |
315 int given_dest_mask, | 340 int given_dest_mask, |
316 int desired_dest_mask)); | 341 int desired_dest_mask)); |
317 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object)); | 342 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object)); |
368 IMAGE_COLOR_PIXMAP, | 393 IMAGE_COLOR_PIXMAP, |
369 IMAGE_POINTER, | 394 IMAGE_POINTER, |
370 IMAGE_SUBWINDOW, | 395 IMAGE_SUBWINDOW, |
371 IMAGE_WIDGET, | 396 IMAGE_WIDGET, |
372 IMAGE_LAYOUT | 397 IMAGE_LAYOUT |
373 }; | |
374 | |
375 enum image_instance_geometry | |
376 { | |
377 IMAGE_GEOMETRY, | |
378 IMAGE_DESIRED_GEOMETRY, | |
379 IMAGE_MIN_GEOMETRY, | |
380 IMAGE_MAX_GEOMETRY | |
381 }; | 398 }; |
382 | 399 |
383 #define IMAGE_NOTHING_MASK (1 << 0) | 400 #define IMAGE_NOTHING_MASK (1 << 0) |
384 #define IMAGE_TEXT_MASK (1 << 1) | 401 #define IMAGE_TEXT_MASK (1 << 1) |
385 #define IMAGE_MONO_PIXMAP_MASK (1 << 2) | 402 #define IMAGE_MONO_PIXMAP_MASK (1 << 2) |
461 struct Lisp_Image_Instance | 478 struct Lisp_Image_Instance |
462 { | 479 { |
463 struct lcrecord_header header; | 480 struct lcrecord_header header; |
464 Lisp_Object device; | 481 Lisp_Object device; |
465 Lisp_Object name; | 482 Lisp_Object name; |
483 /* The glyph from which we were instantiated. This is a weak | |
484 reference. */ | |
485 Lisp_Object glyph; | |
466 enum image_instance_type type; | 486 enum image_instance_type type; |
467 unsigned int x_offset, y_offset; /* for layout purposes */ | 487 unsigned int x_offset, y_offset; /* for layout purposes */ |
468 unsigned int width, height; | 488 unsigned int width, height; |
469 unsigned int dirty : 1; | 489 unsigned int dirty : 1; |
470 union | 490 union |
491 struct | 511 struct |
492 { | 512 { |
493 Lisp_Object frame; | 513 Lisp_Object frame; |
494 void* subwindow; /* specific devices can use this as necessary */ | 514 void* subwindow; /* specific devices can use this as necessary */ |
495 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. */ | |
517 unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */ | |
518 unsigned int orientation : 1; /* Vertical or horizontal. */ | |
519 unsigned int justification : 2; /* Left, right or center. */ | |
496 union | 520 union |
497 { | 521 { |
498 struct | 522 struct |
499 { | 523 { |
500 Lisp_Object face; /* foreground and background colors */ | 524 /* Face for colors and font. We specify this here becuase we |
525 want people to be able to put :face in the instantiator | |
526 spec. Using gyph-face is more inconvenient, although more | |
527 general. */ | |
528 Lisp_Object face; | |
501 Lisp_Object type; | 529 Lisp_Object type; |
502 Lisp_Object props; /* properties */ | 530 Lisp_Object props; /* properties */ |
503 Lisp_Object gui_item; /* a list of gui_items */ | 531 Lisp_Object gui_item; /* a list of gui_items */ |
504 } widget; /* widgets are subwindows */ | 532 } widget; /* widgets are subwindows */ |
505 struct | 533 struct |
513 | 541 |
514 /* console-type- and image-type-specific data */ | 542 /* console-type- and image-type-specific data */ |
515 void *data; | 543 void *data; |
516 }; | 544 }; |
517 | 545 |
546 /* Layout bit-fields. */ | |
547 #define LAYOUT_HORIZONTAL 0 | |
548 #define LAYOUT_VERTICAL 1 | |
549 | |
550 #define LAYOUT_JUSTIFY_LEFT 0 | |
551 #define LAYOUT_JUSTIFY_RIGHT 1 | |
552 #define LAYOUT_JUSTIFY_CENTER 2 | |
553 | |
554 /* Accessor macros. */ | |
518 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) | 555 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) |
519 #define IMAGE_INSTANCE_NAME(i) ((i)->name) | 556 #define IMAGE_INSTANCE_NAME(i) ((i)->name) |
557 #define IMAGE_INSTANCE_GLYPH(i) ((i)->glyph) | |
520 #define IMAGE_INSTANCE_TYPE(i) ((i)->type) | 558 #define IMAGE_INSTANCE_TYPE(i) ((i)->type) |
521 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) | 559 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) |
522 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) | 560 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) |
523 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width) | 561 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width) |
524 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) | 562 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) |
525 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ | 563 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ |
526 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ | 564 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ |
527 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) | 565 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) |
528 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) | 566 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) |
567 #define IMAGE_INSTANCE_FACE(i) \ | |
568 XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) | |
529 | 569 |
530 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) | 570 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) |
531 #define IMAGE_INSTANCE_TEXT_WIDTH(i) \ | 571 #define IMAGE_INSTANCE_TEXT_WIDTH(i) \ |
532 IMAGE_INSTANCE_WIDTH(i) | 572 IMAGE_INSTANCE_WIDTH(i) |
533 #define IMAGE_INSTANCE_TEXT_HEIGHT(i) \ | 573 #define IMAGE_INSTANCE_TEXT_HEIGHT(i) \ |
534 IMAGE_INSTANCE_HEIGHT(i) | 574 IMAGE_INSTANCE_HEIGHT(i) |
535 #define IMAGE_INSTANCE_TEXT_DESCENT(i) ((i)->u.text.descent) | 575 #define IMAGE_INSTANCE_TEXT_DESCENT(i) ((i)->u.text.descent) |
576 #define IMAGE_INSTANCE_TEXT_ASCENT(i) \ | |
577 (IMAGE_INSTANCE_TEXT_HEIGHT(i) - IMAGE_INSTANCE_TEXT_DESCENT(i)) | |
536 | 578 |
537 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) \ | 579 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) \ |
538 IMAGE_INSTANCE_WIDTH(i) | 580 IMAGE_INSTANCE_WIDTH(i) |
539 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) \ | 581 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) \ |
540 IMAGE_INSTANCE_HEIGHT(i) | 582 IMAGE_INSTANCE_HEIGHT(i) |
557 IMAGE_INSTANCE_HEIGHT(i) | 599 IMAGE_INSTANCE_HEIGHT(i) |
558 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow) | 600 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow) |
559 #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame) | 601 #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame) |
560 #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ | 602 #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ |
561 ((i)->u.subwindow.being_displayed) | 603 ((i)->u.subwindow.being_displayed) |
604 #define IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP(i) \ | |
605 ((i)->u.subwindow.v_resize) | |
606 #define IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP(i) \ | |
607 ((i)->u.subwindow.h_resize) | |
608 #define IMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \ | |
609 ((i)->u.subwindow.orientation) | |
610 #define IMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \ | |
611 ((i)->u.subwindow.justification) | |
562 | 612 |
563 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ | 613 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ |
564 IMAGE_INSTANCE_WIDTH(i) | 614 IMAGE_INSTANCE_WIDTH(i) |
565 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ | 615 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ |
566 IMAGE_INSTANCE_HEIGHT(i) | 616 IMAGE_INSTANCE_HEIGHT(i) |
567 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type) | 617 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type) |
568 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props) | 618 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props) |
569 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.s.widget.face) | 619 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \ |
620 ((i)->u.subwindow.s.widget.face = f) | |
621 #define IMAGE_INSTANCE_WIDGET_FACE(i) \ | |
622 (!NILP ((i)->u.subwindow.s.widget.face) ? (i)->u.subwindow.s.widget.face : \ | |
623 !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \ | |
624 Vwidget_face) | |
570 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item) | 625 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item) |
571 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \ | 626 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \ |
572 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ | 627 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ |
573 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ | 628 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ |
574 IMAGE_INSTANCE_WIDGET_ITEMS (i)) | 629 IMAGE_INSTANCE_WIDGET_ITEMS (i)) |
579 | 634 |
580 #define XIMAGE_INSTANCE_DEVICE(i) \ | 635 #define XIMAGE_INSTANCE_DEVICE(i) \ |
581 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) | 636 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) |
582 #define XIMAGE_INSTANCE_NAME(i) \ | 637 #define XIMAGE_INSTANCE_NAME(i) \ |
583 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) | 638 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) |
639 #define XIMAGE_INSTANCE_GLYPH(i) \ | |
640 IMAGE_INSTANCE_GLYPH (XIMAGE_INSTANCE (i)) | |
584 #define XIMAGE_INSTANCE_TYPE(i) \ | 641 #define XIMAGE_INSTANCE_TYPE(i) \ |
585 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i)) | 642 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i)) |
586 #define XIMAGE_INSTANCE_XOFFSET(i) \ | 643 #define XIMAGE_INSTANCE_XOFFSET(i) \ |
587 IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i)) | 644 IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i)) |
588 #define XIMAGE_INSTANCE_YOFFSET(i) \ | 645 #define XIMAGE_INSTANCE_YOFFSET(i) \ |
589 IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i)) | 646 IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i)) |
590 #define XIMAGE_INSTANCE_DIRTYP(i) \ | 647 #define XIMAGE_INSTANCE_DIRTYP(i) \ |
591 IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i)) | 648 IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i)) |
649 #define XIMAGE_INSTANCE_WIDTH(i) \ | |
650 IMAGE_INSTANCE_WIDTH (XIMAGE_INSTANCE (i)) | |
651 #define XIMAGE_INSTANCE_HEIGHT(i) \ | |
652 IMAGE_INSTANCE_HEIGHT (XIMAGE_INSTANCE (i)) | |
653 #define XIMAGE_INSTANCE_FACE(i) \ | |
654 IMAGE_INSTANCE_FACE (XIMAGE_INSTANCE (i)) | |
592 | 655 |
593 #define XIMAGE_INSTANCE_TEXT_STRING(i) \ | 656 #define XIMAGE_INSTANCE_TEXT_STRING(i) \ |
594 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i)) | 657 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i)) |
658 #define XIMAGE_INSTANCE_TEXT_WIDTH(i) \ | |
659 IMAGE_INSTANCE_TEXT_WIDTH (XIMAGE_INSTANCE (i)) | |
660 #define XIMAGE_INSTANCE_TEXT_HEIGHT(i) \ | |
661 IMAGE_INSTANCE_TEXT_HEIGHT (XIMAGE_INSTANCE (i)) | |
662 #define XIMAGE_INSTANCE_TEXT_ASCENT(i) \ | |
663 IMAGE_INSTANCE_TEXT_ASCENT (XIMAGE_INSTANCE (i)) | |
664 #define XIMAGE_INSTANCE_TEXT_DESCENT(i) \ | |
665 IMAGE_INSTANCE_TEXT_DESCENT (XIMAGE_INSTANCE (i)) | |
595 | 666 |
596 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \ | 667 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \ |
597 IMAGE_INSTANCE_PIXMAP_WIDTH (XIMAGE_INSTANCE (i)) | 668 IMAGE_INSTANCE_PIXMAP_WIDTH (XIMAGE_INSTANCE (i)) |
598 #define XIMAGE_INSTANCE_PIXMAP_HEIGHT(i) \ | 669 #define XIMAGE_INSTANCE_PIXMAP_HEIGHT(i) \ |
599 IMAGE_INSTANCE_PIXMAP_HEIGHT (XIMAGE_INSTANCE (i)) | 670 IMAGE_INSTANCE_PIXMAP_HEIGHT (XIMAGE_INSTANCE (i)) |
628 IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i)) | 699 IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i)) |
629 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \ | 700 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \ |
630 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i)) | 701 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i)) |
631 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \ | 702 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \ |
632 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) | 703 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) |
704 #define XSET_IMAGE_INSTANCE_WIDGET_FACE(i) \ | |
705 SET_IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) | |
633 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \ | 706 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \ |
634 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) | 707 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) |
635 #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \ | 708 #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \ |
636 IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i)) | 709 IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i)) |
637 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ | 710 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ |
650 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i)) | 723 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i)) |
651 #define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \ | 724 #define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \ |
652 IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i)) | 725 IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i)) |
653 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ | 726 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ |
654 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i)) | 727 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i)) |
728 #define XIMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \ | |
729 IMAGE_INSTANCE_SUBWINDOW_ORIENT (XIMAGE_INSTANCE (i)) | |
730 #define XIMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \ | |
731 IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (XIMAGE_INSTANCE (i)) | |
655 | 732 |
656 #define MARK_IMAGE_INSTANCE_CHANGED(i) \ | 733 #define MARK_IMAGE_INSTANCE_CHANGED(i) \ |
657 (IMAGE_INSTANCE_DIRTYP (i) = 1); | 734 (IMAGE_INSTANCE_DIRTYP (i) = 1); |
658 | 735 |
659 #ifdef HAVE_XPM | 736 #ifdef HAVE_XPM |
756 extern Lisp_Object Q_orientation; | 833 extern Lisp_Object Q_orientation; |
757 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; | 834 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; |
758 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; | 835 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; |
759 extern Lisp_Object Vxemacs_logo; | 836 extern Lisp_Object Vxemacs_logo; |
760 | 837 |
761 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object frame_face, | 838 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object domain); |
762 face_index window_findex, | 839 unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object domain); |
763 Lisp_Object window); | 840 unsigned short glyph_descent (Lisp_Object glyph, Lisp_Object domain); |
764 unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object frame_face, | 841 unsigned short glyph_height (Lisp_Object glyph, Lisp_Object domain); |
765 face_index window_findex, | |
766 Lisp_Object window); | |
767 unsigned short glyph_descent (Lisp_Object glyph, | |
768 Lisp_Object frame_face, | |
769 face_index window_findex, | |
770 Lisp_Object window); | |
771 unsigned short glyph_height (Lisp_Object glyph, Lisp_Object frame_face, | |
772 face_index window_findex, | |
773 Lisp_Object window); | |
774 Lisp_Object glyph_baseline (Lisp_Object glyph, Lisp_Object domain); | 842 Lisp_Object glyph_baseline (Lisp_Object glyph, Lisp_Object domain); |
775 Lisp_Object glyph_face (Lisp_Object glyph, Lisp_Object domain); | 843 Lisp_Object glyph_face (Lisp_Object glyph, Lisp_Object domain); |
776 int glyph_contrib_p (Lisp_Object glyph, Lisp_Object domain); | 844 int glyph_contrib_p (Lisp_Object glyph, Lisp_Object domain); |
777 Lisp_Object glyph_image_instance (Lisp_Object glyph, | 845 Lisp_Object glyph_image_instance (Lisp_Object glyph, |
778 Lisp_Object domain, | 846 Lisp_Object domain, |
787 int dest_mask, Lisp_Object domain); | 855 int dest_mask, Lisp_Object domain); |
788 Lisp_Object allocate_glyph (enum glyph_type type, | 856 Lisp_Object allocate_glyph (enum glyph_type type, |
789 void (*after_change) (Lisp_Object glyph, | 857 void (*after_change) (Lisp_Object glyph, |
790 Lisp_Object property, | 858 Lisp_Object property, |
791 Lisp_Object locale)); | 859 Lisp_Object locale)); |
792 Lisp_Object widget_face_font_info (Lisp_Object domain, Lisp_Object face, | 860 void query_string_geometry ( Lisp_Object string, Lisp_Object face, |
793 int *height, int *width); | 861 unsigned int* width, unsigned int* height, |
794 void widget_text_to_pixel_conversion (Lisp_Object domain, Lisp_Object face, | 862 unsigned int* descent, Lisp_Object domain); |
795 int th, int tw, | 863 Lisp_Object query_string_font (Lisp_Object string, |
796 int* height, int* width); | 864 Lisp_Object face, Lisp_Object domain); |
797 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); | 865 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); |
798 void disable_glyph_animated_timeout (int i); | 866 void disable_glyph_animated_timeout (int i); |
799 | 867 |
800 /************************************************************************/ | 868 /************************************************************************/ |
801 /* Glyph Cachels */ | 869 /* Glyph Cachels */ |
866 * that we known when to unmap them */ | 934 * that we known when to unmap them */ |
867 typedef struct subwindow_cachel subwindow_cachel; | 935 typedef struct subwindow_cachel subwindow_cachel; |
868 struct subwindow_cachel | 936 struct subwindow_cachel |
869 { | 937 { |
870 Lisp_Object subwindow; | 938 Lisp_Object subwindow; |
871 int x, y; | 939 unsigned int x, y; |
872 int width, height; | 940 unsigned int width, height; |
873 unsigned int being_displayed : 1; | 941 unsigned int being_displayed : 1; |
874 unsigned int updated : 1; | 942 unsigned int updated : 1; |
875 }; | 943 }; |
876 | 944 |
877 typedef struct | 945 typedef struct |
888 void update_frame_subwindows (struct frame *f); | 956 void update_frame_subwindows (struct frame *f); |
889 int find_matching_subwindow (struct frame* f, int x, int y, int width, int height); | 957 int find_matching_subwindow (struct frame* f, int x, int y, int width, int height); |
890 | 958 |
891 struct expose_ignore | 959 struct expose_ignore |
892 { | 960 { |
893 int x; | 961 unsigned int x, y; |
894 int y; | 962 unsigned int width, height; |
895 int width; | |
896 int height; | |
897 struct expose_ignore *next; | 963 struct expose_ignore *next; |
898 }; | 964 }; |
899 | 965 |
900 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height); | 966 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height); |
901 extern int hold_ignored_expose_registration; | 967 extern int hold_ignored_expose_registration; |