annotate src/glyphs.h @ 280:7df0dd720c89 r21-0b38

Import from CVS: tag r21-0b38
author cvs
date Mon, 13 Aug 2007 10:32:22 +0200
parents 90d73dddcdc4
children e11d67e05968
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 #ifndef _XEMACS_GLYPHS_H_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 #define _XEMACS_GLYPHS_H_
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"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 272
diff changeset
29 extern Lisp_Object Qxpm;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
30 #ifdef HAVE_XPM
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
31 extern Lisp_Object Q_color_symbols;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
32 Lisp_Object evaluate_xpm_color_symbols (void);
280
7df0dd720c89 Import from CVS: tag r21-0b38
cvs
parents: 278
diff changeset
33 Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
34 #endif
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
35
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
36 DOESNT_RETURN signal_image_error (CONST char *, Lisp_Object);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
37 DOESNT_RETURN signal_image_error_2 (CONST char *, Lisp_Object, Lisp_Object);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 272
diff changeset
38
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
39 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
40 /* Image Instantiators */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
41 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 struct image_instantiator_methods;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 /* Remember the distinction between image instantiator formats and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 image instance types. Here's an approximate mapping:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
48 image instantiator format image instance type
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
49 ------------------------- -------------------
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
50 nothing nothing
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
51 string text
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
52 formatted-string text
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
53 xbm mono-pixmap, color-pixmap, pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
54 xpm color-pixmap, mono-pixmap, pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
55 xface mono-pixmap, color-pixmap, pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
56 gif color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
57 jpeg color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
58 png color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
59 tiff color-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
60 cursor-font pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
61 font pointer
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
62 subwindow subwindow
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
63 inherit mono-pixmap
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
64 autodetect mono-pixmap, color-pixmap, pointer, text
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 /* These are methods specific to a particular format of image instantiator
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (e.g. xpm, string, etc.). */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
70 typedef struct ii_keyword_entry ii_keyword_entry;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
71 struct ii_keyword_entry
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
72 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
73 Lisp_Object keyword;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
74 void (*validate) (Lisp_Object data);
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
75 int multiple_p;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
76 };
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 typedef struct
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
79 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
80 Dynarr_declare (ii_keyword_entry);
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
81 } ii_keyword_entry_dynarr;
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
82
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 struct image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 Lisp_Object symbol;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
87 ii_keyword_entry_dynarr *keywords;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 /* Implementation specific methods: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 /* Validate method: Given an instantiator vector, signal an error if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 it's invalid for this image-instantiator format. Note that this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 validation only occurs after all the keyword-specific validation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 has already been performed. This is chiefly useful for making
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 sure that certain required keywords are present. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 void (*validate_method) (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 /* Normalize method: Given an instantiator, convert it to the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 that should be used in a glyph, for devices of type CONSOLE_TYPE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 Signal an error if conversion fails. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 Lisp_Object (*normalize_method) (Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 Lisp_Object console_type);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 /* Possible-dest-types method: Return a mask indicating what dest types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 are compatible with this format. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 int (*possible_dest_types_method) (void);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 /* Instantiate method: Given an instantiator and a partially
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 filled-in image instance, complete the filling-in. Return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 non-zero if the instantiation succeeds, 0 if it fails.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 This must be present. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 void (*instantiate_method) (Lisp_Object image_instance,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 Lisp_Object pointer_fg,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 Lisp_Object pointer_bg,
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
115 int dest_mask,
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
116 Lisp_Object domain);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 /***** Calling an image-instantiator method *****/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 #define HAS_IIFORMAT_METH_P(mstruc, m) ((mstruc)->m##_method)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 #define IIFORMAT_METH(mstruc, m, args) (((mstruc)->m##_method) args)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 /* Call a void-returning specifier method, if it exists */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 #define MAYBE_IIFORMAT_METH(mstruc, m, args) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 do { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 struct image_instantiator_methods *_maybe_iiformat_meth_mstruc = (mstruc); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 if (HAS_IIFORMAT_METH_P (_maybe_iiformat_meth_mstruc, m)) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 IIFORMAT_METH (_maybe_iiformat_meth_mstruc, m, args); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 /* Call a specifier method, if it exists; otherwise return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 the specified value */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
135 #define IIFORMAT_METH_OR_GIVEN(mstruc, m, args, given) \
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
136 (HAS_IIFORMAT_METH_P (mstruc, m) ? \
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
137 IIFORMAT_METH (mstruc, m, args) : (given))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 /***** Defining new image-instantiator types *****/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
141 #define DECLARE_IMAGE_INSTANTIATOR_FORMAT(format) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 extern struct image_instantiator_methods *format##_image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
144 #define DEFINE_IMAGE_INSTANTIATOR_FORMAT(format) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 struct image_instantiator_methods *format##_image_instantiator_methods
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
148 do { \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
149 format##_image_instantiator_methods = \
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
150 xnew_and_zero (struct image_instantiator_methods); \
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
151 defsymbol (&Q##format, obj_name); \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
152 format##_image_instantiator_methods->symbol = Q##format; \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
153 format##_image_instantiator_methods->keywords = \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
154 Dynarr_new (ii_keyword_entry); \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
155 add_entry_to_image_instantiator_format_list \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
156 (Q##format, format##_image_instantiator_methods); \
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
157 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 /* Declare that image-instantiator format FORMAT has method M; used in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 initialization routines */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 #define IIFORMAT_HAS_METHOD(format, m) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (format##_image_instantiator_methods->m##_method = format##_##m)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 /* Declare that KEYW is a valid keyword for image-instantiator format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 FORMAT. VALIDATE_FUN if a function that returns whether the data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 is valid. The keyword may not appear more than once. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 #define IIFORMAT_VALID_KEYWORD(format, keyw, validate_fun) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 do { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 struct ii_keyword_entry entry; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 entry.keyword = keyw; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 entry.validate = validate_fun; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 entry.multiple_p = 0; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 Dynarr_add (format##_image_instantiator_methods->keywords, \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 entry); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 /* Same as IIFORMAT_VALID_KEYWORD except that the keyword may
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 appear multiple times. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 #define IIFORMAT_VALID_MULTI_KEYWORD(format, keyword, validate_fun) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 do { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 struct ii_keyword_entry entry; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 entry.keyword = keyword; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 entry.validate = validate_fun; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 entry.multiple_p = 1; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 Dynarr_add (format##_image_instantiator_methods->keywords, \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 entry); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 } while (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 void add_entry_to_image_instantiator_format_list (Lisp_Object symbol,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 struct image_instantiator_methods *meths);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 Lisp_Object find_keyword_in_vector (Lisp_Object vector,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 Lisp_Object keyword);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 Lisp_Object find_keyword_in_vector_or_given (Lisp_Object vector,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 Lisp_Object keyword,
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 124
diff changeset
197 Lisp_Object default_);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
198 Lisp_Object simple_image_type_normalize (Lisp_Object inst,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
199 Lisp_Object console_type,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
200 Lisp_Object image_type_tag);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
201 Lisp_Object potential_pixmap_file_instantiator (Lisp_Object instantiator,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
202 Lisp_Object file_keyword,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
203 Lisp_Object data_keyword,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
204 Lisp_Object console_type);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 void check_valid_string (Lisp_Object data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 void check_valid_int (Lisp_Object data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 int given_dest_mask,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 int desired_dest_mask));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
211 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
212 /* Image Specifier Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
213 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 DECLARE_SPECIFIER_TYPE (image);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 #define XIMAGE_SPECIFIER(x) XSPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 #define XSETIMAGE_SPECIFIER(x, p) XSETSPECIFIER_TYPE (x, p, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 #define IMAGE_SPECIFIERP(x) SPECIFIER_TYPEP (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 #define CHECK_IMAGE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 #define CONCHECK_IMAGE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 void set_image_attached_to (Lisp_Object obj, Lisp_Object face_or_glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 Lisp_Object property);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 struct image_specifier
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 int allowed;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 Lisp_Object attachee; /* face or glyph this is attached to, or nil */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 Lisp_Object attachee_property;/* property of that face or glyph */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 #define IMAGE_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, image))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 #define IMAGE_SPECIFIER_ALLOWED(g) (IMAGE_SPECIFIER_DATA (g)->allowed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 #define IMAGE_SPECIFIER_ATTACHEE(g) (IMAGE_SPECIFIER_DATA (g)->attachee)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 #define IMAGE_SPECIFIER_ATTACHEE_PROPERTY(g) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 (IMAGE_SPECIFIER_DATA (g)->attachee_property)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 #define XIMAGE_SPECIFIER_ALLOWED(g) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 IMAGE_SPECIFIER_ALLOWED (XIMAGE_SPECIFIER (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
241 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
242 /* Image Instance Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
243 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 #define XIMAGE_INSTANCE(x) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 XRECORD (x, image_instance, struct Lisp_Image_Instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 #define GC_IMAGE_INSTANCEP(x) GC_RECORDP (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 enum image_instance_type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 IMAGE_UNKNOWN,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 IMAGE_NOTHING,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 IMAGE_TEXT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 IMAGE_MONO_PIXMAP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 IMAGE_COLOR_PIXMAP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 IMAGE_POINTER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 IMAGE_SUBWINDOW
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 #define IMAGE_NOTHING_MASK (1 << 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 #define IMAGE_TEXT_MASK (1 << 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 #define IMAGE_MONO_PIXMAP_MASK (1 << 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 #define IMAGE_COLOR_PIXMAP_MASK (1 << 3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 #define IMAGE_POINTER_MASK (1 << 4)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 #define IMAGE_SUBWINDOW_MASK (1 << 5)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 #define IMAGE_INSTANCE_TYPE_P(ii, type) \
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
273 (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
275 #define NOTHING_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
276 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_NOTHING)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
277 #define TEXT_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
278 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_TEXT)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
279 #define MONO_PIXMAP_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
280 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_MONO_PIXMAP)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
281 #define COLOR_PIXMAP_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
282 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_COLOR_PIXMAP)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
283 #define POINTER_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
284 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
285 #define SUBWINDOW_IMAGE_INSTANCEP(ii) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
286 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
288 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
289 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
290 if (!NOTHING_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
291 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
292 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
294 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
295 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
296 if (!TEXT_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
297 x = wrong_type_argument (Qtext_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
298 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
300 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
301 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
302 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
303 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
304 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
306 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
307 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
308 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
309 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
310 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
312 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
313 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
314 if (!POINTER_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
315 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
316 } while (0)
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
317
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
318 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
319 CHECK_IMAGE_INSTANCE (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
320 if (!SUBWINDOW_IMAGE_INSTANCEP (x)) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
321 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
322 } while (0)
0
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 Lisp_Image_Instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 Lisp_Object device;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 Lisp_Object name;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 enum image_instance_type type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 union
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
331 {
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
332 struct
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 {
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
334 Lisp_Object string;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
335 } text;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
336 struct
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
337 {
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
338 int width, height, depth;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
339 Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
340 Lisp_Object filename; /* string or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
341 Lisp_Object mask_filename; /* string or Qnil */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
342 Lisp_Object fg, bg; /* foreground and background colors,
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
343 if this is a colorized mono-pixmap
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
344 or a pointer */
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
345 Lisp_Object auxdata; /* list or Qnil: any additional data
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
346 to be seen from lisp */
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
347 } pixmap; /* used for pointers as well */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
348 struct
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
349 {
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
350 int dummy; /* #### fill in this structure */
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
351 } subwindow;
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
352 } u;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 /* console-type- and image-type-specific data */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 void *data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 #define IMAGE_INSTANCE_NAME(i) ((i)->name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 #define IMAGE_INSTANCE_TYPE(i) ((i)->type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP))
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_INSTANCE_TEXT_STRING(i) ((i)->u.text.string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) ((i)->u.pixmap.width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) ((i)->u.pixmap.height)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 #define IMAGE_INSTANCE_PIXMAP_DEPTH(i) ((i)->u.pixmap.depth)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 #define IMAGE_INSTANCE_PIXMAP_FILENAME(i) ((i)->u.pixmap.filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 #define IMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) ((i)->u.pixmap.mask_filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) ((i)->u.pixmap.hotspot_x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) ((i)->u.pixmap.hotspot_y)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 187
diff changeset
376 #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 #define XIMAGE_INSTANCE_DEVICE(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 #define XIMAGE_INSTANCE_NAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 #define XIMAGE_INSTANCE_TYPE(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 #define XIMAGE_INSTANCE_TEXT_STRING(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 IMAGE_INSTANCE_PIXMAP_WIDTH (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 #define XIMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 IMAGE_INSTANCE_PIXMAP_HEIGHT (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 #define XIMAGE_INSTANCE_PIXMAP_DEPTH(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 IMAGE_INSTANCE_PIXMAP_DEPTH (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 #define XIMAGE_INSTANCE_PIXMAP_FILENAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 IMAGE_INSTANCE_PIXMAP_FILENAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 #define XIMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 #define XIMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 #define XIMAGE_INSTANCE_PIXMAP_FG(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 #define XIMAGE_INSTANCE_PIXMAP_BG(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
407 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
408 /* Glyph Object */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
409 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 enum glyph_type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 GLYPH_UNKNOWN,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 GLYPH_BUFFER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 GLYPH_POINTER,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 GLYPH_ICON
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 struct Lisp_Glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 enum glyph_type type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 /* specifiers: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 Lisp_Object image; /* the actual image */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 Lisp_Object contrib_p; /* whether to figure into line height */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 Lisp_Object baseline; /* percent above baseline */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 Lisp_Object face; /* if non-nil, face to use when displaying */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 Lisp_Object plist;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 void (*after_change) (Lisp_Object glyph, Lisp_Object property,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 Lisp_Object locale);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 DECLARE_LRECORD (glyph, struct Lisp_Glyph);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 #define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 #define GLYPHP(x) RECORDP (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 #define GC_GLYPHP(x) GC_RECORDP (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
445 #define CHECK_BUFFER_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
446 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
447 if (XGLYPH (x)->type != GLYPH_BUFFER) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
448 x = wrong_type_argument (Qbuffer_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
449 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
451 #define CHECK_POINTER_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
452 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
453 if (XGLYPH (x)->type != GLYPH_POINTER) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
454 x = wrong_type_argument (Qpointer_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
455 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456
187
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
457 #define CHECK_ICON_GLYPH(x) do { \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
458 CHECK_GLYPH (x); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
459 if (XGLYPH (x)->type != GLYPH_ICON) \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
460 x = wrong_type_argument (Qicon_glyph_p, (x)); \
b405438285a2 Import from CVS: tag r20-3b20
cvs
parents: 185
diff changeset
461 } while (0)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 #define GLYPH_TYPE(g) ((g)->type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 #define GLYPH_IMAGE(g) ((g)->image)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 #define GLYPH_CONTRIB_P(g) ((g)->contrib_p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 #define GLYPH_BASELINE(g) ((g)->baseline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 #define GLYPH_FACE(g) ((g)->face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
475 extern Lisp_Object Q_data, Q_file, Qconst_glyph_variable;
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
476 extern Lisp_Object Qimage_conversion_error;
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
477 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph;
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
478 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 extern Lisp_Object Vxemacs_logo;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object frame_face,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 face_index window_findex,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 Lisp_Object window);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object frame_face,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 face_index window_findex,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 Lisp_Object window);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 unsigned short glyph_descent (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 Lisp_Object frame_face,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 face_index window_findex,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 Lisp_Object window);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 unsigned short glyph_height (Lisp_Object glyph, Lisp_Object frame_face,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 face_index window_findex,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 Lisp_Object window);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 Lisp_Object glyph_baseline (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 Lisp_Object glyph_face (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 int glyph_contrib_p (Lisp_Object glyph, Lisp_Object domain);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 Lisp_Object glyph_image_instance (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 Lisp_Object domain,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 Error_behavior errb, int no_quit);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 void file_or_data_must_be_present (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 void data_must_be_present (Lisp_Object instantiator);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 Lisp_Object make_string_from_file (Lisp_Object file);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 Lisp_Object tagged_vector_to_alist (Lisp_Object vector);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 Lisp_Object alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 void string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 122
diff changeset
507 int dest_mask, Lisp_Object domain);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 Lisp_Object allocate_glyph (enum glyph_type type,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 void (*after_change) (Lisp_Object glyph,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 Lisp_Object property,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 Lisp_Object locale));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
513 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
514 /* Glyph Cachels */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
515 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 173
diff changeset
517 typedef struct glyph_cachel glyph_cachel;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 struct glyph_cachel
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 Lisp_Object glyph;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 unsigned int updated :1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 unsigned short width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 unsigned short ascent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 unsigned short descent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 #define CONT_GLYPH_INDEX (glyph_index) 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 #define TRUN_GLYPH_INDEX (glyph_index) 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 #define HSCROLL_GLYPH_INDEX (glyph_index) 2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 #define CONTROL_GLYPH_INDEX (glyph_index) 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 #define OCT_ESC_GLYPH_INDEX (glyph_index) 4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 #define INVIS_GLYPH_INDEX (glyph_index) 5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
535 #define GLYPH_CACHEL(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 Dynarr_atp (window->glyph_cachels, index)
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
537 #define GLYPH_CACHEL_GLYPH(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 Dynarr_atp (window->glyph_cachels, index)->glyph
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
539 #define GLYPH_CACHEL_WIDTH(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 Dynarr_atp (window->glyph_cachels, index)->width
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
541 #define GLYPH_CACHEL_ASCENT(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 Dynarr_atp (window->glyph_cachels, index)->ascent
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
543 #define GLYPH_CACHEL_DESCENT(window, index) \
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 Dynarr_atp (window->glyph_cachels, index)->descent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 void mark_glyph_cachels (glyph_cachel_dynarr *elements,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 void (*markobj) (Lisp_Object));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 void mark_glyph_cachels_as_not_updated (struct window *w);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 void reset_glyph_cachels (struct window *w);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 #ifdef MEMORY_USAGE_STATS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 struct overhead_stats *ovstats);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 #endif /* MEMORY_USAGE_STATS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
555 /************************************************************************/
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
556 /* Display Tables */
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
557 /************************************************************************/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 #define DISP_TABLE_SIZE 256
94
1040fe1366ac Import from CVS: tag xemacs-20-0f2
cvs
parents: 70
diff changeset
560 #define DISP_CHAR_ENTRY(dp, c) ((c < (dp)->size) ? (dp)->contents[c] : Qnil)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 struct Lisp_Vector *get_display_table (struct window *, face_index);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 #endif /* _XEMACS_GLYPHS_H_ */