Mercurial > hg > xemacs-beta
comparison src/glyphs.h @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
54 font pointer | 54 font pointer |
55 subwindow subwindow | 55 subwindow subwindow |
56 inherit mono-pixmap | 56 inherit mono-pixmap |
57 autodetect mono-pixmap, color-pixmap, pointer, text | 57 autodetect mono-pixmap, color-pixmap, pointer, text |
58 button widget | 58 button widget |
59 edit widget | 59 edit-field widget |
60 combo widget | 60 combo -box widget |
61 progress-gauge widget | |
62 tab-control widget | |
63 tree-view widget | |
61 scrollbar widget | 64 scrollbar widget |
62 static widget | 65 static widget |
63 */ | 66 */ |
64 | 67 |
65 /* These are methods specific to a particular format of image instantiator | 68 /* These are methods specific to a particular format of image instantiator |
75 | 78 |
76 typedef struct | 79 typedef struct |
77 { | 80 { |
78 Dynarr_declare (ii_keyword_entry); | 81 Dynarr_declare (ii_keyword_entry); |
79 } ii_keyword_entry_dynarr; | 82 } ii_keyword_entry_dynarr; |
83 | |
84 extern const struct struct_description iim_description; | |
80 | 85 |
81 struct image_instantiator_methods | 86 struct image_instantiator_methods |
82 { | 87 { |
83 Lisp_Object symbol; | 88 Lisp_Object symbol; |
84 | 89 |
174 Dynarr_new (ii_keyword_entry); \ | 179 Dynarr_new (ii_keyword_entry); \ |
175 format##_image_instantiator_methods->consoles = \ | 180 format##_image_instantiator_methods->consoles = \ |
176 Dynarr_new (console_type_entry); \ | 181 Dynarr_new (console_type_entry); \ |
177 add_entry_to_image_instantiator_format_list \ | 182 add_entry_to_image_instantiator_format_list \ |
178 (Q##format, format##_image_instantiator_methods); \ | 183 (Q##format, format##_image_instantiator_methods); \ |
184 dumpstruct (&format##_image_instantiator_methods, \ | |
185 &iim_description); \ | |
179 } while (0) | 186 } while (0) |
180 | 187 |
181 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \ | 188 #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \ |
182 do { \ | 189 do { \ |
183 defsymbol (&Q##format, obj_name); \ | 190 defsymbol (&Q##format, obj_name); \ |
184 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name); \ | 191 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name);\ |
185 } while (0) | 192 } while (0) |
186 | 193 |
187 /* Declare that image-instantiator format FORMAT has method M; used in | 194 /* Declare that image-instantiator format FORMAT has method M; used in |
188 initialization routines */ | 195 initialization routines */ |
189 #define IIFORMAT_HAS_METHOD(format, m) \ | 196 #define IIFORMAT_HAS_METHOD(format, m) \ |
233 | 240 |
234 #define DEFINE_DEVICE_IIFORMAT(type, format)\ | 241 #define DEFINE_DEVICE_IIFORMAT(type, format)\ |
235 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ | 242 DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ |
236 struct image_instantiator_methods *type##_##format##_image_instantiator_methods | 243 struct image_instantiator_methods *type##_##format##_image_instantiator_methods |
237 | 244 |
238 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \ | 245 #define INITIALIZE_DEVICE_IIFORMAT(type, format) \ |
239 do { \ | 246 do { \ |
240 type##_##format##_image_instantiator_methods = \ | 247 type##_##format##_image_instantiator_methods = \ |
241 xnew_and_zero (struct image_instantiator_methods); \ | 248 xnew_and_zero (struct image_instantiator_methods); \ |
242 type##_##format##_image_instantiator_methods->symbol = Q##format; \ | 249 type##_##format##_image_instantiator_methods->symbol = Q##format; \ |
243 type##_##format##_image_instantiator_methods->device = Q##type; \ | 250 type##_##format##_image_instantiator_methods->device = Q##type; \ |
244 type##_##format##_image_instantiator_methods->keywords = \ | 251 type##_##format##_image_instantiator_methods->keywords = \ |
245 Dynarr_new (ii_keyword_entry); \ | 252 Dynarr_new (ii_keyword_entry); \ |
246 add_entry_to_device_ii_format_list \ | 253 add_entry_to_device_ii_format_list \ |
247 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ | 254 (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ |
248 IIFORMAT_VALID_CONSOLE(type,format); \ | 255 IIFORMAT_VALID_CONSOLE(type,format); \ |
256 dumpstruct (&type##_##format##_image_instantiator_methods, \ | |
257 &iim_description); \ | |
249 } while (0) | 258 } while (0) |
250 | 259 |
251 /* Declare that image-instantiator format FORMAT has method M; used in | 260 /* Declare that image-instantiator format FORMAT has method M; used in |
252 initialization routines */ | 261 initialization routines */ |
253 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \ | 262 #define IIFORMAT_HAS_DEVMETHOD(type, format, m) \ |
254 (type##_##format##_image_instantiator_methods->m##_method = type##_##format##_##m) | 263 (type##_##format##_image_instantiator_methods->m##_method = type##_##format##_##m) |
264 #define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \ | |
265 (type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m) | |
255 | 266 |
256 struct image_instantiator_methods * | 267 struct image_instantiator_methods * |
257 decode_device_ii_format (Lisp_Object device, Lisp_Object format, | 268 decode_device_ii_format (Lisp_Object device, Lisp_Object format, |
258 Error_behavior errb); | 269 Error_behavior errb); |
259 struct image_instantiator_methods * | 270 struct image_instantiator_methods * |
277 Lisp_Object console_type); | 288 Lisp_Object console_type); |
278 void check_valid_string (Lisp_Object data); | 289 void check_valid_string (Lisp_Object data); |
279 void check_valid_int (Lisp_Object data); | 290 void check_valid_int (Lisp_Object data); |
280 void check_valid_face (Lisp_Object data); | 291 void check_valid_face (Lisp_Object data); |
281 void check_valid_vector (Lisp_Object data); | 292 void check_valid_vector (Lisp_Object data); |
293 void check_valid_item_list_1 (Lisp_Object items); | |
282 | 294 |
283 void initialize_subwindow_image_instance (struct Lisp_Image_Instance*); | 295 void initialize_subwindow_image_instance (struct Lisp_Image_Instance*); |
284 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 296 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
285 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 297 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
286 int dest_mask, Lisp_Object domain); | 298 int dest_mask, Lisp_Object domain); |
299 void widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, | |
300 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | |
301 int dest_mask, Lisp_Object domain, int default_textheight, | |
302 int default_pixheight, int default_textwidth); | |
287 | 303 |
288 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, | 304 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator, |
289 int given_dest_mask, | 305 int given_dest_mask, |
290 int desired_dest_mask)); | 306 int desired_dest_mask)); |
291 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object)); | 307 DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object)); |
328 DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance); | 344 DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance); |
329 #define XIMAGE_INSTANCE(x) \ | 345 #define XIMAGE_INSTANCE(x) \ |
330 XRECORD (x, image_instance, struct Lisp_Image_Instance) | 346 XRECORD (x, image_instance, struct Lisp_Image_Instance) |
331 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance) | 347 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance) |
332 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) | 348 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) |
333 #define GC_IMAGE_INSTANCEP(x) GC_RECORDP (x, image_instance) | |
334 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) | 349 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) |
335 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) | 350 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) |
336 | 351 |
337 enum image_instance_type | 352 enum image_instance_type |
338 { | 353 { |
341 IMAGE_TEXT, | 356 IMAGE_TEXT, |
342 IMAGE_MONO_PIXMAP, | 357 IMAGE_MONO_PIXMAP, |
343 IMAGE_COLOR_PIXMAP, | 358 IMAGE_COLOR_PIXMAP, |
344 IMAGE_POINTER, | 359 IMAGE_POINTER, |
345 IMAGE_SUBWINDOW, | 360 IMAGE_SUBWINDOW, |
346 IMAGE_WIDGET | 361 IMAGE_WIDGET, |
362 IMAGE_LAYOUT | |
347 }; | 363 }; |
348 | 364 |
349 #define IMAGE_NOTHING_MASK (1 << 0) | 365 #define IMAGE_NOTHING_MASK (1 << 0) |
350 #define IMAGE_TEXT_MASK (1 << 1) | 366 #define IMAGE_TEXT_MASK (1 << 1) |
351 #define IMAGE_MONO_PIXMAP_MASK (1 << 2) | 367 #define IMAGE_MONO_PIXMAP_MASK (1 << 2) |
352 #define IMAGE_COLOR_PIXMAP_MASK (1 << 3) | 368 #define IMAGE_COLOR_PIXMAP_MASK (1 << 3) |
353 #define IMAGE_POINTER_MASK (1 << 4) | 369 #define IMAGE_POINTER_MASK (1 << 4) |
354 #define IMAGE_SUBWINDOW_MASK (1 << 5) | 370 #define IMAGE_SUBWINDOW_MASK (1 << 5) |
355 #define IMAGE_WIDGET_MASK (1 << 6) | 371 #define IMAGE_WIDGET_MASK (1 << 6) |
372 #define IMAGE_LAYOUT_MASK (1 << 7) | |
356 | 373 |
357 #define IMAGE_INSTANCE_TYPE_P(ii, type) \ | 374 #define IMAGE_INSTANCE_TYPE_P(ii, type) \ |
358 (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type) | 375 (IMAGE_INSTANCEP (ii) && XIMAGE_INSTANCE_TYPE (ii) == type) |
359 | 376 |
360 #define NOTHING_IMAGE_INSTANCEP(ii) \ | 377 #define NOTHING_IMAGE_INSTANCEP(ii) \ |
369 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER) | 386 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_POINTER) |
370 #define SUBWINDOW_IMAGE_INSTANCEP(ii) \ | 387 #define SUBWINDOW_IMAGE_INSTANCEP(ii) \ |
371 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW) | 388 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_SUBWINDOW) |
372 #define WIDGET_IMAGE_INSTANCEP(ii) \ | 389 #define WIDGET_IMAGE_INSTANCEP(ii) \ |
373 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET) | 390 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_WIDGET) |
374 | 391 #define LAYOUT_IMAGE_INSTANCEP(ii) \ |
375 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ | 392 IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT) |
376 CHECK_IMAGE_INSTANCE (x); \ | 393 |
394 #define CHECK_NOTHING_IMAGE_INSTANCE(x) do { \ | |
395 CHECK_IMAGE_INSTANCE (x); \ | |
377 if (!NOTHING_IMAGE_INSTANCEP (x)) \ | 396 if (!NOTHING_IMAGE_INSTANCEP (x)) \ |
378 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \ | 397 x = wrong_type_argument (Qnothing_image_instance_p, (x)); \ |
379 } while (0) | 398 } while (0) |
380 | 399 |
381 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \ | 400 #define CHECK_TEXT_IMAGE_INSTANCE(x) do { \ |
382 CHECK_IMAGE_INSTANCE (x); \ | 401 CHECK_IMAGE_INSTANCE (x); \ |
383 if (!TEXT_IMAGE_INSTANCEP (x)) \ | 402 if (!TEXT_IMAGE_INSTANCEP (x)) \ |
384 x = wrong_type_argument (Qtext_image_instance_p, (x)); \ | 403 x = wrong_type_argument (Qtext_image_instance_p, (x)); \ |
385 } while (0) | 404 } while (0) |
386 | 405 |
387 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \ | 406 #define CHECK_MONO_PIXMAP_IMAGE_INSTANCE(x) do { \ |
388 CHECK_IMAGE_INSTANCE (x); \ | 407 CHECK_IMAGE_INSTANCE (x); \ |
389 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \ | 408 if (!MONO_PIXMAP_IMAGE_INSTANCEP (x)) \ |
390 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \ | 409 x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x)); \ |
391 } while (0) | 410 } while (0) |
392 | 411 |
393 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \ | 412 #define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do { \ |
394 CHECK_IMAGE_INSTANCE (x); \ | 413 CHECK_IMAGE_INSTANCE (x); \ |
395 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \ | 414 if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x)) \ |
396 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \ | 415 x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x)); \ |
397 } while (0) | 416 } while (0) |
398 | 417 |
399 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \ | 418 #define CHECK_POINTER_IMAGE_INSTANCE(x) do { \ |
400 CHECK_IMAGE_INSTANCE (x); \ | 419 CHECK_IMAGE_INSTANCE (x); \ |
401 if (!POINTER_IMAGE_INSTANCEP (x)) \ | 420 if (!POINTER_IMAGE_INSTANCEP (x)) \ |
402 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \ | 421 x = wrong_type_argument (Qpointer_image_instance_p, (x)); \ |
403 } while (0) | 422 } while (0) |
404 | 423 |
405 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \ | 424 #define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do { \ |
406 CHECK_IMAGE_INSTANCE (x); \ | 425 CHECK_IMAGE_INSTANCE (x); \ |
407 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \ | 426 if (!SUBWINDOW_IMAGE_INSTANCEP (x) \ |
408 && !WIDGET_IMAGE_INSTANCEP (x)) \ | 427 && !WIDGET_IMAGE_INSTANCEP (x)) \ |
409 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \ | 428 x = wrong_type_argument (Qsubwindow_image_instance_p, (x)); \ |
410 } while (0) | 429 } while (0) |
411 | 430 |
412 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \ | 431 #define CHECK_WIDGET_IMAGE_INSTANCE(x) do { \ |
413 CHECK_IMAGE_INSTANCE (x); \ | 432 CHECK_IMAGE_INSTANCE (x); \ |
414 if (!WIDGET_IMAGE_INSTANCEP (x)) \ | 433 if (!WIDGET_IMAGE_INSTANCEP (x)) \ |
415 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \ | 434 x = wrong_type_argument (Qwidget_image_instance_p, (x)); \ |
435 } while (0) | |
436 | |
437 #define CHECK_LAYOUT_IMAGE_INSTANCE(x) do { \ | |
438 CHECK_IMAGE_INSTANCE (x); \ | |
439 if (!LAYOUT_IMAGE_INSTANCEP (x)) \ | |
440 x = wrong_type_argument (Qlayout_image_instance_p, (x)); \ | |
416 } while (0) | 441 } while (0) |
417 | 442 |
418 struct Lisp_Image_Instance | 443 struct Lisp_Image_Instance |
419 { | 444 { |
420 struct lcrecord_header header; | 445 struct lcrecord_header header; |
421 Lisp_Object device; | 446 Lisp_Object device; |
422 Lisp_Object name; | 447 Lisp_Object name; |
423 enum image_instance_type type; | 448 enum image_instance_type type; |
449 int x_offset, y_offset; /* for layout purposes */ | |
450 unsigned int dirty : 1; | |
424 union | 451 union |
425 { | 452 { |
426 struct | 453 struct |
427 { | 454 { |
428 Lisp_Object string; | 455 Lisp_Object string; |
429 } text; | 456 } text; |
430 struct | 457 struct |
431 { | 458 { |
432 int width, height, depth; | 459 int width, height, depth; |
460 int slice, maxslice, timeout; | |
433 Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */ | 461 Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */ |
434 Lisp_Object filename; /* string or Qnil */ | 462 Lisp_Object filename; /* string or Qnil */ |
435 Lisp_Object mask_filename; /* string or Qnil */ | 463 Lisp_Object mask_filename; /* string or Qnil */ |
436 Lisp_Object fg, bg; /* foreground and background colors, | 464 Lisp_Object fg, bg; /* foreground and background colors, |
437 if this is a colorized mono-pixmap | 465 if this is a colorized mono-pixmap |
438 or a pointer */ | 466 or a pointer */ |
439 Lisp_Object auxdata; /* list or Qnil: any additional data | 467 Lisp_Object auxdata; /* list or Qnil: any additional data |
440 to be seen from lisp */ | 468 to be seen from lisp */ |
469 void* mask; /* mask that can be seen from all windowing systems */ | |
441 } pixmap; /* used for pointers as well */ | 470 } pixmap; /* used for pointers as well */ |
442 struct | 471 struct |
443 { | 472 { |
444 Lisp_Object frame; | 473 Lisp_Object frame; |
445 unsigned int width, height; | 474 unsigned int width, height; |
446 void* subwindow; /* specific devices can use this as necessary */ | 475 void* subwindow; /* specific devices can use this as necessary */ |
447 int being_displayed; /* used to detect when needs to be unmapped */ | 476 unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */ |
448 struct | 477 union |
449 { | 478 { |
450 Lisp_Object face; /* foreground and background colors */ | 479 struct |
451 Lisp_Object type; | 480 { |
452 Lisp_Object props; /* properties */ | 481 Lisp_Object face; /* foreground and background colors */ |
453 Lisp_Object gui_item; /* a list of gui_items */ | 482 Lisp_Object type; |
454 } widget; /* widgets are subwindows */ | 483 Lisp_Object props; /* properties */ |
484 Lisp_Object gui_item; /* a list of gui_items */ | |
485 } widget; /* widgets are subwindows */ | |
486 struct | |
487 { | |
488 Lisp_Object children; /* managed children */ | |
489 Lisp_Object border; /* Style of enclosing border or text. */ | |
490 } layout; | |
491 } s; | |
455 } subwindow; | 492 } subwindow; |
456 } u; | 493 } u; |
457 | 494 |
458 /* console-type- and image-type-specific data */ | 495 /* console-type- and image-type-specific data */ |
459 void *data; | 496 void *data; |
460 }; | 497 }; |
461 | 498 |
462 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) | 499 #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) |
463 #define IMAGE_INSTANCE_NAME(i) ((i)->name) | 500 #define IMAGE_INSTANCE_NAME(i) ((i)->name) |
464 #define IMAGE_INSTANCE_TYPE(i) ((i)->type) | 501 #define IMAGE_INSTANCE_TYPE(i) ((i)->type) |
502 #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) | |
503 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) | |
465 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ | 504 #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ |
466 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ | 505 ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ |
467 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) | 506 || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) |
507 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) | |
468 | 508 |
469 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) | 509 #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) |
470 | 510 |
471 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) ((i)->u.pixmap.width) | 511 #define IMAGE_INSTANCE_PIXMAP_WIDTH(i) ((i)->u.pixmap.width) |
472 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) ((i)->u.pixmap.height) | 512 #define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) ((i)->u.pixmap.height) |
476 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) ((i)->u.pixmap.hotspot_x) | 516 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_X(i) ((i)->u.pixmap.hotspot_x) |
477 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) ((i)->u.pixmap.hotspot_y) | 517 #define IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y(i) ((i)->u.pixmap.hotspot_y) |
478 #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg) | 518 #define IMAGE_INSTANCE_PIXMAP_FG(i) ((i)->u.pixmap.fg) |
479 #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg) | 519 #define IMAGE_INSTANCE_PIXMAP_BG(i) ((i)->u.pixmap.bg) |
480 #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata) | 520 #define IMAGE_INSTANCE_PIXMAP_AUXDATA(i) ((i)->u.pixmap.auxdata) |
521 #define IMAGE_INSTANCE_PIXMAP_MASK(i) ((i)->u.pixmap.mask) | |
522 #define IMAGE_INSTANCE_PIXMAP_SLICE(i) ((i)->u.pixmap.slice) | |
523 #define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice) | |
524 #define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout) | |
481 | 525 |
482 #define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) ((i)->u.subwindow.width) | 526 #define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) ((i)->u.subwindow.width) |
483 #define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) ((i)->u.subwindow.height) | 527 #define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) ((i)->u.subwindow.height) |
484 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow) | 528 #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow) |
485 #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame) | 529 #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame) |
488 | 532 |
489 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ | 533 #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ |
490 IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) | 534 IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) |
491 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ | 535 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ |
492 IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) | 536 IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) |
493 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.widget.type) | 537 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type) |
494 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.widget.props) | 538 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props) |
495 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.widget.face) | 539 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.s.widget.face) |
496 #define IMAGE_INSTANCE_WIDGET_ITEM(i) ((i)->u.subwindow.widget.gui_item) | 540 #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item) |
497 #define IMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \ | 541 #define IMAGE_INSTANCE_WIDGET_ITEM(i) \ |
498 (CONSP (IMAGE_INSTANCE_WIDGET_ITEM (i)) ? \ | 542 (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ |
499 XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \ | 543 XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ |
500 IMAGE_INSTANCE_WIDGET_ITEM (i)) | 544 IMAGE_INSTANCE_WIDGET_ITEMS (i)) |
501 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name | 545 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name |
546 | |
547 #define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.s.layout.children) | |
548 #define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.s.layout.border) | |
502 | 549 |
503 #define XIMAGE_INSTANCE_DEVICE(i) \ | 550 #define XIMAGE_INSTANCE_DEVICE(i) \ |
504 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) | 551 IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i)) |
505 #define XIMAGE_INSTANCE_NAME(i) \ | 552 #define XIMAGE_INSTANCE_NAME(i) \ |
506 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) | 553 IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i)) |
507 #define XIMAGE_INSTANCE_TYPE(i) \ | 554 #define XIMAGE_INSTANCE_TYPE(i) \ |
508 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i)) | 555 IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i)) |
556 #define XIMAGE_INSTANCE_XOFFSET(i) \ | |
557 IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i)) | |
558 #define XIMAGE_INSTANCE_YOFFSET(i) \ | |
559 IMAGE_INSTANCE_YOFFSET (XIMAGE_INSTANCE (i)) | |
560 #define XIMAGE_INSTANCE_DIRTYP(i) \ | |
561 IMAGE_INSTANCE_DIRTYP (XIMAGE_INSTANCE (i)) | |
509 | 562 |
510 #define XIMAGE_INSTANCE_TEXT_STRING(i) \ | 563 #define XIMAGE_INSTANCE_TEXT_STRING(i) \ |
511 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i)) | 564 IMAGE_INSTANCE_TEXT_STRING (XIMAGE_INSTANCE (i)) |
512 | 565 |
513 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \ | 566 #define XIMAGE_INSTANCE_PIXMAP_WIDTH(i) \ |
526 IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (XIMAGE_INSTANCE (i)) | 579 IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (XIMAGE_INSTANCE (i)) |
527 #define XIMAGE_INSTANCE_PIXMAP_FG(i) \ | 580 #define XIMAGE_INSTANCE_PIXMAP_FG(i) \ |
528 IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i)) | 581 IMAGE_INSTANCE_PIXMAP_FG (XIMAGE_INSTANCE (i)) |
529 #define XIMAGE_INSTANCE_PIXMAP_BG(i) \ | 582 #define XIMAGE_INSTANCE_PIXMAP_BG(i) \ |
530 IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i)) | 583 IMAGE_INSTANCE_PIXMAP_BG (XIMAGE_INSTANCE (i)) |
584 #define XIMAGE_INSTANCE_PIXMAP_MASK(i) \ | |
585 IMAGE_INSTANCE_PIXMAP_MASK (XIMAGE_INSTANCE (i)) | |
586 #define XIMAGE_INSTANCE_PIXMAP_SLICE(i) \ | |
587 IMAGE_INSTANCE_PIXMAP_SLICE (XIMAGE_INSTANCE (i)) | |
588 #define XIMAGE_INSTANCE_PIXMAP_MAXSLICE(i) \ | |
589 IMAGE_INSTANCE_PIXMAP_MAXSLICE (XIMAGE_INSTANCE (i)) | |
590 #define XIMAGE_INSTANCE_PIXMAP_TIMEOUT(i) \ | |
591 IMAGE_INSTANCE_PIXMAP_TIMEOUT (XIMAGE_INSTANCE (i)) | |
531 | 592 |
532 #define XIMAGE_INSTANCE_WIDGET_WIDTH(i) \ | 593 #define XIMAGE_INSTANCE_WIDGET_WIDTH(i) \ |
533 IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i)) | 594 IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i)) |
534 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \ | 595 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \ |
535 IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i)) | 596 IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i)) |
539 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i)) | 600 IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i)) |
540 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \ | 601 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \ |
541 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) | 602 IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i)) |
542 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \ | 603 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \ |
543 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) | 604 IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) |
544 #define XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \ | 605 #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \ |
545 IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (XIMAGE_INSTANCE (i)) | 606 IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i)) |
546 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ | 607 #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ |
547 IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i)) | 608 IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i)) |
609 | |
610 #define XIMAGE_INSTANCE_LAYOUT_CHILDREN(i) \ | |
611 IMAGE_INSTANCE_LAYOUT_CHILDREN (XIMAGE_INSTANCE (i)) | |
612 #define XIMAGE_INSTANCE_LAYOUT_BORDER(i) \ | |
613 IMAGE_INSTANCE_LAYOUT_BORDER (XIMAGE_INSTANCE (i)) | |
548 | 614 |
549 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ | 615 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ |
550 IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i)) | 616 IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i)) |
551 #define XIMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \ | 617 #define XIMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \ |
552 IMAGE_INSTANCE_SUBWINDOW_HEIGHT (XIMAGE_INSTANCE (i)) | 618 IMAGE_INSTANCE_SUBWINDOW_HEIGHT (XIMAGE_INSTANCE (i)) |
554 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i)) | 620 IMAGE_INSTANCE_SUBWINDOW_ID (XIMAGE_INSTANCE (i)) |
555 #define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \ | 621 #define XIMAGE_INSTANCE_SUBWINDOW_FRAME(i) \ |
556 IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i)) | 622 IMAGE_INSTANCE_SUBWINDOW_FRAME (XIMAGE_INSTANCE (i)) |
557 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ | 623 #define XIMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ |
558 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i)) | 624 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (XIMAGE_INSTANCE (i)) |
625 | |
626 #define MARK_IMAGE_INSTANCE_CHANGED(i) \ | |
627 (IMAGE_INSTANCE_DIRTYP (i) = 1); | |
559 | 628 |
560 #ifdef HAVE_XPM | 629 #ifdef HAVE_XPM |
561 Lisp_Object evaluate_xpm_color_symbols (void); | 630 Lisp_Object evaluate_xpm_color_symbols (void); |
562 Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid); | 631 Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid); |
563 #endif /* HAVE_XPM */ | 632 #endif /* HAVE_XPM */ |
594 Lisp_Object image; /* the actual image */ | 663 Lisp_Object image; /* the actual image */ |
595 Lisp_Object contrib_p; /* whether to figure into line height */ | 664 Lisp_Object contrib_p; /* whether to figure into line height */ |
596 Lisp_Object baseline; /* percent above baseline */ | 665 Lisp_Object baseline; /* percent above baseline */ |
597 | 666 |
598 Lisp_Object face; /* if non-nil, face to use when displaying */ | 667 Lisp_Object face; /* if non-nil, face to use when displaying */ |
599 | 668 |
600 Lisp_Object plist; | 669 Lisp_Object plist; |
601 void (*after_change) (Lisp_Object glyph, Lisp_Object property, | 670 void (*after_change) (Lisp_Object glyph, Lisp_Object property, |
602 Lisp_Object locale); | 671 Lisp_Object locale); |
672 | |
673 unsigned int dirty : 1; /* So that we can selectively | |
674 redisplay changed glyphs. */ | |
603 }; | 675 }; |
604 | 676 |
605 DECLARE_LRECORD (glyph, struct Lisp_Glyph); | 677 DECLARE_LRECORD (glyph, struct Lisp_Glyph); |
606 #define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph) | 678 #define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph) |
607 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph) | 679 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph) |
608 #define GLYPHP(x) RECORDP (x, glyph) | 680 #define GLYPHP(x) RECORDP (x, glyph) |
609 #define GC_GLYPHP(x) GC_RECORDP (x, glyph) | |
610 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) | 681 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) |
611 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) | 682 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) |
612 | 683 |
613 #define CHECK_BUFFER_GLYPH(x) do { \ | 684 #define CHECK_BUFFER_GLYPH(x) do { \ |
614 CHECK_GLYPH (x); \ | 685 CHECK_GLYPH (x); \ |
631 #define GLYPH_TYPE(g) ((g)->type) | 702 #define GLYPH_TYPE(g) ((g)->type) |
632 #define GLYPH_IMAGE(g) ((g)->image) | 703 #define GLYPH_IMAGE(g) ((g)->image) |
633 #define GLYPH_CONTRIB_P(g) ((g)->contrib_p) | 704 #define GLYPH_CONTRIB_P(g) ((g)->contrib_p) |
634 #define GLYPH_BASELINE(g) ((g)->baseline) | 705 #define GLYPH_BASELINE(g) ((g)->baseline) |
635 #define GLYPH_FACE(g) ((g)->face) | 706 #define GLYPH_FACE(g) ((g)->face) |
707 #define GLYPH_DIRTYP(g) ((g)->dirty) | |
636 | 708 |
637 #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g)) | 709 #define XGLYPH_TYPE(g) GLYPH_TYPE (XGLYPH (g)) |
638 #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g)) | 710 #define XGLYPH_IMAGE(g) GLYPH_IMAGE (XGLYPH (g)) |
639 #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g)) | 711 #define XGLYPH_CONTRIB_P(g) GLYPH_CONTRIB_P (XGLYPH (g)) |
640 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g)) | 712 #define XGLYPH_BASELINE(g) GLYPH_BASELINE (XGLYPH (g)) |
641 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g)) | 713 #define XGLYPH_FACE(g) GLYPH_FACE (XGLYPH (g)) |
642 | 714 #define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g)) |
643 extern Lisp_Object Qxpm, Qxface; | 715 |
716 #define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1); | |
717 | |
718 extern Lisp_Object Qxpm, Qxface, Qetched_in, Qetched_out, Qbevel_in, Qbevel_out; | |
644 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable; | 719 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable; |
645 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar; | 720 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar; |
646 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge; | 721 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge, Q_border; |
647 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; | 722 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; |
648 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; | 723 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; |
649 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; | 724 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; |
650 extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error; | 725 extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error; |
726 extern Lisp_Object Q_orientation; | |
651 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; | 727 extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; |
652 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; | 728 extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; |
653 extern Lisp_Object Vxemacs_logo; | 729 extern Lisp_Object Vxemacs_logo; |
654 | 730 |
655 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object frame_face, | 731 unsigned short glyph_width (Lisp_Object glyph, Lisp_Object frame_face, |
686 Lisp_Object widget_face_font_info (Lisp_Object domain, Lisp_Object face, | 762 Lisp_Object widget_face_font_info (Lisp_Object domain, Lisp_Object face, |
687 int *height, int *width); | 763 int *height, int *width); |
688 void widget_text_to_pixel_conversion (Lisp_Object domain, Lisp_Object face, | 764 void widget_text_to_pixel_conversion (Lisp_Object domain, Lisp_Object face, |
689 int th, int tw, | 765 int th, int tw, |
690 int* height, int* width); | 766 int* height, int* width); |
767 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); | |
768 void disable_glyph_animated_timeout (int i); | |
691 | 769 |
692 /************************************************************************/ | 770 /************************************************************************/ |
693 /* Glyph Cachels */ | 771 /* Glyph Cachels */ |
694 /************************************************************************/ | 772 /************************************************************************/ |
695 | 773 |
696 typedef struct glyph_cachel glyph_cachel; | 774 typedef struct glyph_cachel glyph_cachel; |
697 struct glyph_cachel | 775 struct glyph_cachel |
698 { | 776 { |
699 Lisp_Object glyph; | 777 Lisp_Object glyph; |
700 | 778 |
779 unsigned int dirty :1; /* I'm copying faces here. I'm not | |
780 sure why we need two dirty | |
781 flags. Maybe because an image | |
782 instance can be dirty and so we | |
783 need to frob this in the same way | |
784 as other image instance properties. */ | |
701 unsigned int updated :1; | 785 unsigned int updated :1; |
786 | |
702 unsigned short width; | 787 unsigned short width; |
703 unsigned short ascent; | 788 unsigned short ascent; |
704 unsigned short descent; | 789 unsigned short descent; |
705 }; | 790 }; |
706 | 791 |
719 Dynarr_atp (window->glyph_cachels, index)->width | 804 Dynarr_atp (window->glyph_cachels, index)->width |
720 #define GLYPH_CACHEL_ASCENT(window, index) \ | 805 #define GLYPH_CACHEL_ASCENT(window, index) \ |
721 Dynarr_atp (window->glyph_cachels, index)->ascent | 806 Dynarr_atp (window->glyph_cachels, index)->ascent |
722 #define GLYPH_CACHEL_DESCENT(window, index) \ | 807 #define GLYPH_CACHEL_DESCENT(window, index) \ |
723 Dynarr_atp (window->glyph_cachels, index)->descent | 808 Dynarr_atp (window->glyph_cachels, index)->descent |
724 | 809 #define GLYPH_CACHEL_DIRTYP(window, index) \ |
725 void mark_glyph_cachels (glyph_cachel_dynarr *elements, | 810 Dynarr_atp (window->glyph_cachels, index)->dirty |
726 void (*markobj) (Lisp_Object)); | 811 |
812 void mark_glyph_cachels (glyph_cachel_dynarr *elements); | |
727 void mark_glyph_cachels_as_not_updated (struct window *w); | 813 void mark_glyph_cachels_as_not_updated (struct window *w); |
814 void mark_glyph_cachels_as_clean (struct window *w); | |
728 void reset_glyph_cachels (struct window *w); | 815 void reset_glyph_cachels (struct window *w); |
816 glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph); | |
729 | 817 |
730 #ifdef MEMORY_USAGE_STATS | 818 #ifdef MEMORY_USAGE_STATS |
731 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, | 819 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, |
732 struct overhead_stats *ovstats); | 820 struct overhead_stats *ovstats); |
733 #endif /* MEMORY_USAGE_STATS */ | 821 #endif /* MEMORY_USAGE_STATS */ |
750 struct subwindow_cachel | 838 struct subwindow_cachel |
751 { | 839 { |
752 Lisp_Object subwindow; | 840 Lisp_Object subwindow; |
753 int x, y; | 841 int x, y; |
754 int width, height; | 842 int width, height; |
755 int being_displayed; | 843 unsigned int being_displayed : 1; |
756 int updated; | 844 unsigned int updated : 1; |
757 }; | 845 }; |
758 | 846 |
759 typedef struct | 847 typedef struct |
760 { | 848 { |
761 Dynarr_declare (subwindow_cachel); | 849 Dynarr_declare (subwindow_cachel); |
762 } subwindow_cachel_dynarr; | 850 } subwindow_cachel_dynarr; |
763 | 851 |
764 void mark_subwindow_cachels (subwindow_cachel_dynarr *elements, | 852 void mark_subwindow_cachels (subwindow_cachel_dynarr *elements); |
765 void (*markobj) (Lisp_Object)); | |
766 void mark_subwindow_cachels_as_not_updated (struct frame *f); | 853 void mark_subwindow_cachels_as_not_updated (struct frame *f); |
767 void reset_subwindow_cachels (struct frame *f); | 854 void reset_subwindow_cachels (struct frame *f); |
768 void unmap_subwindow (Lisp_Object subwindow); | 855 void unmap_subwindow (Lisp_Object subwindow); |
769 void map_subwindow (Lisp_Object subwindow, int x, int y); | 856 void map_subwindow (Lisp_Object subwindow, int x, int y, |
857 struct display_glyph_area *dga); | |
770 void update_frame_subwindows (struct frame *f); | 858 void update_frame_subwindows (struct frame *f); |
859 int find_matching_subwindow (struct frame* f, int x, int y, int width, int height); | |
860 | |
861 struct expose_ignore | |
862 { | |
863 int x; | |
864 int y; | |
865 int width; | |
866 int height; | |
867 struct expose_ignore *next; | |
868 }; | |
869 | |
870 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height); | |
871 extern int hold_ignored_expose_registration; | |
771 | 872 |
772 #endif /* _XEMACS_GLYPHS_H_ */ | 873 #endif /* _XEMACS_GLYPHS_H_ */ |