comparison src/specifier.h @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents 2f8bb876ab1d
children 697ef44129c6
comparison
equal deleted inserted replaced
407:ed6218a7d4d3 408:501cfd01ee6d
411 int offset_into_struct_frame; 411 int offset_into_struct_frame;
412 void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f, 412 void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f,
413 Lisp_Object oldval); 413 Lisp_Object oldval);
414 }; 414 };
415 415
416 /* #### get image instances out of domains! */
417
418 /* #### I think the following should abort() rather than return nil
419 when an invalid domain is given; much more likely we'll catch design
420 errors early. --ben */
421
422 /* This turns out to be used heavily so we make it a macro to make it
423 inline. Also, the majority of the time the object will turn out to
424 be a window so we move it from being checked last to being checked
425 first. */
426 #define DOMAIN_DEVICE(obj) \
427 (WINDOWP (obj) ? WINDOW_DEVICE (XWINDOW (obj)) \
428 : (FRAMEP (obj) ? FRAME_DEVICE (XFRAME (obj)) \
429 : (DEVICEP (obj) ? obj \
430 : (IMAGE_INSTANCEP (obj) ? image_instance_device (obj) \
431 : Qnil))))
432
433 #define DOMAIN_FRAME(obj) \
434 (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \
435 : (FRAMEP (obj) ? obj \
436 : (IMAGE_INSTANCEP (obj) ? image_instance_frame (obj) \
437 : Qnil)))
438
439 #define DOMAIN_WINDOW(obj) \
440 (WINDOWP (obj) ? obj \
441 : (IMAGE_INSTANCEP (obj) ? image_instance_window (obj) \
442 : Qnil))
443
444 #define DOMAIN_LIVE_P(obj) \
445 (WINDOWP (obj) ? WINDOW_LIVE_P (XWINDOW (obj)) \
446 : (FRAMEP (obj) ? FRAME_LIVE_P (XFRAME (obj)) \
447 : (DEVICEP (obj) ? DEVICE_LIVE_P (XDEVICE (obj)) \
448 : (IMAGE_INSTANCEP (obj) ? image_instance_live_p (obj) \
449 : 0))))
450
451 #define DOMAIN_XDEVICE(obj) \
452 (XDEVICE (DOMAIN_DEVICE (obj)))
453 #define DOMAIN_XFRAME(obj) \
454 (XFRAME (DOMAIN_FRAME (obj)))
455 #define DOMAIN_XWINDOW(obj) \
456 (XWINDOW (DOMAIN_WINDOW (obj)))
457
416 EXFUN (Fcopy_specifier, 6); 458 EXFUN (Fcopy_specifier, 6);
417 EXFUN (Fmake_specifier, 1); 459 EXFUN (Fmake_specifier, 1);
418 EXFUN (Fset_specifier_dirty_flag, 1); 460 EXFUN (Fset_specifier_dirty_flag, 1);
419 EXFUN (Fspecifier_instance, 4); 461 EXFUN (Fspecifier_instance, 4);
420 EXFUN (Fvalid_specifier_locale_p, 1); 462 EXFUN (Fvalid_specifier_locale_p, 1);
424 Lisp_Object make_magic_specifier (Lisp_Object type); 466 Lisp_Object make_magic_specifier (Lisp_Object type);
425 Lisp_Object decode_locale_list (Lisp_Object locale); 467 Lisp_Object decode_locale_list (Lisp_Object locale);
426 extern enum spec_add_meth 468 extern enum spec_add_meth
427 decode_how_to_add_specification (Lisp_Object how_to_add); 469 decode_how_to_add_specification (Lisp_Object how_to_add);
428 Lisp_Object decode_specifier_tag_set (Lisp_Object tag_set); 470 Lisp_Object decode_specifier_tag_set (Lisp_Object tag_set);
471 Lisp_Object decode_domain (Lisp_Object domain);
429 472
430 void add_entry_to_specifier_type_list (Lisp_Object symbol, 473 void add_entry_to_specifier_type_list (Lisp_Object symbol,
431 struct specifier_methods *meths); 474 struct specifier_methods *meths);
432 void set_specifier_caching (Lisp_Object specifier, 475 void set_specifier_caching (Lisp_Object specifier,
433 int struct_window_offset, 476 int struct_window_offset,