annotate src/glyphs.h @ 406:b8cc9ab3f761 r21-2-33

Import from CVS: tag r21-2-33
author cvs
date Mon, 13 Aug 2007 11:17:09 +0200
parents 2f8bb876ab1d
children 501cfd01ee6d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* Generic glyph data structures + display tables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1994 Board of Trustees, University of Illinois.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1995, 1996 Ben Wing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
24 #ifndef INCLUDED_glyphs_h_
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
25 #define INCLUDED_glyphs_h_
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #include "specifier.h"
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
28 #include "gui.h"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
30 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
31 /* Image Instantiators */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
32 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 struct image_instantiator_methods;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 /* Remember the distinction between image instantiator formats and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 image instance types. Here's an approximate mapping:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
39 image instantiator format image instance type
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
40 ------------------------- -------------------
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
41 nothing nothing
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
42 string text
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
43 formatted-string text
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
44 xbm mono-pixmap, color-pixmap, pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
45 xpm color-pixmap, mono-pixmap, pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
46 xface mono-pixmap, color-pixmap, pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
47 gif color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
48 jpeg color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
49 png color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
50 tiff color-pixmap
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
51 bmp color-pixmap
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
52 cursor-font pointer
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
53 mswindows-resource pointer
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
54 font pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
55 subwindow subwindow
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
56 inherit mono-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
57 autodetect mono-pixmap, color-pixmap, pointer, text
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
58 button widget
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
59 edit-field widget
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
60 combo -box widget
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
61 progress-gauge widget
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
62 tab-control widget
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
63 tree-view widget
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
64 scrollbar widget
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
65 static widget
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 /* These are methods specific to a particular format of image instantiator
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (e.g. xpm, string, etc.). */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
71 typedef struct ii_keyword_entry ii_keyword_entry;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
72 struct ii_keyword_entry
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
73 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
74 Lisp_Object keyword;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
75 void (*validate) (Lisp_Object data);
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
76 int multiple_p;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
77 int copy_p;
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
78 };
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
79
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
80 typedef struct
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
81 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
82 Dynarr_declare (ii_keyword_entry);
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
83 } ii_keyword_entry_dynarr;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
84
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
85 extern const struct struct_description iim_description;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
86
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
87 enum image_instance_geometry
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
88 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
89 IMAGE_GEOMETRY,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
90 IMAGE_DESIRED_GEOMETRY,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
91 IMAGE_MIN_GEOMETRY,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
92 IMAGE_MAX_GEOMETRY,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
93 IMAGE_UNSPECIFIED_GEOMETRY = ~0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
94 };
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
95
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
96 #define WIDGET_BORDER_HEIGHT 4
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
97 #define WIDGET_BORDER_WIDTH 4
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
98
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 struct image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 Lisp_Object symbol;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
103 Lisp_Object device; /* sometimes used */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
104
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
105 ii_keyword_entry_dynarr *keywords;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
106 /* consoles this ii is supported on */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
107 console_type_entry_dynarr *consoles;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 /* Implementation specific methods: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 /* Validate method: Given an instantiator vector, signal an error if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 it's invalid for this image-instantiator format. Note that this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 validation only occurs after all the keyword-specific validation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 has already been performed. This is chiefly useful for making
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 sure that certain required keywords are present. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 void (*validate_method) (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 /* Normalize method: Given an instantiator, convert it to the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 that should be used in a glyph, for devices of type CONSOLE_TYPE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 Signal an error if conversion fails. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 Lisp_Object (*normalize_method) (Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 Lisp_Object console_type);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 /* Possible-dest-types method: Return a mask indicating what dest types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 are compatible with this format. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 int (*possible_dest_types_method) (void);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 /* Instantiate method: Given an instantiator and a partially
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 filled-in image instance, complete the filling-in. Return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 non-zero if the instantiation succeeds, 0 if it fails.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 This must be present. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 void (*instantiate_method) (Lisp_Object image_instance,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 Lisp_Object pointer_fg,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 Lisp_Object pointer_bg,
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
135 int dest_mask,
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
136 Lisp_Object domain);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
137 /* Property method: Given an image instance, return device specific
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
138 properties. */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
139 Lisp_Object (*property_method) (Lisp_Object image_instance,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
140 Lisp_Object property);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
141 /* Set-property method: Given an image instance, set device specific
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
142 properties. */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
143 Lisp_Object (*set_property_method) (Lisp_Object image_instance,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
144 Lisp_Object property,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
145 Lisp_Object val);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
146 /* Asynchronously update properties. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
147 void (*update_method) (Lisp_Object image_instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
148
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
149 /* Find out the desired geometry, as given by disp, of this image
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
150 instance. Actual geometry is stored in the appropriate slots in the
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
151 image instance. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
152 void (*query_geometry_method) (Lisp_Object image_instance,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
153 unsigned int* width, unsigned int* height,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
154 enum image_instance_geometry disp,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
155 Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
156
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
157 /* Layout the instance and its children bounded by the provided
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
158 dimensions. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
159 void (*layout_method) (Lisp_Object image_instance,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
160 unsigned int width, unsigned int height,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
161 Lisp_Object domain);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 /***** Calling an image-instantiator method *****/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
166 #define HAS_IIFORMAT_METH_P(mstruc, m) (((mstruc)->m##_method) != 0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 #define IIFORMAT_METH(mstruc, m, args) (((mstruc)->m##_method) args)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 /* Call a void-returning specifier method, if it exists */
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
170 #define MAYBE_IIFORMAT_METH(mstruc, m, args) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
171 do { \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
172 struct image_instantiator_methods *MIM_mstruc = (mstruc); \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
173 if (MIM_mstruc && HAS_IIFORMAT_METH_P (MIM_mstruc, m)) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
174 IIFORMAT_METH (MIM_mstruc, m, args); \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
177 #define MAYBE_IIFORMAT_DEVMETH(device, mstruc, m, args) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
178 do { \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
179 struct image_instantiator_methods *MID_mstruc = \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
180 decode_ii_device (device, mstruc); \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
181 if (MID_mstruc) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
182 MAYBE_IIFORMAT_METH(MID_mstruc, m, args); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
183 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
184
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
185
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 /* Call a specifier method, if it exists; otherwise return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 the specified value */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
189 #define IIFORMAT_METH_OR_GIVEN(mstruc, m, args, given) \
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
190 (HAS_IIFORMAT_METH_P (mstruc, m) ? \
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
191 IIFORMAT_METH (mstruc, m, args) : (given))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 /***** Defining new image-instantiator types *****/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
195 #define DECLARE_IMAGE_INSTANTIATOR_FORMAT(format) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 extern struct image_instantiator_methods *format##_image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
198 #define DEFINE_IMAGE_INSTANTIATOR_FORMAT(format) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 struct image_instantiator_methods *format##_image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
201 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name) \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
202 do { \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
203 format##_image_instantiator_methods = \
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
204 xnew_and_zero (struct image_instantiator_methods); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
205 format##_image_instantiator_methods->symbol = Q##format; \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
206 format##_image_instantiator_methods->device = Qnil; \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
207 format##_image_instantiator_methods->keywords = \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
208 Dynarr_new (ii_keyword_entry); \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
209 format##_image_instantiator_methods->consoles = \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
210 Dynarr_new (console_type_entry); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
211 add_entry_to_image_instantiator_format_list \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
212 (Q##format, format##_image_instantiator_methods); \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
213 dumpstruct (&format##_image_instantiator_methods, \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
214 &iim_description); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
215 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
217 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
218 do { \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
219 defsymbol (&Q##format, obj_name); \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
220 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name);\
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
221 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
222
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 /* Declare that image-instantiator format FORMAT has method M; used in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 initialization routines */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 #define IIFORMAT_HAS_METHOD(format, m) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (format##_image_instantiator_methods->m##_method = format##_##m)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
228 #define IIFORMAT_HAS_SHARED_METHOD(format, m, type) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
229 (format##_image_instantiator_methods->m##_method = type##_##m)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
230
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 /* Declare that KEYW is a valid keyword for image-instantiator format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 FORMAT. VALIDATE_FUN if a function that returns whether the data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 is valid. The keyword may not appear more than once. */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
234 #define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 do { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 struct ii_keyword_entry entry; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 entry.keyword = keyw; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 entry.validate = validate_fun; \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
240 entry.multiple_p = multi; \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
241 entry.copy_p = copy; \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 Dynarr_add (format##_image_instantiator_methods->keywords, \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 entry); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
246 #define IIFORMAT_VALID_KEYWORD(format, keyw, validate_fun) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
247 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
248
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 /* Same as IIFORMAT_VALID_KEYWORD except that the keyword may
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 appear multiple times. */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
251 #define IIFORMAT_VALID_MULTI_KEYWORD(format, keyw, validate_fun) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
252 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 1)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
253
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
254 /* Same as IIFORMAT_VALID_KEYWORD execpt that the argument is not
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
255 copied by the specifier functions. This is necessary for things
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
256 like callbacks etc. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
257 #define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
258 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
259
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
260 /* Declare that image-instantiator format FORMAT is supported on
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
261 CONSOLE type. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
262 #define IIFORMAT_VALID_CONSOLE(console, format) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
263 do { \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
264 struct console_type_entry entry; \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
265 \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
266 entry.symbol = Q##console; \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
267 entry.meths = console##_console_methods; \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
268 Dynarr_add (format##_image_instantiator_methods->consoles, \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
269 entry); \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
272 #define IIFORMAT_VALID_CONSOLE2(con1, con2, format) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
273 IIFORMAT_VALID_CONSOLE (con1, format); \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
274 IIFORMAT_VALID_CONSOLE (con2, format);
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
275
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
276 #define DEFINE_DEVICE_IIFORMAT(type, format) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
277 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
278 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
279
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
280 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
281 do { \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
282 type##_##format##_image_instantiator_methods = \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
283 xnew_and_zero (struct image_instantiator_methods); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
284 type##_##format##_image_instantiator_methods->symbol = Q##format; \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
285 type##_##format##_image_instantiator_methods->device = Q##type; \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
286 type##_##format##_image_instantiator_methods->keywords = \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
287 Dynarr_new (ii_keyword_entry); \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
288 add_entry_to_device_ii_format_list \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
289 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
290 IIFORMAT_VALID_CONSOLE(type,format); \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
291 dumpstruct (&type##_##format##_image_instantiator_methods, \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
292 &iim_description); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
293 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
294
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
295 /* Declare that image-instantiator format FORMAT has method M; used in
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
296 initialization routines */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
297 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
298 (type##_##format##_image_instantiator_methods->m##_method = type##_##format##_##m)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
299 #define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
300 (type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
301
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
302 #define IIFORMAT_INHERITS_DEVMETHOD(type, from, format, m) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
303 (type##_##format##_image_instantiator_methods->m##_method = from##_##format##_##m)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
304 #define IIFORMAT_INHERITS_SHARED_DEVMETHOD(type, from, format, m, fromformat) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
305 (type##_##format##_image_instantiator_methods->m##_method = from##_##fromformat##_##m)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
306
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
307 struct image_instantiator_methods *
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
308 decode_device_ii_format (Lisp_Object device, Lisp_Object format,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
309 Error_behavior errb);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
310 struct image_instantiator_methods *
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
311 decode_image_instantiator_format (Lisp_Object format, Error_behavior errb);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
312
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 void add_entry_to_image_instantiator_format_list (Lisp_Object symbol,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 struct image_instantiator_methods *meths);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
315 void add_entry_to_device_ii_format_list (Lisp_Object device, Lisp_Object symbol,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
316 struct image_instantiator_methods *meths);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 Lisp_Object find_keyword_in_vector (Lisp_Object vector,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 Lisp_Object keyword);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 Lisp_Object find_keyword_in_vector_or_given (Lisp_Object vector,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 Lisp_Object keyword,
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 124
diff changeset
321 Lisp_Object default_);
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 371
diff changeset
322 Lisp_Object simple_image_type_normalize (Lisp_Object inst,
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
323 Lisp_Object console_type,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
324 Lisp_Object image_type_tag);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
325 Lisp_Object potential_pixmap_file_instantiator (Lisp_Object instantiator,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
326 Lisp_Object file_keyword,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
327 Lisp_Object data_keyword,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
328 Lisp_Object console_type);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 void check_valid_string (Lisp_Object data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 void check_valid_int (Lisp_Object data);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
331 void check_valid_face (Lisp_Object data);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
332 void check_valid_vector (Lisp_Object data);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
333 void check_valid_item_list_1 (Lisp_Object items);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
334
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
335 void initialize_subwindow_image_instance (Lisp_Image_Instance*);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
336 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
337 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
338 int dest_mask, Lisp_Object domain);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
339 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
340 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
341 int dest_mask, Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
342 void image_instance_query_geometry (Lisp_Object image_instance,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
343 unsigned int* width, unsigned int* height,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
344 enum image_instance_geometry disp,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
345 Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
346 void image_instance_layout (Lisp_Object image_instance,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
347 unsigned int width, unsigned int height,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
348 Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
349 int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
350
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 int given_dest_mask,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 int desired_dest_mask));
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
354 DECLARE_DOESNT_RETURN (signal_image_error (const char *, Lisp_Object));
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
355 DECLARE_DOESNT_RETURN (signal_image_error_2 (const char *, Lisp_Object, Lisp_Object));
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
357 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
358 /* Image Specifier Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
359 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 DECLARE_SPECIFIER_TYPE (image);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 #define XIMAGE_SPECIFIER(x) XSPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 #define XSETIMAGE_SPECIFIER(x, p) XSETSPECIFIER_TYPE (x, p, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 #define IMAGE_SPECIFIERP(x) SPECIFIER_TYPEP (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 #define CHECK_IMAGE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 #define CONCHECK_IMAGE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 void set_image_attached_to (Lisp_Object obj, Lisp_Object face_or_glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 Lisp_Object property);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 struct image_specifier
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 int allowed;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 Lisp_Object attachee; /* face or glyph this is attached to, or nil */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 Lisp_Object attachee_property;/* property of that face or glyph */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 #define IMAGE_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, image))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 #define IMAGE_SPECIFIER_ALLOWED(g) (IMAGE_SPECIFIER_DATA (g)->allowed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 #define IMAGE_SPECIFIER_ATTACHEE(g) (IMAGE_SPECIFIER_DATA (g)->attachee)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 #define IMAGE_SPECIFIER_ATTACHEE_PROPERTY(g) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 (IMAGE_SPECIFIER_DATA (g)->attachee_property)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 #define XIMAGE_SPECIFIER_ALLOWED(g) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 IMAGE_SPECIFIER_ALLOWED (XIMAGE_SPECIFIER (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
387 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
388 /* Image Instance Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
389 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
391 DECLARE_LRECORD (image_instance, Lisp_Image_Instance);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
392 #define XIMAGE_INSTANCE(x) XRECORD (x, image_instance, Lisp_Image_Instance)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 enum image_instance_type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 IMAGE_UNKNOWN,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 IMAGE_NOTHING,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 IMAGE_TEXT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 IMAGE_MONO_PIXMAP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 IMAGE_COLOR_PIXMAP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 IMAGE_POINTER,
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
406 IMAGE_SUBWINDOW,
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
407 IMAGE_WIDGET,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
408 IMAGE_LAYOUT
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 #define IMAGE_NOTHING_MASK (1 << 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 #define IMAGE_TEXT_MASK (1 << 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 #define IMAGE_MONO_PIXMAP_MASK (1 << 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 #define IMAGE_COLOR_PIXMAP_MASK (1 << 3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 #define IMAGE_POINTER_MASK (1 << 4)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 #define IMAGE_SUBWINDOW_MASK (1 << 5)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
417 #define IMAGE_WIDGET_MASK (1 << 6)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
418 #define IMAGE_LAYOUT_MASK (1 << 7)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 #define IMAGE_INSTANCE_TYPE_P(ii, type) \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
421 (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
423 #define NOTHING_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
424 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_NOTHING)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
425 #define TEXT_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
426 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_TEXT)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
427 #define MONO_PIXMAP_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
428 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_MONO_PIXMAP)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
429 #define COLOR_PIXMAP_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
430 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_COLOR_PIXMAP)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
431 #define POINTER_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
432 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
433 #define SUBWINDOW_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
434 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
435 #define WIDGET_IMAGE_INSTANCEP(ii) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
436 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
437 #define LAYOUT_IMAGE_INSTANCEP(ii) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
438 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
440 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
441 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
442 if (!NOTHING_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
443 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
444 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
446 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
447 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
448 if (!TEXT_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
449 x = wrong_type_argument (Qtext_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
450 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
452 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
453 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
454 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
455 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
456 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
458 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
459 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
460 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
461 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
462 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
464 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
465 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
466 if (!POINTER_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
467 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
468 } while (0)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
469
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
470 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
471 CHECK_IMAGE_INSTANCE (x); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
472 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
473 && !WIDGET_IMAGE_INSTANCEP (x)) \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
474 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
475 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
477 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
478 CHECK_IMAGE_INSTANCE (x); \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
479 if (!WIDGET_IMAGE_INSTANCEP (x)) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
480 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
481 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
482
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
483 #define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
484 CHECK_IMAGE_INSTANCE (x); \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
485 if (!LAYOUT_IMAGE_INSTANCEP (x)) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
486 x = wrong_type_argument (Qlayout_image_instance_p, (x)); \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
487 } while (0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
488
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 struct Lisp_Image_Instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 Lisp_Object device;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 Lisp_Object name;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
494 /* The glyph from which we were instantiated. This is a weak
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
495 reference. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
496 Lisp_Object parent;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 enum image_instance_type type;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
498 unsigned int x_offset, y_offset; /* for layout purposes */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
499 unsigned int width, height;
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
500 unsigned long display_hash; /* Hash value representing the structure
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
501 of the image_instance when it was
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
502 last displayed. */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
503 unsigned int dirty : 1;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
504 unsigned int size_changed : 1;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
505 unsigned int text_changed : 1;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
506 unsigned int layout_changed : 1;
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
507 unsigned int optimize_output : 1; /* For outputting layouts. */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
508
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 union
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
510 {
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
511 struct
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
513 unsigned int descent;
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
514 Lisp_Object string;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
515 } text;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
516 struct
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
517 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
518 unsigned int depth;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
519 unsigned int slice, maxslice, timeout;
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
520 Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
521 Lisp_Object filename; /* string or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
522 Lisp_Object mask_filename; /* string or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
523 Lisp_Object fg, bg; /* foreground and background colors,
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
524 if this is a colorized mono-pixmap
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
525 or a pointer */
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
526 Lisp_Object auxdata; /* list or Qnil: any additional data
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
527 to be seen from lisp */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
528 void* mask; /* mask that can be seen from all windowing systems */
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
529 } pixmap; /* used for pointers as well */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
530 struct
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
531 {
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
532 Lisp_Object frame;
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
533 void* subwindow; /* specific devices can use this as necessary */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
534 unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
535 unsigned int v_resize : 1; /* Whether the vsize is allowed to change. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
536 unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
537 unsigned int orientation : 1; /* Vertical or horizontal. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
538 unsigned int justification : 2; /* Left, right or center. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
539 /* Face for colors and font. We specify this here becuase we
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
540 want people to be able to put :face in the instantiator
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
541 spec. Using gyph-face is more inconvenient, although more
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
542 general. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
543 Lisp_Object face;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
544 Lisp_Object type;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
545 Lisp_Object props; /* properties or border*/
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
546 Lisp_Object items; /* a list of gui_items or children */
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
547 Lisp_Object pending_items; /* gui_items that should be displayed */
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
548 Lisp_Object width; /* dynamic width spec. */
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
549 Lisp_Object height; /* dynamic height spec. */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
550 /* Change flags to augment dirty. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
551 unsigned int face_changed : 1;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
552 unsigned int items_changed : 1;
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
553 } subwindow;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
554 } u;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 /* console-type- and image-type-specific data */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 void *data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
560 /* Layout bit-fields. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
561 #define LAYOUT_HORIZONTAL 0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
562 #define LAYOUT_VERTICAL 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
563
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
564 #define LAYOUT_JUSTIFY_LEFT 0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
565 #define LAYOUT_JUSTIFY_RIGHT 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
566 #define LAYOUT_JUSTIFY_CENTER 2
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
567
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 404
diff changeset
568 #define IMAGE_INSTANCE_HASH_DEPTH 0
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
569
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
570 /* Accessor macros. */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 #define IMAGE_INSTANCE_NAME(i) ((i)->name)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
573 #define IMAGE_INSTANCE_PARENT(i) ((i)->parent)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
574 #define IMAGE_INSTANCE_GLYPH(i) (image_instance_parent_glyph(i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 #define IMAGE_INSTANCE_TYPE(i) ((i)->type)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
576 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
577 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
578 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
579 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height)
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
580 #define IMAGE_INSTANCE_DISPLAY_HASH(i) ((i)->display_hash)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
581 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
582 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
584 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
585 #define IMAGE_INSTANCE_NEEDS_LAYOUT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
586 (IMAGE_INSTANCE_DIRTYP (i) && IMAGE_INSTANCE_LAYOUT_CHANGED (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
587 #define IMAGE_INSTANCE_FACE(i) \
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
588 (GLYPHP (IMAGE_INSTANCE_GLYPH (i)) ? \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
589 XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) : Qnil)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
591 /* Changed flags */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
592 #define IMAGE_INSTANCE_TEXT_CHANGED(i) ((i)->text_changed)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
593 #define IMAGE_INSTANCE_SIZE_CHANGED(i) ((i)->size_changed)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
594 #define IMAGE_INSTANCE_WIDGET_FACE_CHANGED(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
595 ((i)->u.subwindow.face_changed)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
596 #define IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
597 ((i)->u.subwindow.items_changed)
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
598 #define IMAGE_INSTANCE_LAYOUT_CHANGED(i) ((i)->layout_changed)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
599 #define IMAGE_INSTANCE_OPTIMIZE_OUTPUT(i) ((i)->optimize_output)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
601 /* Text properties */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
602 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
603 #define IMAGE_INSTANCE_TEXT_WIDTH(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
604 IMAGE_INSTANCE_WIDTH(i)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
605 #define IMAGE_INSTANCE_TEXT_HEIGHT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
606 IMAGE_INSTANCE_HEIGHT(i)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
607 #define IMAGE_INSTANCE_TEXT_DESCENT(i) ((i)->u.text.descent)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
608 #define IMAGE_INSTANCE_TEXT_ASCENT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
609 (IMAGE_INSTANCE_TEXT_HEIGHT(i) - IMAGE_INSTANCE_TEXT_DESCENT(i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
610
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
611 /* Pixmap properties */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
612 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
613 IMAGE_INSTANCE_WIDTH(i)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
614 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
615 IMAGE_INSTANCE_HEIGHT(i)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
616 #define IMAGE_INSTANCE_PIXMAP_DEPTH(i) ((i)->u.pixmap.depth)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
617 #define IMAGE_INSTANCE_PIXMAP_FILENAME(i) ((i)->u.pixmap.filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
618 #define IMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) ((i)->u.pixmap.mask_filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
619 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) ((i)->u.pixmap.hotspot_x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) ((i)->u.pixmap.hotspot_y)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621 #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622 #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
623 #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
624 #define IMAGE_INSTANCE_PIXMAP_MASK(i) ((i)->u.pixmap.mask)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
625 #define IMAGE_INSTANCE_PIXMAP_SLICE(i) ((i)->u.pixmap.slice)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
626 #define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
627 #define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
629 /* Subwindow properties */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
630 #define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
631 IMAGE_INSTANCE_WIDTH(i)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
632 #define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
633 IMAGE_INSTANCE_HEIGHT(i)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
634 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
635 #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
636 #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
637 ((i)->u.subwindow.being_displayed)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
638 #define IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
639 ((i)->u.subwindow.v_resize)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
640 #define IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
641 ((i)->u.subwindow.h_resize)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
642 #define IMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
643 ((i)->u.subwindow.orientation)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
644 #define IMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
645 ((i)->u.subwindow.justification)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
646
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
647 /* Widget properties */
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
648 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
649 IMAGE_INSTANCE_WIDTH(i)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
650 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
651 IMAGE_INSTANCE_HEIGHT(i)
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
652 #define IMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) ((i)->u.subwindow.width)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
653 #define IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) ((i)->u.subwindow.height)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
654 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.type)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
655 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.props)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
656 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
657 ((i)->u.subwindow.face = f)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
658 #define IMAGE_INSTANCE_WIDGET_FACE(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
659 (!NILP ((i)->u.subwindow.face) ? (i)->u.subwindow.face : \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
660 !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
661 Vwidget_face)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
662 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.items)
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
663 #define IMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
664 ((i)->u.subwindow.pending_items)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
665 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
666 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
667 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
668 IMAGE_INSTANCE_WIDGET_ITEMS (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
669 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
670
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
671 /* Layout properties */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
672 #define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.items)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
673 #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.props)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
674
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675 #define XIMAGE_INSTANCE_DEVICE(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 #define XIMAGE_INSTANCE_NAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
679 #define XIMAGE_INSTANCE_GLYPH(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
680 IMAGE_INSTANCE_GLYPH (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
681 #define XIMAGE_INSTANCE_PARENT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
682 IMAGE_INSTANCE_PARENT (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683 #define XIMAGE_INSTANCE_TYPE(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i))
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
685 #define XIMAGE_INSTANCE_DISPLAY_HASH(i) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
686 IMAGE_INSTANCE_DISPLAY_HASH (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
687 #define XIMAGE_INSTANCE_XOFFSET(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
688 IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
689 #define XIMAGE_INSTANCE_YOFFSET(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
690 IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
691 #define XIMAGE_INSTANCE_DIRTYP(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
692 IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
693 #define XIMAGE_INSTANCE_NEEDS_LAYOUT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
694 IMAGE_INSTANCE_NEEDS_LAYOUT (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
695 #define XIMAGE_INSTANCE_WIDTH(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
696 IMAGE_INSTANCE_WIDTH (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
697 #define XIMAGE_INSTANCE_HEIGHT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
698 IMAGE_INSTANCE_HEIGHT (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
699 #define XIMAGE_INSTANCE_FACE(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
700 IMAGE_INSTANCE_FACE (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
702 #define XIMAGE_INSTANCE_TEXT_STRING(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
704 #define XIMAGE_INSTANCE_TEXT_WIDTH(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
705 IMAGE_INSTANCE_TEXT_WIDTH (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
706 #define XIMAGE_INSTANCE_TEXT_HEIGHT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
707 IMAGE_INSTANCE_TEXT_HEIGHT (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
708 #define XIMAGE_INSTANCE_TEXT_ASCENT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
709 IMAGE_INSTANCE_TEXT_ASCENT (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
710 #define XIMAGE_INSTANCE_TEXT_DESCENT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
711 IMAGE_INSTANCE_TEXT_DESCENT (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714 IMAGE_INSTANCE_PIXMAP_WIDTH (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 #define XIMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716 IMAGE_INSTANCE_PIXMAP_HEIGHT (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
717 #define XIMAGE_INSTANCE_PIXMAP_DEPTH(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718 IMAGE_INSTANCE_PIXMAP_DEPTH (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
719 #define XIMAGE_INSTANCE_PIXMAP_FILENAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
720 IMAGE_INSTANCE_PIXMAP_FILENAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
721 #define XIMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
722 IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
724 IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
725 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
726 IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
727 #define XIMAGE_INSTANCE_PIXMAP_FG(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728 IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729 #define XIMAGE_INSTANCE_PIXMAP_BG(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730 IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
731 #define XIMAGE_INSTANCE_PIXMAP_MASK(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
732 IMAGE_INSTANCE_PIXMAP_MASK (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
733 #define XIMAGE_INSTANCE_PIXMAP_SLICE(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
734 IMAGE_INSTANCE_PIXMAP_SLICE (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
735 #define XIMAGE_INSTANCE_PIXMAP_MAXSLICE(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
736 IMAGE_INSTANCE_PIXMAP_MAXSLICE (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
737 #define XIMAGE_INSTANCE_PIXMAP_TIMEOUT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
738 IMAGE_INSTANCE_PIXMAP_TIMEOUT (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
739
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
740 #define XIMAGE_INSTANCE_WIDGET_WIDTH(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
741 IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
742 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
743 IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
744 #define XIMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
745 IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (XIMAGE_INSTANCE (i))
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
746 #define XIMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
747 IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (XIMAGE_INSTANCE (i))
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
748 #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
749 IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
750 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
751 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
752 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
753 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
754 #define XSET_IMAGE_INSTANCE_WIDGET_FACE(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
755 SET_IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
756 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
757 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
758 #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
759 IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i))
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
760 #define XIMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
761 IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (XIMAGE_INSTANCE (i))
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
762 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
763 IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
764
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
765 #define XIMAGE_INSTANCE_LAYOUT_CHILDREN(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
766 IMAGE_INSTANCE_LAYOUT_CHILDREN (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
767 #define XIMAGE_INSTANCE_LAYOUT_BORDER(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
768 IMAGE_INSTANCE_LAYOUT_BORDER (XIMAGE_INSTANCE (i))
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
769
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
770 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
771 IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
772 #define XIMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
773 IMAGE_INSTANCE_SUBWINDOW_HEIGHT (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
774 #define XIMAGE_INSTANCE_SUBWINDOW_ID(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
775 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
776 #define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
777 IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
778 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
779 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
780 #define XIMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
781 IMAGE_INSTANCE_SUBWINDOW_ORIENT (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
782 #define XIMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
783 IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (XIMAGE_INSTANCE (i))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
784
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
785 #define MARK_IMAGE_INSTANCE_CHANGED(i) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
786 (IMAGE_INSTANCE_DIRTYP (i) = 1);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
787
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
788 #ifdef HAVE_XPM
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
789 Lisp_Object evaluate_xpm_color_symbols (void);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
790 Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
791 #endif /* HAVE_XPM */
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
792 #ifdef HAVE_WINDOW_SYSTEM
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
793 Lisp_Object bitmap_to_lisp_data (Lisp_Object name, int *xhot, int *yhot,
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
794 int ok_if_data_invalid);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
795 int read_bitmap_data_from_file (const char *filename, unsigned int *width,
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
796 unsigned int *height, unsigned char **datap,
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
797 int *x_hot, int *y_hot);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
798 Lisp_Object xbm_mask_file_munging (Lisp_Object alist, Lisp_Object file,
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 371
diff changeset
799 Lisp_Object mask_file,
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
800 Lisp_Object console_type);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
801 #endif
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
802
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
803 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
804 /* Glyph Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
805 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807 enum glyph_type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 GLYPH_UNKNOWN,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 GLYPH_BUFFER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811 GLYPH_POINTER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812 GLYPH_ICON
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815 struct Lisp_Glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 enum glyph_type type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 /* specifiers: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822 Lisp_Object image; /* the actual image */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823 Lisp_Object contrib_p; /* whether to figure into line height */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 Lisp_Object baseline; /* percent above baseline */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 Lisp_Object face; /* if non-nil, face to use when displaying */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 Lisp_Object plist;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829 void (*after_change) (Lisp_Object glyph, Lisp_Object property,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 Lisp_Object locale);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
832 unsigned int dirty : 1; /* So that we can selectively
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
833 redisplay changed glyphs. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
834 };
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
835 typedef struct Lisp_Glyph Lisp_Glyph;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
836
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
837 DECLARE_LRECORD (glyph, Lisp_Glyph);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
838 #define XGLYPH(x) XRECORD (x, glyph, Lisp_Glyph)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840 #define GLYPHP(x) RECORDP (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
844 #define CHECK_BUFFER_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
845 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
846 if (XGLYPH (x)->type != GLYPH_BUFFER) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
847 x = wrong_type_argument (Qbuffer_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
848 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
849
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
850 #define CHECK_POINTER_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
851 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
852 if (XGLYPH (x)->type != GLYPH_POINTER) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
853 x = wrong_type_argument (Qpointer_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
854 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
856 #define CHECK_ICON_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
857 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
858 if (XGLYPH (x)->type != GLYPH_ICON) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
859 x = wrong_type_argument (Qicon_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
860 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
862 #define GLYPH_TYPE(g) ((g)->type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 #define GLYPH_IMAGE(g) ((g)->image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 #define GLYPH_CONTRIB_P(g) ((g)->contrib_p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865 #define GLYPH_BASELINE(g) ((g)->baseline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 #define GLYPH_FACE(g) ((g)->face)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
867 #define GLYPH_DIRTYP(g) ((g)->dirty)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870 #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871 #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
874 #define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
876 #define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
877
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
878 extern Lisp_Object Qxpm, Qxface, Qetched_in, Qetched_out, Qbevel_in, Qbevel_out;
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
879 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
880 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
881 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge, Q_border;
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
882 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
883 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group;
388
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 384
diff changeset
884 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 404
diff changeset
885 extern Lisp_Object Q_items, Q_properties, Q_image, Qimage_conversion_error;
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
886 extern Lisp_Object Q_orientation, Qupdate_widget_instances;
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 404
diff changeset
887 extern Lisp_Object Qwidget_callback_current_channel;
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
888 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph;
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
889 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890 extern Lisp_Object Vxemacs_logo;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 404
diff changeset
892
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
893 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
894 unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
895 unsigned short glyph_descent (Lisp_Object glyph, Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
896 unsigned short glyph_height (Lisp_Object glyph, Lisp_Object domain);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897 Lisp_Object glyph_baseline (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898 Lisp_Object glyph_face (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 int glyph_contrib_p (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 Lisp_Object glyph_image_instance (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 Lisp_Object domain,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 Error_behavior errb, int no_quit);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 void file_or_data_must_be_present (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 void data_must_be_present (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 Lisp_Object make_string_from_file (Lisp_Object file);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 Lisp_Object tagged_vector_to_alist (Lisp_Object vector);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907 Lisp_Object alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 void string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
910 int dest_mask, Lisp_Object domain);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 Lisp_Object allocate_glyph (enum glyph_type type,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912 void (*after_change) (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 Lisp_Object property,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 Lisp_Object locale));
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
915 void query_string_geometry ( Lisp_Object string, Lisp_Object face,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
916 unsigned int* width, unsigned int* height,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
917 unsigned int* descent, Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
918 Lisp_Object query_string_font (Lisp_Object string,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
919 Lisp_Object face, Lisp_Object domain);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
920 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
921 void disable_glyph_animated_timeout (int i);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
922
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
923 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
924 /* Glyph Cachels */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
925 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
926
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
927 typedef struct glyph_cachel glyph_cachel;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
928 struct glyph_cachel
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
929 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
930 Lisp_Object glyph;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
931
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
932 unsigned int dirty :1; /* I'm copying faces here. I'm not
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
933 sure why we need two dirty
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
934 flags. Maybe because an image
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
935 instance can be dirty and so we
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
936 need to frob this in the same way
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
937 as other image instance properties. */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938 unsigned int updated :1;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
939
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940 unsigned short width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 unsigned short ascent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942 unsigned short descent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
943 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
944
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
945 #define CONT_GLYPH_INDEX (glyph_index) 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
946 #define TRUN_GLYPH_INDEX (glyph_index) 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947 #define HSCROLL_GLYPH_INDEX (glyph_index) 2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
948 #define CONTROL_GLYPH_INDEX (glyph_index) 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
949 #define OCT_ESC_GLYPH_INDEX (glyph_index) 4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950 #define INVIS_GLYPH_INDEX (glyph_index) 5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
952 #define GLYPH_CACHEL(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 Dynarr_atp (window->glyph_cachels, index)
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
954 #define GLYPH_CACHEL_GLYPH(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955 Dynarr_atp (window->glyph_cachels, index)->glyph
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
956 #define GLYPH_CACHEL_WIDTH(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
957 Dynarr_atp (window->glyph_cachels, index)->width
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
958 #define GLYPH_CACHEL_ASCENT(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959 Dynarr_atp (window->glyph_cachels, index)->ascent
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
960 #define GLYPH_CACHEL_DESCENT(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961 Dynarr_atp (window->glyph_cachels, index)->descent
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
962 #define GLYPH_CACHEL_DIRTYP(window, index) \
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
963 Dynarr_atp (window->glyph_cachels, index)->dirty
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
965 void mark_glyph_cachels (glyph_cachel_dynarr *elements);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 void mark_glyph_cachels_as_not_updated (struct window *w);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
967 void mark_glyph_cachels_as_clean (struct window *w);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968 void reset_glyph_cachels (struct window *w);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
969 glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
970
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 #ifdef MEMORY_USAGE_STATS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 struct overhead_stats *ovstats);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974 #endif /* MEMORY_USAGE_STATS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
976 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
977 /* Display Tables */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
978 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
980 Lisp_Object display_table_entry (Emchar, Lisp_Object, Lisp_Object);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
981 void get_display_tables (struct window *, face_index,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
982 Lisp_Object *, Lisp_Object *);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
983
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
984 /****************************************************************************
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
985 * Subwindow Object *
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
986 ****************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
988 /* redisplay needs a per-frame cache of subwindows being displayed so
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
989 * that we known when to unmap them */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
990 typedef struct subwindow_cachel subwindow_cachel;
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
991 struct subwindow_cachel
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
992 {
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
993 Lisp_Object subwindow;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
994 unsigned int x, y;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
995 unsigned int width, height;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
996 unsigned int being_displayed : 1;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
997 unsigned int updated : 1;
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
998 };
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
999
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1000 typedef struct
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1001 {
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1002 Dynarr_declare (subwindow_cachel);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1003 } subwindow_cachel_dynarr;
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1004
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1005 void mark_subwindow_cachels (subwindow_cachel_dynarr *elements);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1006 void mark_subwindow_cachels_as_not_updated (struct frame *f);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1007 void reset_subwindow_cachels (struct frame *f);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
1008 void unmap_subwindow (Lisp_Object subwindow);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1009 void map_subwindow (Lisp_Object subwindow, int x, int y,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1010 struct display_glyph_area *dga);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1011 int find_matching_subwindow (struct frame* f, int x, int y, int width, int height);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1012 void update_widget (Lisp_Object widget);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1013 void update_subwindow (Lisp_Object subwindow);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1014 Lisp_Object image_instance_parent_glyph (struct Lisp_Image_Instance*);
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 404
diff changeset
1015 int image_instance_changed (Lisp_Object image);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1017 struct expose_ignore
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1018 {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1019 unsigned int x, y;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1020 unsigned int width, height;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1021 struct expose_ignore *next;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1022 };
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1023
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1024 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1025 extern int hold_ignored_expose_registration;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1026
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
1027 #endif /* INCLUDED_glyphs_h_ */