annotate src/glyphs.h @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 41dbb7a9d5f2
children
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
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
24 #ifndef _XEMACS_GLYPHS_H_
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
25 #define _XEMACS_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
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
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
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
58 button widget
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
59 edit-field widget
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
60 combo -box widget
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
61 progress-gauge widget
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
62 tab-control widget
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
63 tree-view widget
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
64 scrollbar widget
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
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;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
77 };
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 typedef struct
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
80 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
81 Dynarr_declare (ii_keyword_entry);
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
82 } ii_keyword_entry_dynarr;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
83
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
84 extern const struct struct_description iim_description;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
85
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 struct image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 Lisp_Object symbol;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
90 Lisp_Object device; /* sometimes used */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
91
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
92 ii_keyword_entry_dynarr *keywords;
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
93 /* consoles this ii is supported on */
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
94 console_type_entry_dynarr *consoles;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 /* Implementation specific methods: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 /* Validate method: Given an instantiator vector, signal an error if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 it's invalid for this image-instantiator format. Note that this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 validation only occurs after all the keyword-specific validation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 has already been performed. This is chiefly useful for making
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 sure that certain required keywords are present. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 void (*validate_method) (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 /* Normalize method: Given an instantiator, convert it to the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 that should be used in a glyph, for devices of type CONSOLE_TYPE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 Signal an error if conversion fails. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 Lisp_Object (*normalize_method) (Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 Lisp_Object console_type);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 /* Possible-dest-types method: Return a mask indicating what dest types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 are compatible with this format. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 int (*possible_dest_types_method) (void);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 /* Instantiate method: Given an instantiator and a partially
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 filled-in image instance, complete the filling-in. Return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 non-zero if the instantiation succeeds, 0 if it fails.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 This must be present. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 void (*instantiate_method) (Lisp_Object image_instance,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 Lisp_Object pointer_fg,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 Lisp_Object pointer_bg,
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
122 int dest_mask,
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
123 Lisp_Object domain);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
124 /* Property method: Given an image instance, return device specific
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
125 properties. */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
126 Lisp_Object (*property_method) (Lisp_Object image_instance,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
127 Lisp_Object property);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
128 /* Set-property method: Given an image instance, set device specific
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
129 properties. */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
130 Lisp_Object (*set_property_method) (Lisp_Object image_instance,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
131 Lisp_Object property,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
132 Lisp_Object val);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 /***** Calling an image-instantiator method *****/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
137 #define HAS_IIFORMAT_METH_P(mstruc, m) (((mstruc)->m##_method) != 0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 #define IIFORMAT_METH(mstruc, m, args) (((mstruc)->m##_method) args)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 /* Call a void-returning specifier method, if it exists */
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
141 #define MAYBE_IIFORMAT_METH(mstruc, m, args) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
142 do { \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
143 struct image_instantiator_methods *MIM_mstruc = (mstruc); \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
144 if (MIM_mstruc && HAS_IIFORMAT_METH_P (MIM_mstruc, m)) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
145 IIFORMAT_METH (MIM_mstruc, m, args); \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
148 #define MAYBE_IIFORMAT_DEVMETH(device, mstruc, m, args) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
149 do { \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
150 struct image_instantiator_methods *MID_mstruc = \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
151 decode_ii_device (device, mstruc); \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
152 if (MID_mstruc) \
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 388
diff changeset
153 MAYBE_IIFORMAT_METH(MID_mstruc, m, args); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
154 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
155
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
156
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 /* Call a specifier method, if it exists; otherwise return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 the specified value */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
160 #define IIFORMAT_METH_OR_GIVEN(mstruc, m, args, given) \
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
161 (HAS_IIFORMAT_METH_P (mstruc, m) ? \
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
162 IIFORMAT_METH (mstruc, m, args) : (given))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 /***** Defining new image-instantiator types *****/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
166 #define DECLARE_IMAGE_INSTANTIATOR_FORMAT(format) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 extern struct image_instantiator_methods *format##_image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
169 #define DEFINE_IMAGE_INSTANTIATOR_FORMAT(format) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 struct image_instantiator_methods *format##_image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
172 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name) \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
173 do { \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
174 format##_image_instantiator_methods = \
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
175 xnew_and_zero (struct image_instantiator_methods); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
176 format##_image_instantiator_methods->symbol = Q##format; \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
177 format##_image_instantiator_methods->device = Qnil; \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
178 format##_image_instantiator_methods->keywords = \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
179 Dynarr_new (ii_keyword_entry); \
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
180 format##_image_instantiator_methods->consoles = \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
181 Dynarr_new (console_type_entry); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
182 add_entry_to_image_instantiator_format_list \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
183 (Q##format, format##_image_instantiator_methods); \
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
184 dumpstruct (&format##_image_instantiator_methods, \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
185 &iim_description); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
186 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
188 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
189 do { \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
190 defsymbol (&Q##format, obj_name); \
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
191 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name);\
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
192 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
193
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 /* Declare that image-instantiator format FORMAT has method M; used in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 initialization routines */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 #define IIFORMAT_HAS_METHOD(format, m) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (format##_image_instantiator_methods->m##_method = format##_##m)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
199 #define IIFORMAT_HAS_SHARED_METHOD(format, m, type) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
200 (format##_image_instantiator_methods->m##_method = type##_##m)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
201
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 /* Declare that KEYW is a valid keyword for image-instantiator format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 FORMAT. VALIDATE_FUN if a function that returns whether the data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 is valid. The keyword may not appear more than once. */
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
205 #define IIFORMAT_VALID_KEYWORD(format, keyw, validate_fun) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 do { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 struct ii_keyword_entry entry; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 entry.keyword = keyw; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 entry.validate = validate_fun; \
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
211 entry.multiple_p = 0; \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 Dynarr_add (format##_image_instantiator_methods->keywords, \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 entry); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 /* Same as IIFORMAT_VALID_KEYWORD except that the keyword may
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 appear multiple times. */
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
218 #define IIFORMAT_VALID_MULTI_KEYWORD(format, keyword, validate_fun) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
219 do { \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
220 struct ii_keyword_entry entry; \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
221 \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
222 entry.keyword = keyword; \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
223 entry.validate = validate_fun; \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
224 entry.multiple_p = 1; \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
225 Dynarr_add (format##_image_instantiator_methods->keywords, \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
226 entry); \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
229 /* Declare that image-instantiator format FORMAT is supported on
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
230 CONSOLE type. */
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
231 #define IIFORMAT_VALID_CONSOLE(console, format) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
232 do { \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
233 struct console_type_entry entry; \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
234 \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
235 entry.symbol = Q##console; \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
236 entry.meths = console##_console_methods; \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
237 Dynarr_add (format##_image_instantiator_methods->consoles, \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
238 entry); \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
239 } while (0)
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
240
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
241 #define DEFINE_DEVICE_IIFORMAT(type, format)\
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
242 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
243 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
244
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
245 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
246 do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
247 type##_##format##_image_instantiator_methods = \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
248 xnew_and_zero (struct image_instantiator_methods); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
249 type##_##format##_image_instantiator_methods->symbol = Q##format; \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
250 type##_##format##_image_instantiator_methods->device = Q##type; \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
251 type##_##format##_image_instantiator_methods->keywords = \
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
252 Dynarr_new (ii_keyword_entry); \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
253 add_entry_to_device_ii_format_list \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
254 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
255 IIFORMAT_VALID_CONSOLE(type,format); \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
256 dumpstruct (&type##_##format##_image_instantiator_methods, \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
257 &iim_description); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
258 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
259
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
260 /* Declare that image-instantiator format FORMAT has method M; used in
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
261 initialization routines */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
262 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
263 (type##_##format##_image_instantiator_methods->m##_method = type##_##format##_##m)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
264 #define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
265 (type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m)
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
266
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
267 struct image_instantiator_methods *
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
268 decode_device_ii_format (Lisp_Object device, Lisp_Object format,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
269 Error_behavior errb);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
270 struct image_instantiator_methods *
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
271 decode_image_instantiator_format (Lisp_Object format, Error_behavior errb);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
272
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 void add_entry_to_image_instantiator_format_list (Lisp_Object symbol,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 struct image_instantiator_methods *meths);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
275 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
276 struct image_instantiator_methods *meths);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 Lisp_Object find_keyword_in_vector (Lisp_Object vector,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 Lisp_Object keyword);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 Lisp_Object find_keyword_in_vector_or_given (Lisp_Object vector,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 Lisp_Object keyword,
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 124
diff changeset
281 Lisp_Object default_);
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 371
diff changeset
282 Lisp_Object simple_image_type_normalize (Lisp_Object inst,
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
283 Lisp_Object console_type,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
284 Lisp_Object image_type_tag);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
285 Lisp_Object potential_pixmap_file_instantiator (Lisp_Object instantiator,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
286 Lisp_Object file_keyword,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
287 Lisp_Object data_keyword,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
288 Lisp_Object console_type);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 void check_valid_string (Lisp_Object data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 void check_valid_int (Lisp_Object data);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
291 void check_valid_face (Lisp_Object data);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
292 void check_valid_vector (Lisp_Object data);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
293 void check_valid_item_list_1 (Lisp_Object items);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
294
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
295 void initialize_subwindow_image_instance (struct Lisp_Image_Instance*);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
296 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
297 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
298 int dest_mask, Lisp_Object domain);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
299 void widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
300 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
301 int dest_mask, Lisp_Object domain, int default_textheight,
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
302 int default_pixheight, int default_textwidth);
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
303
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 int given_dest_mask,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 int desired_dest_mask));
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
307 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object));
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
308 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
309
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
310 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
311 /* Image Specifier Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
312 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 DECLARE_SPECIFIER_TYPE (image);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 #define XIMAGE_SPECIFIER(x) XSPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 #define XSETIMAGE_SPECIFIER(x, p) XSETSPECIFIER_TYPE (x, p, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 #define IMAGE_SPECIFIERP(x) SPECIFIER_TYPEP (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 #define CHECK_IMAGE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 #define CONCHECK_IMAGE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 void set_image_attached_to (Lisp_Object obj, Lisp_Object face_or_glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 Lisp_Object property);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 struct image_specifier
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 int allowed;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 Lisp_Object attachee; /* face or glyph this is attached to, or nil */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 Lisp_Object attachee_property;/* property of that face or glyph */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 #define IMAGE_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, image))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 #define IMAGE_SPECIFIER_ALLOWED(g) (IMAGE_SPECIFIER_DATA (g)->allowed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 #define IMAGE_SPECIFIER_ATTACHEE(g) (IMAGE_SPECIFIER_DATA (g)->attachee)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 #define IMAGE_SPECIFIER_ATTACHEE_PROPERTY(g) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (IMAGE_SPECIFIER_DATA (g)->attachee_property)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 #define XIMAGE_SPECIFIER_ALLOWED(g) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 IMAGE_SPECIFIER_ALLOWED (XIMAGE_SPECIFIER (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
340 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
341 /* Image Instance Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
342 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
344 DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
345 #define XIMAGE_INSTANCE(x) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
346 XRECORD (x, image_instance, struct Lisp_Image_Instance)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 enum image_instance_type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 IMAGE_UNKNOWN,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 IMAGE_NOTHING,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 IMAGE_TEXT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 IMAGE_MONO_PIXMAP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 IMAGE_COLOR_PIXMAP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 IMAGE_POINTER,
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
360 IMAGE_SUBWINDOW,
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
361 IMAGE_WIDGET,
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
362 IMAGE_LAYOUT
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 #define IMAGE_NOTHING_MASK (1 << 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 #define IMAGE_TEXT_MASK (1 << 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 #define IMAGE_MONO_PIXMAP_MASK (1 << 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 #define IMAGE_COLOR_PIXMAP_MASK (1 << 3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 #define IMAGE_POINTER_MASK (1 << 4)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 #define IMAGE_SUBWINDOW_MASK (1 << 5)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
371 #define IMAGE_WIDGET_MASK (1 << 6)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
372 #define IMAGE_LAYOUT_MASK (1 << 7)
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 406
diff changeset
373
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 #define IMAGE_INSTANCE_TYPE_P(ii, type) \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
375 (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
377 #define NOTHING_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
378 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_NOTHING)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
379 #define TEXT_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
380 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_TEXT)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
381 #define MONO_PIXMAP_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
382 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_MONO_PIXMAP)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
383 #define COLOR_PIXMAP_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
384 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_COLOR_PIXMAP)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
385 #define POINTER_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
386 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
387 #define SUBWINDOW_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
388 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
389 #define WIDGET_IMAGE_INSTANCEP(ii) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
390 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
391 #define LAYOUT_IMAGE_INSTANCEP(ii) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
392 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
394 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
395 CHECK_IMAGE_INSTANCE (x); \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
396 if (!NOTHING_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
397 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
398 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
400 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
401 CHECK_IMAGE_INSTANCE (x); \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
402 if (!TEXT_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
403 x = wrong_type_argument (Qtext_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
404 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
406 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
407 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
408 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
409 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
410 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
412 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
413 CHECK_IMAGE_INSTANCE (x); \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
414 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
415 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
416 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
418 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
419 CHECK_IMAGE_INSTANCE (x); \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
420 if (!POINTER_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
421 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
422 } while (0)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
423
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
424 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
425 CHECK_IMAGE_INSTANCE (x); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
426 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
427 && !WIDGET_IMAGE_INSTANCEP (x)) \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
428 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
429 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
431 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
432 CHECK_IMAGE_INSTANCE (x); \
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
433 if (!WIDGET_IMAGE_INSTANCEP (x)) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
434 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
435 } while (0)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
436
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
437 #define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
438 CHECK_IMAGE_INSTANCE (x); \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
439 if (!LAYOUT_IMAGE_INSTANCEP (x)) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
440 x = wrong_type_argument (Qlayout_image_instance_p, (x)); \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
441 } while (0)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
442
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 struct Lisp_Image_Instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 struct lcrecord_header header;
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
446 Lisp_Object device;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 Lisp_Object name;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 enum image_instance_type type;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
449 int x_offset, y_offset; /* for layout purposes */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
450 unsigned int dirty : 1;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 union
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
452 {
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
453 struct
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 {
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
455 Lisp_Object string;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
456 } text;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
457 struct
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
458 {
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
459 int width, height, depth;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
460 int slice, maxslice, timeout;
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
461 Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
462 Lisp_Object filename; /* string or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
463 Lisp_Object mask_filename; /* string or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
464 Lisp_Object fg, bg; /* foreground and background colors,
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
465 if this is a colorized mono-pixmap
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
466 or a pointer */
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
467 Lisp_Object auxdata; /* list or Qnil: any additional data
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
468 to be seen from lisp */
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
469 void* mask; /* mask that can be seen from all windowing systems */
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
470 } pixmap; /* used for pointers as well */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
471 struct
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
472 {
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
473 Lisp_Object frame;
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
474 unsigned int width, height;
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
475 void* subwindow; /* specific devices can use this as necessary */
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
476 unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
477 union
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
478 {
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
479 struct
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
480 {
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
481 Lisp_Object face; /* foreground and background colors */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
482 Lisp_Object type;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
483 Lisp_Object props; /* properties */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
484 Lisp_Object gui_item; /* a list of gui_items */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
485 } widget; /* widgets are subwindows */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
486 struct
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
487 {
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
488 Lisp_Object children; /* managed children */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
489 Lisp_Object border; /* Style of enclosing border or text. */
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
490 } layout;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
491 } s;
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
492 } subwindow;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
493 } u;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 /* console-type- and image-type-specific data */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 void *data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 #define IMAGE_INSTANCE_NAME(i) ((i)->name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 #define IMAGE_INSTANCE_TYPE(i) ((i)->type)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
502 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
503 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
504 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
505 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
507 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
508
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
509 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
511 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) ((i)->u.pixmap.width)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
512 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) ((i)->u.pixmap.height)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 #define IMAGE_INSTANCE_PIXMAP_DEPTH(i) ((i)->u.pixmap.depth)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 #define IMAGE_INSTANCE_PIXMAP_FILENAME(i) ((i)->u.pixmap.filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 #define IMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) ((i)->u.pixmap.mask_filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) ((i)->u.pixmap.hotspot_x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) ((i)->u.pixmap.hotspot_y)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
520 #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
521 #define IMAGE_INSTANCE_PIXMAP_MASK(i) ((i)->u.pixmap.mask)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
522 #define IMAGE_INSTANCE_PIXMAP_SLICE(i) ((i)->u.pixmap.slice)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
523 #define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
524 #define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
526 #define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) ((i)->u.subwindow.width)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
527 #define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) ((i)->u.subwindow.height)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
528 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
529 #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
530 #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
531 ((i)->u.subwindow.being_displayed)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
532
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
533 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
534 IMAGE_INSTANCE_SUBWINDOW_WIDTH(i)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
535 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
536 IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
537 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
538 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
539 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.s.widget.face)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
540 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
541 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
542 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
543 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
544 IMAGE_INSTANCE_WIDGET_ITEMS (i))
418
e804706bfb8c Import from CVS: tag r21-2-17
cvs
parents: 412
diff changeset
545 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
546
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
547 #define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.s.layout.children)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
548 #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.s.layout.border)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
549
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 #define XIMAGE_INSTANCE_DEVICE(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 #define XIMAGE_INSTANCE_NAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 #define XIMAGE_INSTANCE_TYPE(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
556 #define XIMAGE_INSTANCE_XOFFSET(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
557 IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
558 #define XIMAGE_INSTANCE_YOFFSET(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
559 IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
560 #define XIMAGE_INSTANCE_DIRTYP(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
561 IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 #define XIMAGE_INSTANCE_TEXT_STRING(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 IMAGE_INSTANCE_PIXMAP_WIDTH (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 #define XIMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 IMAGE_INSTANCE_PIXMAP_HEIGHT (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 #define XIMAGE_INSTANCE_PIXMAP_DEPTH(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 IMAGE_INSTANCE_PIXMAP_DEPTH (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 #define XIMAGE_INSTANCE_PIXMAP_FILENAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 IMAGE_INSTANCE_PIXMAP_FILENAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 #define XIMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 #define XIMAGE_INSTANCE_PIXMAP_FG(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 #define XIMAGE_INSTANCE_PIXMAP_BG(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
584 #define XIMAGE_INSTANCE_PIXMAP_MASK(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
585 IMAGE_INSTANCE_PIXMAP_MASK (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
586 #define XIMAGE_INSTANCE_PIXMAP_SLICE(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
587 IMAGE_INSTANCE_PIXMAP_SLICE (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
588 #define XIMAGE_INSTANCE_PIXMAP_MAXSLICE(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
589 IMAGE_INSTANCE_PIXMAP_MAXSLICE (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
590 #define XIMAGE_INSTANCE_PIXMAP_TIMEOUT(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
591 IMAGE_INSTANCE_PIXMAP_TIMEOUT (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
593 #define XIMAGE_INSTANCE_WIDGET_WIDTH(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
594 IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
595 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
596 IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
597 #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
598 IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
599 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
600 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
601 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
602 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
418
e804706bfb8c Import from CVS: tag r21-2-17
cvs
parents: 412
diff changeset
603 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
e804706bfb8c Import from CVS: tag r21-2-17
cvs
parents: 412
diff changeset
604 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
605 #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
606 IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
607 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
608 IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
609
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
610 #define XIMAGE_INSTANCE_LAYOUT_CHILDREN(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
611 IMAGE_INSTANCE_LAYOUT_CHILDREN (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
612 #define XIMAGE_INSTANCE_LAYOUT_BORDER(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
613 IMAGE_INSTANCE_LAYOUT_BORDER (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
614
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
615 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
616 IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
617 #define XIMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
618 IMAGE_INSTANCE_SUBWINDOW_HEIGHT (XIMAGE_INSTANCE (i))
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
619 #define XIMAGE_INSTANCE_SUBWINDOW_ID(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
620 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
621 #define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
622 IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i))
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
623 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
624 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i))
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 406
diff changeset
625
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
626 #define MARK_IMAGE_INSTANCE_CHANGED(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
627 (IMAGE_INSTANCE_DIRTYP (i) = 1);
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
628
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
629 #ifdef HAVE_XPM
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
630 Lisp_Object evaluate_xpm_color_symbols (void);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
631 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
632 #endif /* HAVE_XPM */
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
633 #ifdef HAVE_WINDOW_SYSTEM
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
634 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
635 int ok_if_data_invalid);
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
636 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
637 unsigned int *height, unsigned char **datap,
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
638 int *x_hot, int *y_hot);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
639 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
640 Lisp_Object mask_file,
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
641 Lisp_Object console_type);
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
642 #endif
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
643
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
644 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
645 /* Glyph Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
646 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
647
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 enum glyph_type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650 GLYPH_UNKNOWN,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651 GLYPH_BUFFER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652 GLYPH_POINTER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 GLYPH_ICON
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 struct Lisp_Glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 enum glyph_type type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662 /* specifiers: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663 Lisp_Object image; /* the actual image */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664 Lisp_Object contrib_p; /* whether to figure into line height */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 Lisp_Object baseline; /* percent above baseline */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 Lisp_Object face; /* if non-nil, face to use when displaying */
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
668
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
669 Lisp_Object plist;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670 void (*after_change) (Lisp_Object glyph, Lisp_Object property,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671 Lisp_Object locale);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
672
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
673 unsigned int dirty : 1; /* So that we can selectively
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
674 redisplay changed glyphs. */
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
675 };
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
677 DECLARE_LRECORD (glyph, struct Lisp_Glyph);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
678 #define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680 #define GLYPHP(x) RECORDP (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
684 #define CHECK_BUFFER_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
685 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
686 if (XGLYPH (x)->type != GLYPH_BUFFER) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
687 x = wrong_type_argument (Qbuffer_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
688 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
690 #define CHECK_POINTER_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
691 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
692 if (XGLYPH (x)->type != GLYPH_POINTER) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
693 x = wrong_type_argument (Qpointer_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
694 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
696 #define CHECK_ICON_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
697 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
698 if (XGLYPH (x)->type != GLYPH_ICON) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
699 x = wrong_type_argument (Qicon_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
700 } while (0)
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 GLYPH_TYPE(g) ((g)->type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 #define GLYPH_IMAGE(g) ((g)->image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
704 #define GLYPH_CONTRIB_P(g) ((g)->contrib_p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705 #define GLYPH_BASELINE(g) ((g)->baseline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706 #define GLYPH_FACE(g) ((g)->face)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
707 #define GLYPH_DIRTYP(g) ((g)->dirty)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
709 #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710 #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711 #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
714 #define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
716 #define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1);
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
717
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
718 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
719 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 418
diff changeset
720 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
721 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge, Q_border;
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 280
diff changeset
722 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
723 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
724 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
725 extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
726 extern Lisp_Object Q_orientation;
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
727 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph;
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
728 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729 extern Lisp_Object Vxemacs_logo;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
731 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object frame_face,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
732 face_index window_findex,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
733 Lisp_Object window);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
734 unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object frame_face,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
735 face_index window_findex,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
736 Lisp_Object window);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
737 unsigned short glyph_descent (Lisp_Object glyph,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
738 Lisp_Object frame_face,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
739 face_index window_findex,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
740 Lisp_Object window);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
741 unsigned short glyph_height (Lisp_Object glyph, Lisp_Object frame_face,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
742 face_index window_findex,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
743 Lisp_Object window);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
744 Lisp_Object glyph_baseline (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
745 Lisp_Object glyph_face (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
746 int glyph_contrib_p (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
747 Lisp_Object glyph_image_instance (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
748 Lisp_Object domain,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
749 Error_behavior errb, int no_quit);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
750 void file_or_data_must_be_present (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
751 void data_must_be_present (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
752 Lisp_Object make_string_from_file (Lisp_Object file);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
753 Lisp_Object tagged_vector_to_alist (Lisp_Object vector);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
754 Lisp_Object alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
755 void string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
756 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
757 int dest_mask, Lisp_Object domain);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 Lisp_Object allocate_glyph (enum glyph_type type,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
759 void (*after_change) (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 Lisp_Object property,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761 Lisp_Object locale));
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
762 Lisp_Object widget_face_font_info (Lisp_Object domain, Lisp_Object face,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
763 int *height, int *width);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
764 void widget_text_to_pixel_conversion (Lisp_Object domain, Lisp_Object face,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
765 int th, int tw,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
766 int* height, int* width);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
767 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device);
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
768 void disable_glyph_animated_timeout (int i);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
770 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
771 /* Glyph Cachels */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
772 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
774 typedef struct glyph_cachel glyph_cachel;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775 struct glyph_cachel
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 Lisp_Object glyph;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
779 unsigned int dirty :1; /* I'm copying faces here. I'm not
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
780 sure why we need two dirty
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
781 flags. Maybe because an image
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
782 instance can be dirty and so we
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
783 need to frob this in the same way
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
784 as other image instance properties. */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 unsigned int updated :1;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
786
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 unsigned short width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 unsigned short ascent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789 unsigned short descent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 #define CONT_GLYPH_INDEX (glyph_index) 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 #define TRUN_GLYPH_INDEX (glyph_index) 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794 #define HSCROLL_GLYPH_INDEX (glyph_index) 2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 #define CONTROL_GLYPH_INDEX (glyph_index) 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 #define OCT_ESC_GLYPH_INDEX (glyph_index) 4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 #define INVIS_GLYPH_INDEX (glyph_index) 5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
799 #define GLYPH_CACHEL(window, index) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
800 Dynarr_atp (window->glyph_cachels, index)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
801 #define GLYPH_CACHEL_GLYPH(window, index) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
802 Dynarr_atp (window->glyph_cachels, index)->glyph
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
803 #define GLYPH_CACHEL_WIDTH(window, index) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
804 Dynarr_atp (window->glyph_cachels, index)->width
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
805 #define GLYPH_CACHEL_ASCENT(window, index) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
806 Dynarr_atp (window->glyph_cachels, index)->ascent
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
807 #define GLYPH_CACHEL_DESCENT(window, index) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
808 Dynarr_atp (window->glyph_cachels, index)->descent
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
809 #define GLYPH_CACHEL_DIRTYP(window, index) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
810 Dynarr_atp (window->glyph_cachels, index)->dirty
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 406
diff changeset
811
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
812 void mark_glyph_cachels (glyph_cachel_dynarr *elements);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 void mark_glyph_cachels_as_not_updated (struct window *w);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
814 void mark_glyph_cachels_as_clean (struct window *w);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815 void reset_glyph_cachels (struct window *w);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
816 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
817
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 #ifdef MEMORY_USAGE_STATS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 struct overhead_stats *ovstats);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 #endif /* MEMORY_USAGE_STATS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
823 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
824 /* Display Tables */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
825 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
827 Lisp_Object display_table_entry (Emchar, Lisp_Object, Lisp_Object);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
828 void get_display_tables (struct window *, face_index,
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
829 Lisp_Object *, Lisp_Object *);
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
830
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
831 /****************************************************************************
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
832 * Subwindow Object *
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 380
diff changeset
833 ****************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
835 /* redisplay needs a per-frame cache of subwindows being displayed so
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
836 * that we known when to unmap them */
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
837 typedef struct subwindow_cachel subwindow_cachel;
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
838 struct subwindow_cachel
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
839 {
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
840 Lisp_Object subwindow;
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
841 int x, y;
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
842 int width, height;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
843 unsigned int being_displayed : 1;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
844 unsigned int updated : 1;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
845 };
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
846
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
847 typedef struct
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
848 {
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
849 Dynarr_declare (subwindow_cachel);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
850 } subwindow_cachel_dynarr;
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 396
diff changeset
851
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
852 void mark_subwindow_cachels (subwindow_cachel_dynarr *elements);
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
853 void mark_subwindow_cachels_as_not_updated (struct frame *f);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
854 void reset_subwindow_cachels (struct frame *f);
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
855 void unmap_subwindow (Lisp_Object subwindow);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
856 void map_subwindow (Lisp_Object subwindow, int x, int y,
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
857 struct display_glyph_area *dga);
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
858 void update_frame_subwindows (struct frame *f);
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
859 int find_matching_subwindow (struct frame* f, int x, int y, int width, int height);
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
860
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
861 struct expose_ignore
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
862 {
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
863 int x;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
864 int y;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
865 int width;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
866 int height;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
867 struct expose_ignore *next;
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
868 };
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
869
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
870 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height);
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
871 extern int hold_ignored_expose_registration;
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
872
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 410
diff changeset
873 #endif /* _XEMACS_GLYPHS_H_ */