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