annotate src/glyphs.h @ 5157:1fae11d56ad2

redo memory-usage mechanism, add way of dynamically initializing Lisp objects -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2010-03-18 Ben Wing <ben@xemacs.org> * diagnose.el (show-memory-usage): Rewrite to take into account API changes in memory-usage functions. src/ChangeLog addition: 2010-03-18 Ben Wing <ben@xemacs.org> * alloc.c: * alloc.c (disksave_object_finalization_1): * alloc.c (lisp_object_storage_size): * alloc.c (listu): * alloc.c (listn): * alloc.c (Fobject_memory_usage_stats): * alloc.c (compute_memusage_stats_length): * alloc.c (Fobject_memory_usage): * alloc.c (Ftotal_object_memory_usage): * alloc.c (malloced_storage_size): * alloc.c (common_init_alloc_early): * alloc.c (reinit_alloc_objects_early): * alloc.c (reinit_alloc_early): * alloc.c (init_alloc_once_early): * alloc.c (syms_of_alloc): * alloc.c (reinit_vars_of_alloc): * buffer.c: * buffer.c (struct buffer_stats): * buffer.c (compute_buffer_text_usage): * buffer.c (compute_buffer_usage): * buffer.c (buffer_memory_usage): * buffer.c (buffer_objects_create): * buffer.c (syms_of_buffer): * buffer.c (vars_of_buffer): * console-impl.h (struct console_methods): * dynarr.c (Dynarr_memory_usage): * emacs.c (main_1): * events.c (clear_event_resource): * extents.c: * extents.c (compute_buffer_extent_usage): * extents.c (extent_objects_create): * extents.h: * faces.c: * faces.c (compute_face_cachel_usage): * faces.c (face_objects_create): * faces.h: * general-slots.h: * glyphs.c: * glyphs.c (compute_glyph_cachel_usage): * glyphs.c (glyph_objects_create): * glyphs.h: * lisp.h: * lisp.h (struct usage_stats): * lrecord.h: * lrecord.h (enum lrecord_type): * lrecord.h (struct lrecord_implementation): * lrecord.h (MC_ALLOC_CALL_FINALIZER_FOR_DISKSAVE): * lrecord.h (DEFINE_DUMPABLE_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_SIZABLE_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_SIZABLE_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_SIZABLE_INTERNAL_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_SIZABLE_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_SIZABLE_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_INTERNAL_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_SIZABLE_INTERNAL_LISP_OBJECT): * lrecord.h (MAKE_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_MODULE_LISP_OBJECT): * lrecord.h (DEFINE_DUMPABLE_MODULE_SIZABLE_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_MODULE_LISP_OBJECT): * lrecord.h (DEFINE_NODUMP_MODULE_SIZABLE_LISP_OBJECT): * lrecord.h (MAKE_MODULE_LISP_OBJECT): * lrecord.h (INIT_LISP_OBJECT): * lrecord.h (INIT_MODULE_LISP_OBJECT): * lrecord.h (UNDEF_LISP_OBJECT): * lrecord.h (UNDEF_MODULE_LISP_OBJECT): * lrecord.h (DECLARE_LISP_OBJECT): * lrecord.h (DECLARE_MODULE_API_LISP_OBJECT): * lrecord.h (DECLARE_MODULE_LISP_OBJECT): * lstream.c: * lstream.c (syms_of_lstream): * lstream.c (vars_of_lstream): * marker.c: * marker.c (compute_buffer_marker_usage): * mc-alloc.c (mc_alloced_storage_size): * mc-alloc.h: * mule-charset.c: * mule-charset.c (struct charset_stats): * mule-charset.c (compute_charset_usage): * mule-charset.c (charset_memory_usage): * mule-charset.c (mule_charset_objects_create): * mule-charset.c (syms_of_mule_charset): * mule-charset.c (vars_of_mule_charset): * redisplay.c: * redisplay.c (compute_rune_dynarr_usage): * redisplay.c (compute_display_block_dynarr_usage): * redisplay.c (compute_glyph_block_dynarr_usage): * redisplay.c (compute_display_line_dynarr_usage): * redisplay.c (compute_line_start_cache_dynarr_usage): * redisplay.h: * scrollbar-gtk.c (gtk_compute_scrollbar_instance_usage): * scrollbar-msw.c (mswindows_compute_scrollbar_instance_usage): * scrollbar-x.c (x_compute_scrollbar_instance_usage): * scrollbar.c (compute_scrollbar_instance_usage): * scrollbar.h: * symbols.c: * symbols.c (reinit_symbol_objects_early): * symbols.c (init_symbols_once_early): * symbols.c (reinit_symbols_early): * symbols.c (defsymbol_massage_name_1): * symsinit.h: * ui-gtk.c: * ui-gtk.c (emacs_gtk_object_getprop): * ui-gtk.c (emacs_gtk_object_putprop): * ui-gtk.c (ui_gtk_objects_create): * unicode.c (compute_from_unicode_table_size_1): * unicode.c (compute_to_unicode_table_size_1): * unicode.c (compute_from_unicode_table_size): * unicode.c (compute_to_unicode_table_size): * window.c: * window.c (struct window_stats): * window.c (compute_window_mirror_usage): * window.c (compute_window_usage): * window.c (window_memory_usage): * window.c (window_objects_create): * window.c (syms_of_window): * window.c (vars_of_window): * window.h: Redo memory-usage mechanism, make it general; add way of dynamically initializing Lisp object types -- OBJECT_HAS_METHOD(), similar to CONSOLE_HAS_METHOD(). (1) Create OBJECT_HAS_METHOD(), OBJECT_HAS_PROPERTY() etc. for specifying that a Lisp object type has a particular method or property. Call such methods with OBJECT_METH, MAYBE_OBJECT_METH, OBJECT_METH_OR_GIVEN; retrieve properties with OBJECT_PROPERTY. Methods that formerly required a DEFINE_*GENERAL_LISP_OBJECT() to specify them (getprop, putprop, remprop, plist, disksave) now instead use the dynamic-method mechanism. The main benefit of this is that new methods or properties can be added without requiring that the declaration statements of all existing methods be modified. We have to make the `struct lrecord_implementation' non-const, but I don't think this should have any effect on speed -- the only possible method that's really speed-critical is the mark method, and we already extract those out into a separate (non-const) array for increased cache locality. Object methods need to be reinitialized after pdump, so we put them in separate functions such as face_objects_create(), extent_objects_create() and call them appropriately from emacs.c The only current object property (`memusage_stats_list') that objects can specify is a Lisp object and gets staticpro()ed so it only needs to be set during dump time, but because it references symbols that might not exist in a syms_of_() function, we initialize it in vars_of_(). There is also an object property (`num_extra_memusage_stats') that is automatically initialized based on `memusage_stats_list'; we do that in reinit_vars_of_alloc(), which is called after all vars_of_() functions are called. `disksaver' method was renamed `disksave' to correspond with the name normally given to the function (e.g. disksave_lstream()). (2) Generalize the memory-usage mechanism in `buffer-memory-usage', `window-memory-usage', `charset-memory-usage' into an object-type- specific mechanism called by a single function `object-memory-usage'. (Former function `object-memory-usage' renamed to `total-object-memory-usage'). Generalize the mechanism of different "slices" so that we can have different "classes" of memory described and different "slices" onto each class; `t' separates classes, `nil' separates slices. Currently we have three classes defined: the memory of an object itself, non-Lisp-object memory associated with the object (e.g. arrays or dynarrs stored as fields in the object), and Lisp-object memory associated with the object (other internal Lisp objects stored in the object). This isn't completely finished yet and we might need to further separate the "other internal Lisp objects" class into two classes. The memory-usage mechanism uses a `struct usage_stats' (renamed from `struct overhead_stats') to describe a malloc-view onto a set of allocated memory (listing how much was requested and various types of overhead) and a more general `struct generic_usage_stats' (with a `struct usage_stats' in it) to hold all statistics about object memory. `struct generic_usage_stats' contains an array of 32 Bytecounts, which are statistics of unspecified semantics. The intention is that individual types declare a corresponding struct (e.g. `struct window_stats') with the same structure but with specific fields in place of the array, corresponding to specific statistics. The number of such statistics is an object property computed from the list of tags (Lisp symbols describing the statistics) stored in `memusage_stats_list'. The idea here is to allow particular object types to customize the number and semantics of the statistics where completely avoiding consing. This doesn't matter so much yet, but the intention is to have the memory usage of all objects computed at the end of GC, at the same time as other statistics are currently computed. The values for all statistics for a single type would be added up to compute aggregate values for all objects of a specific type. To make this efficient, we can't allow any memory allocation at all. (3) Create some additional functions for creating lists that specify the elements directly as args rather than indirectly through an array: listn() (number of args given), listu() (list terminated by Qunbound). (4) Delete a bit of remaining unused C window_config stuff, also unused lrecord_type_popup_data.
author Ben Wing <ben@xemacs.org>
date Thu, 18 Mar 2010 10:50:06 -0500
parents a9c41067dd88
children 18c0b5909d16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
1 /* Generic glyph data structures + display tables
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1994 Board of Trustees, University of Illinois.
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
3 Copyright (C) 1995, 1996, 2002 Ben Wing
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
24 #ifndef INCLUDED_glyphs_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
25 #define INCLUDED_glyphs_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 #include "specifier.h"
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
28 #include "window-impl.h" /* need for GLYPH_CACHEL_WIDTH */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 /* Image Instantiators */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 struct image_instantiator_methods;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 /* Remember the distinction between image instantiator formats and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 image instance types. Here's an approximate mapping:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 image instantiator format image instance type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 ------------------------- -------------------
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 nothing nothing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 string text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 formatted-string text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 xbm mono-pixmap, color-pixmap, pointer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 xpm color-pixmap, mono-pixmap, pointer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 xface mono-pixmap, color-pixmap, pointer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 gif color-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 jpeg color-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 png color-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 tiff color-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 bmp color-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 cursor-font pointer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
53 mswindows-resource pointer, color-pixmap
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 font pointer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 subwindow subwindow
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 inherit mono-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 autodetect mono-pixmap, color-pixmap, pointer, text
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
58 button widget
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 edit-field widget
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
60 combo-box widget
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 progress-gauge widget
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 tab-control widget
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 tree-view widget
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 scrollbar widget
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
65 label widget
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
66 layout widget
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
67 native-layout widget
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 /* These are methods specific to a particular format of image instantiator
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 (e.g. xpm, string, etc.). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 typedef struct ii_keyword_entry ii_keyword_entry;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 struct ii_keyword_entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 Lisp_Object keyword;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 void (*validate) (Lisp_Object data);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 int multiple_p;
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
79 int copy_p;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 typedef struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 Dynarr_declare (ii_keyword_entry);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 } ii_keyword_entry_dynarr;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
87 extern const struct sized_memory_description iim_description;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
89 enum image_instance_geometry
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
90 {
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
91 IMAGE_GEOMETRY,
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
92 IMAGE_DESIRED_GEOMETRY,
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
93 IMAGE_MIN_GEOMETRY,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
94 IMAGE_MAX_GEOMETRY
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
95 };
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
96
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
97 #define IMAGE_UNSPECIFIED_GEOMETRY -1
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
98 #define IMAGE_UNCHANGED_GEOMETRY -2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
99
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
100 #define DEFAULT_WIDGET_BORDER_WIDTH 2
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
101 #define DEFAULT_WIDGET_SPACING 3
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
102 #define DEFAULT_WIDGET_SHADOW_WIDTH 2
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
103
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
104 enum governing_domain
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
105 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
106 GOVERNING_DOMAIN_WINDOW,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
107 GOVERNING_DOMAIN_FRAME,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
108 GOVERNING_DOMAIN_DEVICE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
109 };
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
110
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 struct image_instantiator_methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 Lisp_Object symbol;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 Lisp_Object device; /* sometimes used */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 ii_keyword_entry_dynarr *keywords;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 /* consoles this ii is supported on */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 console_type_entry_dynarr *consoles;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 /* Implementation specific methods: */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 /* Validate method: Given an instantiator vector, signal an error if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 it's invalid for this image-instantiator format. Note that this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 validation only occurs after all the keyword-specific validation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 has already been performed. This is chiefly useful for making
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 sure that certain required keywords are present. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 void (*validate_method) (Lisp_Object instantiator);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 /* Normalize method: Given an instantiator, convert it to the form
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 that should be used in a glyph, for devices of type CONSOLE_TYPE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 Signal an error if conversion fails. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 Lisp_Object (*normalize_method) (Lisp_Object instantiator,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
133 Lisp_Object console_type,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
134 Lisp_Object dest_mask);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
135
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
136 /* Governing domain method: Return an int indicating what type of
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
137 domain an instance in this format is governed by. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
138 int (*governing_domain_method) (void);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 /* Possible-dest-types method: Return a mask indicating what dest types
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 are compatible with this format. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 int (*possible_dest_types_method) (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 /* Instantiate method: Given an instantiator and a partially
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 filled-in image instance, complete the filling-in. Return
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 non-zero if the instantiation succeeds, 0 if it fails.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 This must be present. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 void (*instantiate_method) (Lisp_Object image_instance,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 Lisp_Object instantiator,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 Lisp_Object pointer_fg,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 Lisp_Object pointer_bg,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 int dest_mask,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 Lisp_Object domain);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
154 /* Post instantiate method: finish instantiation of the image
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
155 instance. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
156 void (*post_instantiate_method) (Lisp_Object image_instance,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
157 Lisp_Object instantiator,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
158 Lisp_Object domain);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 /* Property method: Given an image instance, return device specific
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 properties. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 Lisp_Object (*property_method) (Lisp_Object image_instance,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 Lisp_Object property);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 /* Set-property method: Given an image instance, set device specific
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 properties. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 Lisp_Object (*set_property_method) (Lisp_Object image_instance,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 Lisp_Object property,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 Lisp_Object val);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
168 /* Asynchronously update properties. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
169 void (*update_method) (Lisp_Object image_instance,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
170 Lisp_Object instantiator);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
171 void (*redisplay_method) (Lisp_Object image_instance);
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
172
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
173 /* Find out the desired geometry, as given by disp, of this image
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
174 instance. Actual geometry is stored in the appropriate slots in the
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
175 image instance. */
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
176 void (*query_geometry_method) (Lisp_Object image_instance,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
177 int* width, int* height,
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
178 enum image_instance_geometry disp,
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
179 Lisp_Object domain);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
180
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
181 /* Layout the instance and its children bounded by the provided
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
182 dimensions. Returns success or failure. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
183 int (*layout_method) (Lisp_Object image_instance,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
184 int width, int height, int xoffset, int yoffset,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
185 Lisp_Object domain);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 /***** Calling an image-instantiator method *****/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 #define HAS_IIFORMAT_METH_P(mstruc, m) (((mstruc)->m##_method) != 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 #define IIFORMAT_METH(mstruc, m, args) (((mstruc)->m##_method) args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 /* Call a void-returning specifier method, if it exists */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 #define MAYBE_IIFORMAT_METH(mstruc, m, args) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 struct image_instantiator_methods *MIM_mstruc = (mstruc); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 if (MIM_mstruc && HAS_IIFORMAT_METH_P (MIM_mstruc, m)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 IIFORMAT_METH (MIM_mstruc, m, args); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 #define MAYBE_IIFORMAT_DEVMETH(device, mstruc, m, args) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 struct image_instantiator_methods *MID_mstruc = \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 decode_ii_device (device, mstruc); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 if (MID_mstruc) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 MAYBE_IIFORMAT_METH(MID_mstruc, m, args); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 /* Call a specifier method, if it exists; otherwise return
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 the specified value */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 #define IIFORMAT_METH_OR_GIVEN(mstruc, m, args, given) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
214 ((mstruc && HAS_IIFORMAT_METH_P (mstruc, m)) ? \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 IIFORMAT_METH (mstruc, m, args) : (given))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 /***** Defining new image-instantiator types *****/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 #define DECLARE_IMAGE_INSTANTIATOR_FORMAT(format) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 extern struct image_instantiator_methods *format##_image_instantiator_methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 #define DEFINE_IMAGE_INSTANTIATOR_FORMAT(format) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 struct image_instantiator_methods *format##_image_instantiator_methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name) \
452
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
226 do { \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
227 format##_image_instantiator_methods = \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
228 xnew_and_zero (struct image_instantiator_methods); \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
229 format##_image_instantiator_methods->symbol = Q##format; \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
230 format##_image_instantiator_methods->device = Qnil; \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
231 format##_image_instantiator_methods->keywords = \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
232 Dynarr_new (ii_keyword_entry); \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
233 format##_image_instantiator_methods->consoles = \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
234 Dynarr_new (console_type_entry); \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
235 add_entry_to_image_instantiator_format_list \
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
236 (Q##format, format##_image_instantiator_methods); \
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2272
diff changeset
237 dump_add_root_block_ptr (&format##_image_instantiator_methods, \
452
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 450
diff changeset
238 &iim_description); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 defsymbol (&Q##format, obj_name); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name);\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 /* Declare that image-instantiator format FORMAT has method M; used in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 initialization routines */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 #define IIFORMAT_HAS_METHOD(format, m) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 (format##_image_instantiator_methods->m##_method = format##_##m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 #define IIFORMAT_HAS_SHARED_METHOD(format, m, type) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 (format##_image_instantiator_methods->m##_method = type##_##m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 /* Declare that KEYW is a valid keyword for image-instantiator format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 FORMAT. VALIDATE_FUN if a function that returns whether the data
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 is valid. The keyword may not appear more than once. */
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
258 #define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
259 do { \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 struct ii_keyword_entry entry; \
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
261 \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
262 entry.keyword = keyw; \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 entry.validate = validate_fun; \
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
264 entry.multiple_p = multi; \
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
265 entry.copy_p = copy; \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 Dynarr_add (format##_image_instantiator_methods->keywords, \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 entry); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
270 #define IIFORMAT_VALID_KEYWORD(format, keyw, validate_fun) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
271 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 0)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
272
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 /* Same as IIFORMAT_VALID_KEYWORD except that the keyword may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 appear multiple times. */
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
275 #define IIFORMAT_VALID_MULTI_KEYWORD(format, keyw, validate_fun) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
276 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 1)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
277
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
278 /* Same as IIFORMAT_VALID_KEYWORD except that the argument is not
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
279 copied by the specifier functions. This is necessary for things
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
280 like callbacks etc. */
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
281 #define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
282 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
284 /* Declare that image-instantiator format FORMAT is supported on
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 CONSOLE type. */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
286 #define IIFORMAT_VALID_CONSOLE(console, format) \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 struct console_type_entry entry; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 entry.symbol = Q##console; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 entry.meths = console##_console_methods; \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 Dynarr_add (format##_image_instantiator_methods->consoles, \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 entry); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
296 #define IIFORMAT_VALID_CONSOLE2(con1, con2, format) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
297 IIFORMAT_VALID_CONSOLE (con1, format); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
298 IIFORMAT_VALID_CONSOLE (con2, format);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
299
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
300 #define DEFINE_DEVICE_IIFORMAT(type, format) \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
301 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
304 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
305 do { \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
306 type##_##format##_image_instantiator_methods = \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
307 xnew_and_zero (struct image_instantiator_methods); \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
308 type##_##format##_image_instantiator_methods->symbol = Q##format; \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
309 type##_##format##_image_instantiator_methods->device = Q##type; \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
310 type##_##format##_image_instantiator_methods->keywords = \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
311 Dynarr_new (ii_keyword_entry); \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
312 add_entry_to_device_ii_format_list \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
313 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
314 IIFORMAT_VALID_CONSOLE(type,format); \
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2272
diff changeset
315 dump_add_root_block_ptr (&type##_##format##_image_instantiator_methods, \
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
316 &iim_description); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 /* Declare that image-instantiator format FORMAT has method M; used in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 initialization routines */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 (type##_##format##_image_instantiator_methods->m##_method = type##_##format##_##m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 #define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 (type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
326 #define IIFORMAT_INHERITS_DEVMETHOD(type, from, format, m) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
327 (type##_##format##_image_instantiator_methods->m##_method = from##_##format##_##m)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
328 #define IIFORMAT_INHERITS_SHARED_DEVMETHOD(type, from, format, m, fromformat) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
329 (type##_##format##_image_instantiator_methods->m##_method = from##_##fromformat##_##m)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
330
450
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
331 #define INSTANTIATOR_TYPE(inst) (XVECTOR_DATA ((inst))[0])
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
332
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
333 struct image_instantiator_methods *decode_device_ii_format (Lisp_Object device,
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
334 Lisp_Object format,
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
335 Error_Behavior
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
336 errb);
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
337 struct image_instantiator_methods *decode_image_instantiator_format
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
338 (Lisp_Object format, Error_Behavior errb);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 void add_entry_to_image_instantiator_format_list (Lisp_Object symbol,
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
341 struct
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
342 image_instantiator_methods *
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
343 meths);
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
344 void add_entry_to_device_ii_format_list (Lisp_Object device,
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
345 Lisp_Object symbol,
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
346 struct image_instantiator_methods *
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
347 meths);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 Lisp_Object find_keyword_in_vector (Lisp_Object vector,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 Lisp_Object keyword);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 Lisp_Object find_keyword_in_vector_or_given (Lisp_Object vector,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 Lisp_Object keyword,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 Lisp_Object default_);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 Lisp_Object simple_image_type_normalize (Lisp_Object inst,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 Lisp_Object console_type,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 Lisp_Object image_type_tag);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 Lisp_Object potential_pixmap_file_instantiator (Lisp_Object instantiator,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 Lisp_Object file_keyword,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 Lisp_Object data_keyword,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 Lisp_Object console_type);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 void check_valid_string (Lisp_Object data);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 void check_valid_int (Lisp_Object data);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 void check_valid_face (Lisp_Object data);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 void check_valid_vector (Lisp_Object data);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
365 void initialize_subwindow_image_instance (Lisp_Image_Instance*);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 int dest_mask, Lisp_Object domain);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
369 int subwindow_governing_domain (void);
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
370 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
371 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
372 int dest_mask, Lisp_Object domain);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
373 void image_instance_query_geometry (Lisp_Object image_instance,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
374 int* width, int* height,
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
375 enum image_instance_geometry disp,
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
376 Lisp_Object domain);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
377 void image_instance_layout (Lisp_Object image_instance,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
378 int width, int height, int xoffset, int yoffset,
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
379 Lisp_Object domain);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
380 int layout_layout (Lisp_Object image_instance,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
381 int width, int height, int xoffset, int yoffset,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
382 Lisp_Object domain);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
383 int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w);
450
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
384 Lisp_Object make_image_instance_cache_hash_table (void);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 int given_dest_mask,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 int desired_dest_mask));
4952
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
389 DECLARE_DOESNT_RETURN (signal_image_error (const Ascbyte *reason,
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
390 Lisp_Object frob));
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
391 DECLARE_DOESNT_RETURN (signal_image_error_2 (const Ascbyte *reason,
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
392 Lisp_Object frob0,
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
393 Lisp_Object frob1));
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
394 DECLARE_DOESNT_RETURN (signal_double_image_error (const Ascbyte *reason1,
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
395 const Ascbyte *reason2,
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 456
diff changeset
396 Lisp_Object data));
4952
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
397 DECLARE_DOESNT_RETURN (signal_double_image_error_2 (const Ascbyte *reason1,
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
398 const Ascbyte *reason2,
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 456
diff changeset
399 Lisp_Object data1,
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 456
diff changeset
400 Lisp_Object data2));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 /* Image Specifier Object */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 DECLARE_SPECIFIER_TYPE (image);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 #define XIMAGE_SPECIFIER(x) XSPECIFIER_TYPE (x, image)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 #define IMAGE_SPECIFIERP(x) SPECIFIER_TYPEP (x, image)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 #define CHECK_IMAGE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, image)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 #define CONCHECK_IMAGE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, image)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 void set_image_attached_to (Lisp_Object obj, Lisp_Object face_or_glyph,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 Lisp_Object property);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 struct image_specifier
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 int allowed;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 Lisp_Object attachee; /* face or glyph this is attached to, or nil */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 Lisp_Object attachee_property;/* property of that face or glyph */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421
456
e7ef97881643 Import from CVS: tag r21-2-43
cvs
parents: 452
diff changeset
422 #define IMAGE_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, image)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 #define IMAGE_SPECIFIER_ALLOWED(g) (IMAGE_SPECIFIER_DATA (g)->allowed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 #define IMAGE_SPECIFIER_ATTACHEE(g) (IMAGE_SPECIFIER_DATA (g)->attachee)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 #define IMAGE_SPECIFIER_ATTACHEE_PROPERTY(g) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 (IMAGE_SPECIFIER_DATA (g)->attachee_property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 #define XIMAGE_SPECIFIER_ALLOWED(g) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 IMAGE_SPECIFIER_ALLOWED (XIMAGE_SPECIFIER (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 /* Image Instance Object */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434
5118
e0db3c197671 merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
435 DECLARE_LISP_OBJECT (image_instance, Lisp_Image_Instance);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
436 #define XIMAGE_INSTANCE(x) XRECORD (x, image_instance, Lisp_Image_Instance)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 578
diff changeset
437 #define wrap_image_instance(p) wrap_record (p, image_instance)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
442 #ifdef ERROR_CHECK_GLYPHS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
443 void check_image_instance_structure (Lisp_Object instance);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
444 void check_window_subwindow_cache (struct window* w);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
445 #define ERROR_CHECK_IMAGE_INSTANCE(ii) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
446 check_image_instance_structure (ii)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
447 #define ERROR_CHECK_SUBWINDOW_CACHE(w) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
448 check_window_subwindow_cache (w)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
449 #else
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
450 #define ERROR_CHECK_IMAGE_INSTANCE(ii)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
451 #define ERROR_CHECK_SUBWINDOW_CACHE(w)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
452 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
453
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 enum image_instance_type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456 IMAGE_UNKNOWN,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 IMAGE_NOTHING,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458 IMAGE_TEXT,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 IMAGE_MONO_PIXMAP,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 IMAGE_COLOR_PIXMAP,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 IMAGE_POINTER,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 IMAGE_SUBWINDOW,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
463 IMAGE_WIDGET
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466 #define IMAGE_NOTHING_MASK (1 << 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 #define IMAGE_TEXT_MASK (1 << 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 #define IMAGE_MONO_PIXMAP_MASK (1 << 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 #define IMAGE_COLOR_PIXMAP_MASK (1 << 3)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 #define IMAGE_POINTER_MASK (1 << 4)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 #define IMAGE_SUBWINDOW_MASK (1 << 5)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 #define IMAGE_WIDGET_MASK (1 << 6)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
473
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
474 /* This depends on the fact that enums are assigned consecutive
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
475 integers starting at 0. (Remember that IMAGE_UNKNOWN is the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
476 first enum.) I'm fairly sure this behavior is ANSI-mandated,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
477 so there should be no portability problems here. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
478 #define image_instance_type_to_mask(type) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
479 ((int) (1 << ((int) (type) - 1)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 #define IMAGE_INSTANCE_TYPE_P(ii, type) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 #define NOTHING_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_NOTHING)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 #define TEXT_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_TEXT)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 #define MONO_PIXMAP_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_MONO_PIXMAP)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 #define COLOR_PIXMAP_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_COLOR_PIXMAP)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 #define POINTER_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494 #define SUBWINDOW_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 #define WIDGET_IMAGE_INSTANCEP(ii) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
499 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
500 CHECK_IMAGE_INSTANCE (x); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 if (!NOTHING_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
505 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
506 CHECK_IMAGE_INSTANCE (x); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 if (!TEXT_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 x = wrong_type_argument (Qtext_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 CHECK_IMAGE_INSTANCE (x); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
517 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
518 CHECK_IMAGE_INSTANCE (x); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
523 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
524 CHECK_IMAGE_INSTANCE (x); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525 if (!POINTER_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
529 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 CHECK_IMAGE_INSTANCE (x); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 && !WIDGET_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
536 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
537 CHECK_IMAGE_INSTANCE (x); \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 if (!WIDGET_IMAGE_INSTANCEP (x)) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
542 struct text_image_instance
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
543 {
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
544 int descent;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
545 Lisp_Object string;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
546 };
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
547
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
548 struct pixmap_image_instance
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
549 { /* used for pointers as well */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
550 int depth;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
551 int slice, maxslice, timeout;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
552 Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
553 Lisp_Object filename; /* string or Qnil */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
554 Lisp_Object mask_filename; /* string or Qnil */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
555 Lisp_Object fg, bg; /* foreground and background colors,
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
556 if this is a colorized mono-pixmap
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
557 or a pointer */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
558 Lisp_Object auxdata; /* list or Qnil: any additional data
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
559 to be seen from lisp */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
560 void* mask; /* mask that can be seen from all windowing systems */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
561 };
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
562
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
563 struct subwindow_image_instance
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
564 {
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
565 void* subwindow; /* specific devices can use this as necessary */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
566 struct
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
567 { /* We need these so we can do without
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
568 subwindow_cachel */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
569 int x, y;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
570 int width, height;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
571 } display_data;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
572 unsigned int being_displayed : 1; /* used to detect when needs
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
573 to be unmapped */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
574 unsigned int v_resize : 1; /* Whether the vsize is allowed to change. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
575 unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
576 unsigned int orientation : 1; /* Vertical or horizontal. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
577 unsigned int h_justification : 2; /* left, right or center. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
578 unsigned int v_justification : 2; /* top, bottom or center. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
579 /* Face for colors and font. We specify this here because we
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
580 want people to be able to put :face in the instantiator
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
581 spec. Using glyph-face is more inconvenient, although more
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
582 general. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
583 Lisp_Object face;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
584 Lisp_Object type;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
585 Lisp_Object props; /* properties or border*/
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
586 Lisp_Object items; /* a list of displayed gui_items */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
587 Lisp_Object pending_items; /* gui_items that should be displayed */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
588 Lisp_Object children; /* a list of children */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
589 Lisp_Object width; /* dynamic width spec. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
590 Lisp_Object height; /* dynamic height spec. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
591 /* Change flags to augment dirty. */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
592 unsigned int face_changed : 1;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
593 unsigned int items_changed : 1;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
594 unsigned int action_occurred : 1;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
595 };
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
596
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597 struct Lisp_Image_Instance
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 {
5127
a9c41067dd88 more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents: 5125
diff changeset
599 NORMAL_LISP_OBJECT_HEADER header;
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
600 Lisp_Object domain; /* The domain in which we were cached. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
601 Lisp_Object device; /* The device of the domain. Recorded
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
602 since the domain may get deleted
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
603 before us. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 Lisp_Object name;
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
605 /* The glyph from which we were instantiated. This is a weak
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
606 reference. */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
607 Lisp_Object parent;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
608 /* The instantiator from which we were instantiated. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
609 Lisp_Object instantiator;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610 enum image_instance_type type;
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
611 int x_offset, y_offset; /* for layout purposes */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
612 int width, height, margin_width;
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 647
diff changeset
613 Hashcode display_hash; /* Hash value representing the structure
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
614 of the image_instance when it was
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
615 last displayed. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 unsigned int dirty : 1;
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
617 unsigned int size_changed : 1;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
618 unsigned int text_changed : 1;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
619 unsigned int layout_changed : 1;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
620 unsigned int optimize_output : 1; /* For outputting layouts. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
621 unsigned int initialized : 1; /* When we're fully done. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
622 unsigned int wants_initial_focus : 1;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
623
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624 union
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625 {
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
626 struct text_image_instance text;
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
627 struct pixmap_image_instance pixmap; /* used for pointers as well */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
628 struct subwindow_image_instance subwindow;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
629 } u;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631 /* console-type- and image-type-specific data */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
632 void *data;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
635 /* Layout bit-fields. */
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
636 #define LAYOUT_HORIZONTAL 0
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
637 #define LAYOUT_VERTICAL 1
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
638
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
639 #define LAYOUT_JUSTIFY_LEFT 0
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
640 #define LAYOUT_JUSTIFY_TOP 0
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
641 #define LAYOUT_JUSTIFY_RIGHT 1
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
642 #define LAYOUT_JUSTIFY_BOTTOM 1
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
643 #define LAYOUT_JUSTIFY_CENTER 2
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
644
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
645 #define IMAGE_INSTANCE_HASH_DEPTH 0
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
646
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
647 /* Accessor macros. */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
648 #define IMAGE_INSTANCE_DOMAIN(i) ((i)->domain)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
649 #define IMAGE_INSTANCE_DOMAIN_LIVE_P(i) (DOMAIN_LIVE_P ((i)->domain))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
651 #define IMAGE_INSTANCE_FRAME(i) (DOMAIN_FRAME ((i)->domain))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 #define IMAGE_INSTANCE_NAME(i) ((i)->name)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
653 #define IMAGE_INSTANCE_PARENT(i) ((i)->parent)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
654 #define IMAGE_INSTANCE_INSTANTIATOR(i) ((i)->instantiator)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
655 #define IMAGE_INSTANCE_GLYPH(i) (image_instance_parent_glyph(i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
656 #define IMAGE_INSTANCE_TYPE(i) ((i)->type)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
658 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset)
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
659 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
660 #define IMAGE_INSTANCE_MARGIN_WIDTH(i) ((i)->margin_width)
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
661 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
662 #define IMAGE_INSTANCE_INITIALIZED(i) ((i)->initialized)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
663 #define IMAGE_INSTANCE_DISPLAY_HASH(i) ((i)->display_hash)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
664 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
665 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
667 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
668 #define IMAGE_INSTANCE_NEEDS_LAYOUT(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
669 ((IMAGE_INSTANCE_DIRTYP (i) && IMAGE_INSTANCE_LAYOUT_CHANGED (i)) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
670 || (FRAMEP (IMAGE_INSTANCE_FRAME (i)) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
671 && XFRAME (IMAGE_INSTANCE_FRAME (i))->size_changed))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
672 #define IMAGE_INSTANCE_FACE(i) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
673 (GLYPHP (IMAGE_INSTANCE_GLYPH (i)) ? \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
674 XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) : Qnil)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
675 #define IMAGE_INSTANCE_WANTS_INITIAL_FOCUS(i) ((i)->wants_initial_focus)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
677 /* Changed flags */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
678 #define IMAGE_INSTANCE_TEXT_CHANGED(i) ((i)->text_changed)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
679 #define IMAGE_INSTANCE_SIZE_CHANGED(i) ((i)->size_changed)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
680 #define IMAGE_INSTANCE_WIDGET_FACE_CHANGED(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
681 ((i)->u.subwindow.face_changed)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
682 #define IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
683 ((i)->u.subwindow.items_changed)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
684 #define IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
685 ((i)->u.subwindow.action_occurred)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
686 #define IMAGE_INSTANCE_LAYOUT_CHANGED(i) ((i)->layout_changed)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
687 #define IMAGE_INSTANCE_OPTIMIZE_OUTPUT(i) ((i)->optimize_output)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
688
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
689 /* Text properties */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string)
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
691 #define IMAGE_INSTANCE_TEXT_WIDTH(i) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
692 IMAGE_INSTANCE_WIDTH(i)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
693 #define IMAGE_INSTANCE_TEXT_HEIGHT(i) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
694 IMAGE_INSTANCE_HEIGHT(i)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
695 #define IMAGE_INSTANCE_TEXT_DESCENT(i) ((i)->u.text.descent)
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
696 #define IMAGE_INSTANCE_TEXT_ASCENT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
697 (IMAGE_INSTANCE_TEXT_HEIGHT(i) - IMAGE_INSTANCE_TEXT_DESCENT(i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
699 /* Pixmap properties */
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
700 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
701 IMAGE_INSTANCE_WIDTH(i)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
702 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
703 IMAGE_INSTANCE_HEIGHT(i)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
704 #define IMAGE_INSTANCE_PIXMAP_DEPTH(i) ((i)->u.pixmap.depth)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
705 #define IMAGE_INSTANCE_PIXMAP_FILENAME(i) ((i)->u.pixmap.filename)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 #define IMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) ((i)->u.pixmap.mask_filename)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
707 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) ((i)->u.pixmap.hotspot_x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
708 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) ((i)->u.pixmap.hotspot_y)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
709 #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
710 #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711 #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712 #define IMAGE_INSTANCE_PIXMAP_MASK(i) ((i)->u.pixmap.mask)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
713 #define IMAGE_INSTANCE_PIXMAP_SLICE(i) ((i)->u.pixmap.slice)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
714 #define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
715 #define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
716
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
717 /* Subwindow properties */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
719 /* Display data. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
720 #define IMAGE_INSTANCE_DISPLAY_X(i) ((i)->u.subwindow.display_data.x)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
721 #define IMAGE_INSTANCE_DISPLAY_Y(i) ((i)->u.subwindow.display_data.y)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
722 #define IMAGE_INSTANCE_DISPLAY_WIDTH(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
723 ((i)->u.subwindow.display_data.width)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
724 #define IMAGE_INSTANCE_DISPLAY_HEIGHT(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
725 ((i)->u.subwindow.display_data.height)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
726 #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
727 ((i)->u.subwindow.being_displayed)
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
728 #define IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
729 ((i)->u.subwindow.v_resize)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
730 #define IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
731 ((i)->u.subwindow.h_resize)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
732 #define IMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
733 ((i)->u.subwindow.orientation)
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
734 #define IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
735 ((i)->u.subwindow.h_justification)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
736 #define IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
737 ((i)->u.subwindow.v_justification)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
738 #define IMAGE_INSTANCE_SUBWINDOW_RIGHT_JUSTIFIED(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
739 (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_RIGHT)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
740 #define IMAGE_INSTANCE_SUBWINDOW_LEFT_JUSTIFIED(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
741 (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_LEFT)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
742 #define IMAGE_INSTANCE_SUBWINDOW_TOP_JUSTIFIED(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
743 (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_TOP)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
744 #define IMAGE_INSTANCE_SUBWINDOW_BOTTOM_JUSTIFIED(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
745 (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_BOTTOM)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
746 #define IMAGE_INSTANCE_SUBWINDOW_H_CENTERED(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
747 (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_CENTER)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
748 #define IMAGE_INSTANCE_SUBWINDOW_V_CENTERED(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
749 (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_CENTER)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
750 #define IMAGE_INSTANCE_SUBWINDOW_LOGICAL_LAYOUT(i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
751 (IMAGE_INSTANCE_SUBWINDOW_ORIENT (i) \
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
752 == LAYOUT_VERTICAL && !IMAGE_INSTANCE_SUBWINDOW_V_CENTERED (i))
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
753
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
754 #define IMAGE_INSTANCE_SUBWINDOW_FACE(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
755 ((i)->u.subwindow.face)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
756
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
757 /* Widget properties */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
758 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
759 IMAGE_INSTANCE_WIDTH(i)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
760 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
761 IMAGE_INSTANCE_HEIGHT(i)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
762 #define IMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) ((i)->u.subwindow.width)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
763 #define IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) ((i)->u.subwindow.height)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
764 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.type)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
765 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.props)
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
766 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
767 ((i)->u.subwindow.face = f)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
768 #define IMAGE_INSTANCE_WIDGET_FACE(i) \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
769 (!NILP ((i)->u.subwindow.face) ? (i)->u.subwindow.face : \
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
770 !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
771 Vwidget_face)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
772 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.items)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
773 #define IMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
774 ((i)->u.subwindow.pending_items)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
775 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
776 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
777 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
778 IMAGE_INSTANCE_WIDGET_ITEMS (i))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
779 #define IMAGE_INSTANCE_WIDGET_TEXT(i) \
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
780 XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
781
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
782 /* Layout properties */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
783 #define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.children)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
784 #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.props)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
785
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
786 #define XIMAGE_INSTANCE_DOMAIN(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
787 IMAGE_INSTANCE_DOMAIN (XIMAGE_INSTANCE (i))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
788 #define XIMAGE_INSTANCE_DOMAIN_LIVE_P(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
789 IMAGE_INSTANCE_DOMAIN_LIVE_P (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
790 #define XIMAGE_INSTANCE_DEVICE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
791 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
792 #define XIMAGE_INSTANCE_FRAME(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
793 IMAGE_INSTANCE_FRAME (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
794 #define XIMAGE_INSTANCE_NAME(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
795 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
796 #define XIMAGE_INSTANCE_GLYPH(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
797 IMAGE_INSTANCE_GLYPH (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
798 #define XIMAGE_INSTANCE_PARENT(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
799 IMAGE_INSTANCE_PARENT (XIMAGE_INSTANCE (i))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
800 #define XIMAGE_INSTANCE_INSTANTIATOR(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
801 IMAGE_INSTANCE_INSTANTIATOR (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
802 #define XIMAGE_INSTANCE_TYPE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
803 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
804 #define XIMAGE_INSTANCE_DISPLAY_HASH(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
805 IMAGE_INSTANCE_DISPLAY_HASH (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
806 #define XIMAGE_INSTANCE_XOFFSET(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
807 IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
808 #define XIMAGE_INSTANCE_YOFFSET(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
809 IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
810 #define XIMAGE_INSTANCE_DIRTYP(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
811 IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
812 #define XIMAGE_INSTANCE_NEEDS_LAYOUT(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
813 IMAGE_INSTANCE_NEEDS_LAYOUT (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
814 #define XIMAGE_INSTANCE_WIDTH(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
815 IMAGE_INSTANCE_WIDTH (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
816 #define XIMAGE_INSTANCE_MARGIN_WIDTH(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
817 IMAGE_INSTANCE_MARGIN_WIDTH (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
818 #define XIMAGE_INSTANCE_HEIGHT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
819 IMAGE_INSTANCE_HEIGHT (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
820 #define XIMAGE_INSTANCE_INITIALIZED(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
821 IMAGE_INSTANCE_INITIALIZED (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
822 #define XIMAGE_INSTANCE_FACE(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
823 IMAGE_INSTANCE_FACE (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
824
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
825 #define XIMAGE_INSTANCE_TEXT_STRING(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
826 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
827 #define XIMAGE_INSTANCE_TEXT_WIDTH(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
828 IMAGE_INSTANCE_TEXT_WIDTH (XIMAGE_INSTANCE (i))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
829 #define XIMAGE_INSTANCE_TEXT_HEIGHT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
830 IMAGE_INSTANCE_TEXT_HEIGHT (XIMAGE_INSTANCE (i))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
831 #define XIMAGE_INSTANCE_TEXT_ASCENT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
832 IMAGE_INSTANCE_TEXT_ASCENT (XIMAGE_INSTANCE (i))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
833 #define XIMAGE_INSTANCE_TEXT_DESCENT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
834 IMAGE_INSTANCE_TEXT_DESCENT (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
835
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
836 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
837 IMAGE_INSTANCE_PIXMAP_WIDTH (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
838 #define XIMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
839 IMAGE_INSTANCE_PIXMAP_HEIGHT (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
840 #define XIMAGE_INSTANCE_PIXMAP_DEPTH(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
841 IMAGE_INSTANCE_PIXMAP_DEPTH (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
842 #define XIMAGE_INSTANCE_PIXMAP_FILENAME(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
843 IMAGE_INSTANCE_PIXMAP_FILENAME (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
844 #define XIMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
845 IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
846 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
847 IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
848 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
849 IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
850 #define XIMAGE_INSTANCE_PIXMAP_FG(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
851 IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
852 #define XIMAGE_INSTANCE_PIXMAP_BG(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
853 IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
854 #define XIMAGE_INSTANCE_PIXMAP_MASK(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
855 IMAGE_INSTANCE_PIXMAP_MASK (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
856 #define XIMAGE_INSTANCE_PIXMAP_SLICE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
857 IMAGE_INSTANCE_PIXMAP_SLICE (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
858 #define XIMAGE_INSTANCE_PIXMAP_MAXSLICE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
859 IMAGE_INSTANCE_PIXMAP_MAXSLICE (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
860 #define XIMAGE_INSTANCE_PIXMAP_TIMEOUT(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
861 IMAGE_INSTANCE_PIXMAP_TIMEOUT (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
862
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
863 #define XIMAGE_INSTANCE_WIDGET_WIDTH(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
864 IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
865 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
866 IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
867 #define XIMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
868 IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (XIMAGE_INSTANCE (i))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
869 #define XIMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
870 IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
871 #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
872 IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
873 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
874 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
875 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
876 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
877 #define XSET_IMAGE_INSTANCE_WIDGET_FACE(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
878 SET_IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
879 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
880 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
881 #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
882 IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
883 #define XIMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
884 IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
885 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
886 IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
887 #define XIMAGE_INSTANCE_WIDGET_ACTION_OCCURRED(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
888 IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
889
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
890 #define XIMAGE_INSTANCE_LAYOUT_CHILDREN(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
891 IMAGE_INSTANCE_LAYOUT_CHILDREN (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
892 #define XIMAGE_INSTANCE_LAYOUT_BORDER(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
893 IMAGE_INSTANCE_LAYOUT_BORDER (XIMAGE_INSTANCE (i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
894
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
895 #define XIMAGE_INSTANCE_SUBWINDOW_ID(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
896 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
897 #define XIMAGE_INSTANCE_DISPLAY_X(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
898 IMAGE_INSTANCE_DISPLAY_X (XIMAGE_INSTANCE (i))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
899 #define XIMAGE_INSTANCE_DISPLAY_Y(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
900 IMAGE_INSTANCE_DISPLAY_Y (XIMAGE_INSTANCE (i))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
901 #define XIMAGE_INSTANCE_DISPLAY_WIDTH(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
902 IMAGE_INSTANCE_DISPLAY_WIDTH (XIMAGE_INSTANCE (i))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
903 #define XIMAGE_INSTANCE_DISPLAY_HEIGHT(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
904 IMAGE_INSTANCE_DISPLAY_HEIGHT (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
905 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
906 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
907 #define XIMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
908 IMAGE_INSTANCE_SUBWINDOW_ORIENT (XIMAGE_INSTANCE (i))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
909 #define XIMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
910 IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (XIMAGE_INSTANCE (i))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
911 #define XIMAGE_INSTANCE_SUBWINDOW_FACE(i) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
912 IMAGE_INSTANCE_SUBWINDOW_FACE (XIMAGE_INSTANCE (i))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
913
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
914 #define MARK_IMAGE_INSTANCE_CHANGED(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
915 (IMAGE_INSTANCE_DIRTYP (i) = 1);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
916
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
917 Lisp_Object image_instance_device (Lisp_Object instance);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
918 Lisp_Object image_instance_frame (Lisp_Object instance);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
919 Lisp_Object image_instance_window (Lisp_Object instance);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
920 int image_instance_live_p (Lisp_Object instance);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
921
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
922 #ifdef HAVE_XPM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
923 Lisp_Object evaluate_xpm_color_symbols (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
924 Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
925 #endif /* HAVE_XPM */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
926 #ifdef HAVE_WINDOW_SYSTEM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
927 Lisp_Object bitmap_to_lisp_data (Lisp_Object name, int *xhot, int *yhot,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
928 int ok_if_data_invalid);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 665
diff changeset
929 int read_bitmap_data_from_file (Lisp_Object filename, int *width,
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2272
diff changeset
930 int *height, Binbyte **datap,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
931 int *x_hot, int *y_hot);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
932 Lisp_Object xbm_mask_file_munging (Lisp_Object alist, Lisp_Object file,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
933 Lisp_Object mask_file,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
934 Lisp_Object console_type);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
935 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
936
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
937 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
938 /* Glyph Object */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
939 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
940
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
941 enum glyph_type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
942 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
943 GLYPH_UNKNOWN,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
944 GLYPH_BUFFER,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
945 GLYPH_POINTER,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
946 GLYPH_ICON
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
947 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
948
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
949 struct Lisp_Glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
950 {
5127
a9c41067dd88 more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents: 5125
diff changeset
951 NORMAL_LISP_OBJECT_HEADER header;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
952
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
953 enum glyph_type type;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
954
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
955 /* specifiers: */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
956 Lisp_Object image; /* the actual image */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
957 Lisp_Object contrib_p; /* whether to figure into line height */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
958 Lisp_Object baseline; /* percent above baseline */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
959
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
960 Lisp_Object face; /* if non-nil, face to use when displaying */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
961
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
962 Lisp_Object plist;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
963 void (*after_change) (Lisp_Object glyph, Lisp_Object property,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
964 Lisp_Object locale);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
965
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
966 unsigned int dirty : 1; /* So that we can selectively
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
967 redisplay changed glyphs. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
968 };
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
969 typedef struct Lisp_Glyph Lisp_Glyph;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
970
5118
e0db3c197671 merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
971 DECLARE_LISP_OBJECT (glyph, Lisp_Glyph);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
972 #define XGLYPH(x) XRECORD (x, glyph, Lisp_Glyph)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 578
diff changeset
973 #define wrap_glyph(p) wrap_record (p, glyph)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
974 #define GLYPHP(x) RECORDP (x, glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
975 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
976 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
977
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
978 #define CHECK_BUFFER_GLYPH(x) do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
979 CHECK_GLYPH (x); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
980 if (XGLYPH (x)->type != GLYPH_BUFFER) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
981 x = wrong_type_argument (Qbuffer_glyph_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
982 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
983
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
984 #define CHECK_POINTER_GLYPH(x) do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
985 CHECK_GLYPH (x); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
986 if (XGLYPH (x)->type != GLYPH_POINTER) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
987 x = wrong_type_argument (Qpointer_glyph_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
988 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
989
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
990 #define CHECK_ICON_GLYPH(x) do { \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
991 CHECK_GLYPH (x); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
992 if (XGLYPH (x)->type != GLYPH_ICON) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
993 x = wrong_type_argument (Qicon_glyph_p, (x)); \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
994 } while (0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
995
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
996 #define GLYPH_TYPE(g) ((g)->type)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
997 #define GLYPH_IMAGE(g) ((g)->image)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
998 #define GLYPH_CONTRIB_P(g) ((g)->contrib_p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
999 #define GLYPH_BASELINE(g) ((g)->baseline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1000 #define GLYPH_FACE(g) ((g)->face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1001 #define GLYPH_DIRTYP(g) ((g)->dirty)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1002
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1003 #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1004 #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1005 #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1006 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1007 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1008 #define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1009
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1010 #define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1011
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1012 extern Lisp_Object Qxpm, Qxface, Qetched_in, Qetched_out, Qbevel_in, Qbevel_out;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1013 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1014 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar;
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
1015 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1016 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
1017 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_group;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
1018 extern Lisp_Object Q_pixel_width, Q_pixel_height;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
1019 extern Lisp_Object Qimage_conversion_error;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1020 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1021 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1022 extern Lisp_Object Vxemacs_logo;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1023
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1024
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
1025 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object domain);
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
1026 unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object domain);
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
1027 unsigned short glyph_descent (Lisp_Object glyph, Lisp_Object domain);
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
1028 unsigned short glyph_height (Lisp_Object glyph, Lisp_Object domain);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1029 Lisp_Object glyph_baseline (Lisp_Object glyph, Lisp_Object domain);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1030 Lisp_Object glyph_face (Lisp_Object glyph, Lisp_Object domain);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1031 int glyph_contrib_p (Lisp_Object glyph, Lisp_Object domain);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1032 Lisp_Object glyph_image_instance (Lisp_Object glyph,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1033 Lisp_Object domain,
578
190b164ddcac [xemacs-hg @ 2001-05-25 11:26:50 by ben]
ben
parents: 563
diff changeset
1034 Error_Behavior errb, int no_quit);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1035 void file_or_data_must_be_present (Lisp_Object instantiator);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1036 void data_must_be_present (Lisp_Object instantiator);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1037 Lisp_Object make_string_from_file (Lisp_Object file);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1038 Lisp_Object tagged_vector_to_alist (Lisp_Object vector);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1039 Lisp_Object alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1040 void string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1041 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1042 int dest_mask, Lisp_Object domain);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1043 int tab_control_order_only_changed (Lisp_Object image_instance);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1044 Lisp_Object allocate_glyph (enum glyph_type type,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1045 void (*after_change) (Lisp_Object glyph,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1046 Lisp_Object property,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1047 Lisp_Object locale));
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1048 Lisp_Object normalize_image_instantiator (Lisp_Object instantiator,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1049 Lisp_Object contype,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1050 Lisp_Object dest_mask);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1051 void glyph_query_geometry (Lisp_Object glyph_or_image, int* width, int* height,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1052 enum image_instance_geometry disp,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1053 Lisp_Object domain);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1054 void glyph_do_layout (Lisp_Object glyph_or_image, int width, int height,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1055 int xoffset, int yoffset,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1056 Lisp_Object domain);
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
1057 void query_string_geometry ( Lisp_Object string, Lisp_Object face,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1058 int* width, int* height, int* descent,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1059 Lisp_Object domain);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1060 Lisp_Object query_string_font (Lisp_Object string,
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
1061 Lisp_Object face, Lisp_Object domain);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1062 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1063 void disable_glyph_animated_timeout (int i);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1064
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1065 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1066 /* Glyph Cachels */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1067 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1068
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1069 typedef struct glyph_cachel glyph_cachel;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1070 struct glyph_cachel
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1071 {
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1072 #ifdef NEW_GC
5127
a9c41067dd88 more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents: 5125
diff changeset
1073 NORMAL_LISP_OBJECT_HEADER header;
3263
d674024a8674 [xemacs-hg @ 2006-02-27 16:29:00 by crestani]
crestani
parents: 3092
diff changeset
1074 #endif /* NEW_GC */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1075 Lisp_Object glyph;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1076
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1077 unsigned int dirty :1; /* I'm copying faces here. I'm not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1078 sure why we need two dirty
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1079 flags. Maybe because an image
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1080 instance can be dirty and so we
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1081 need to frob this in the same way
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1082 as other image instance properties. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1083 unsigned int updated :1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1084
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1085 unsigned short width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1086 unsigned short ascent;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1087 unsigned short descent;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1088 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1089
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1090 #ifdef NEW_GC
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1091 typedef struct glyph_cachel Lisp_Glyph_Cachel;
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1092
5118
e0db3c197671 merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
1093 DECLARE_LISP_OBJECT (glyph_cachel, Lisp_Glyph_Cachel);
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1094
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1095 #define XGLYPH_CACHEL(x) \
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1096 XRECORD (x, glyph_cachel, Lisp_Glyph_Cachel)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1097 #define wrap_glyph_cachel(p) wrap_record (p, glyph_cachel)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1098 #define GLYPH_CACHEL_P(x) RECORDP (x, glyph_cachel)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1099 #define CHECK_GLYPH_CACHEL(x) CHECK_RECORD (x, glyph_cachel)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1100 #define CONCHECK_GLYPH_CACHEL(x) CONCHECK_RECORD (x, glyph_cachel)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1101 #endif /* NEW_GC */
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1102
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1103 #define CONT_GLYPH_INDEX (glyph_index) 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1104 #define TRUN_GLYPH_INDEX (glyph_index) 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1105 #define HSCROLL_GLYPH_INDEX (glyph_index) 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1106 #define CONTROL_GLYPH_INDEX (glyph_index) 3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1107 #define OCT_ESC_GLYPH_INDEX (glyph_index) 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1108 #define INVIS_GLYPH_INDEX (glyph_index) 5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1109
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1110 #ifdef ERROR_CHECK_GLYPHS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1111
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1112 DECLARE_INLINE_HEADER (
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1113 int
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1114 GLYPH_CACHEL_WIDTH (struct window *window, int ind)
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1115 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1116 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1117 int wid = Dynarr_atp (window->glyph_cachels, ind)->width;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1118 assert (wid >= 0 && wid < 10000);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1119 return wid;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1120 }
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1121
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1122 DECLARE_INLINE_HEADER (
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1123 int
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1124 GLYPH_CACHEL_ASCENT (struct window *window, int ind)
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1125 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1126 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1127 int wid = Dynarr_atp (window->glyph_cachels, ind)->ascent;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1128 assert (wid >= 0 && wid < 10000);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1129 return wid;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1130 }
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1131
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1132 DECLARE_INLINE_HEADER (
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1133 int
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1134 GLYPH_CACHEL_DESCENT (struct window *window, int ind)
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 800
diff changeset
1135 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1136 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1137 int wid = Dynarr_atp (window->glyph_cachels, ind)->descent;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1138 assert (wid >= 0 && wid < 10000);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1139 return wid;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1140 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1141
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1142 #else /* not ERROR_CHECK_GLYPHS */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1143
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
1144 #define GLYPH_CACHEL_WIDTH(window, ind) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1145 Dynarr_atp (window->glyph_cachels, ind)->width
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1146 #define GLYPH_CACHEL_ASCENT(window, ind) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1147 Dynarr_atp (window->glyph_cachels, ind)->ascent
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1148 #define GLYPH_CACHEL_DESCENT(window, ind) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1149 Dynarr_atp (window->glyph_cachels, ind)->descent
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1150
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1151 #endif /* not ERROR_CHECK_GLYPHS */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1152
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1153 #define GLYPH_CACHEL(window, ind) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1154 Dynarr_atp (window->glyph_cachels, ind)
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
1155 #define GLYPH_CACHEL_GLYPH(window, ind) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1156 Dynarr_atp (window->glyph_cachels, ind)->glyph
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1157 #define GLYPH_CACHEL_DIRTYP(window, ind) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1158 Dynarr_atp (window->glyph_cachels, ind)->dirty
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1160 void mark_glyph_cachels (glyph_cachel_dynarr *elements);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1161 void mark_glyph_cachels_as_not_updated (struct window *w);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1162 void mark_glyph_cachels_as_clean (struct window *w);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1163 void reset_glyph_cachels (struct window *w);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1164 glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1166 #ifdef MEMORY_USAGE_STATS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1167 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
5157
1fae11d56ad2 redo memory-usage mechanism, add way of dynamically initializing Lisp objects
Ben Wing <ben@xemacs.org>
parents: 5127
diff changeset
1168 struct usage_stats *ustats);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1169 #endif /* MEMORY_USAGE_STATS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1171 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1172 /* Display Tables */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1173 /************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1174
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 863
diff changeset
1175 Lisp_Object display_table_entry (Ichar, Lisp_Object, Lisp_Object);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1176 void get_display_tables (struct window *, face_index,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1177 Lisp_Object *, Lisp_Object *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1179 /****************************************************************************
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1180 * Subwindow Object *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1181 ****************************************************************************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1183 void unmap_subwindow (Lisp_Object subwindow);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1184 void map_subwindow (Lisp_Object subwindow, int x, int y,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1185 struct display_glyph_area *dga);
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
1186 int find_matching_subwindow (struct frame* f, int x, int y, int width,
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
1187 int height);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1188 void redisplay_widget (Lisp_Object widget);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1189 void update_widget_instances (Lisp_Object frame);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1190 void redisplay_subwindow (Lisp_Object subwindow);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1191 Lisp_Object image_instance_parent_glyph (struct Lisp_Image_Instance*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1192 int image_instance_changed (Lisp_Object image);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1193 void free_frame_subwindow_instances (struct frame* f);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1194 void reset_frame_subwindow_instance_cache (struct frame* f);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1195 int unmap_subwindow_instance_cache_mapper (Lisp_Object key,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1196 Lisp_Object value, void* finalize);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1198 struct expose_ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1199 {
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1200 #ifdef NEW_GC
5127
a9c41067dd88 more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents: 5125
diff changeset
1201 NORMAL_LISP_OBJECT_HEADER header;
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1202 #endif /* NEW_GC */
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
1203 int x, y;
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
1204 int width, height;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1205 struct expose_ignore *next;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1206 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1207
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1208 #ifdef NEW_GC
5118
e0db3c197671 merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents: 3263
diff changeset
1209 DECLARE_LISP_OBJECT (expose_ignore, struct expose_ignore);
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1210 #define XEXPOSE_IGNORE(x) XRECORD (x, expose_ignore, struct expose_ignore)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1211 #define wrap_expose_ignore(p) wrap_record (p, expose_ignore)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1212 #define EXPOSE_IGNOREP(x) RECORDP (x, expose_ignore)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1213 #define CHECK_EXPOSE_IGNORE(x) CHECK_RECORD (x, expose_ignore)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1214 #define CONCHECK_EXPOSE_IGNORE(x) CONCHECK_RECORD (x, expose_ignore)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1215 #endif /* NEW_GC */
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents: 3017
diff changeset
1216
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
1217 int check_for_ignored_expose (struct frame* f, int x, int y, int width,
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 639
diff changeset
1218 int height);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1219 extern int hold_ignored_expose_registration;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1220
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
1221 #define ROUND_UP(arg, unit) (((int)((arg) + (unit) - 1) / (int)(unit)) * (int)(unit))
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 826
diff changeset
1222
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1223 #endif /* INCLUDED_glyphs_h_ */