X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fspecifier.h;h=8c82331197cecae0512ae18fff1e60d4a276ac37;hb=55c3b0bb9939f54ef1e74cdb6a6ae41d2e63dabd;hp=17461cbfedf8d394952deb123445f00824c5c589;hpb=f52a96980ed9280f8f906a20d4b899dc0b027644;p=chise%2Fxemacs-chise.git diff --git a/src/specifier.h b/src/specifier.h index 17461cb..8c82331 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -152,7 +152,7 @@ struct specifier_methods name specifier_instance) to avoid creating "external" specification loops. - This method must presume that both INSTANTIATOR and MATCSPEC are + This method must presume that both INSTANTIATOR and MATCHSPEC are already validated by the corresponding validate_* methods, and may abort if they are invalid. @@ -411,8 +411,51 @@ struct specifier_caching int offset_into_struct_frame; void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f, Lisp_Object oldval); + int always_recompute; }; +/* #### get image instances out of domains! */ + +/* #### I think the following should abort() rather than return nil + when an invalid domain is given; much more likely we'll catch design + errors early. --ben */ + +/* This turns out to be used heavily so we make it a macro to make it + inline. Also, the majority of the time the object will turn out to + be a window so we move it from being checked last to being checked + first. */ +#define DOMAIN_DEVICE(obj) \ + (WINDOWP (obj) ? WINDOW_DEVICE (XWINDOW (obj)) \ + : (FRAMEP (obj) ? FRAME_DEVICE (XFRAME (obj)) \ + : (DEVICEP (obj) ? obj \ + : (IMAGE_INSTANCEP (obj) ? image_instance_device (obj) \ + : Qnil)))) + +#define DOMAIN_FRAME(obj) \ + (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \ + : (FRAMEP (obj) ? obj \ + : (IMAGE_INSTANCEP (obj) ? image_instance_frame (obj) \ + : Qnil))) + +#define DOMAIN_WINDOW(obj) \ + (WINDOWP (obj) ? obj \ + : (IMAGE_INSTANCEP (obj) ? image_instance_window (obj) \ + : Qnil)) + +#define DOMAIN_LIVE_P(obj) \ + (WINDOWP (obj) ? WINDOW_LIVE_P (XWINDOW (obj)) \ + : (FRAMEP (obj) ? FRAME_LIVE_P (XFRAME (obj)) \ + : (DEVICEP (obj) ? DEVICE_LIVE_P (XDEVICE (obj)) \ + : (IMAGE_INSTANCEP (obj) ? image_instance_live_p (obj) \ + : 0)))) + +#define DOMAIN_XDEVICE(obj) \ + (XDEVICE (DOMAIN_DEVICE (obj))) +#define DOMAIN_XFRAME(obj) \ + (XFRAME (DOMAIN_FRAME (obj))) +#define DOMAIN_XWINDOW(obj) \ + (XWINDOW (DOMAIN_WINDOW (obj))) + EXFUN (Fcopy_specifier, 6); EXFUN (Fmake_specifier, 1); EXFUN (Fset_specifier_dirty_flag, 1); @@ -426,6 +469,7 @@ Lisp_Object decode_locale_list (Lisp_Object locale); extern enum spec_add_meth decode_how_to_add_specification (Lisp_Object how_to_add); Lisp_Object decode_specifier_tag_set (Lisp_Object tag_set); +Lisp_Object decode_domain (Lisp_Object domain); void add_entry_to_specifier_type_list (Lisp_Object symbol, struct specifier_methods *meths); @@ -437,7 +481,8 @@ void set_specifier_caching (Lisp_Object specifier, int struct_frame_offset, void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f, - Lisp_Object oldval)); + Lisp_Object oldval), + int always_recompute); void set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback); void recompute_all_cached_specifiers_in_window (struct window *w);