XEmacs 21.2.28 "Hermes".
[chise/xemacs-chise.git.1] / src / device.h
index 139809f..8dd7d29 100644 (file)
@@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Chuck Thompson and Ben Wing. */
 
-#ifndef _XEMACS_DEVICE_H_
-#define _XEMACS_DEVICE_H_
+#ifndef INCLUDED_device_h_
+#define INCLUDED_device_h_
 
 #include "console.h"
 
@@ -100,7 +100,7 @@ struct device
      frames on this device have the window-system focus), but
      selected_frame will never be nil if there are any frames on
      the device. */
-  Lisp_Object _selected_frame;
+  Lisp_Object selected_frame;
   /* Frame that currently contains the window-manager focus, or none.
      Note that we've split frame_with_focus into two variables.
      frame_with_focus_real is the value we use most of the time,
@@ -167,11 +167,14 @@ struct device
   unsigned int faces_changed :1;
   unsigned int frame_changed :1;
   unsigned int glyphs_changed :1;
+  unsigned int subwindows_changed :1;
+  unsigned int subwindows_state_changed :1;
   unsigned int icon_changed :1;
   unsigned int menubar_changed :1;
   unsigned int modeline_changed :1;
   unsigned int point_changed :1;
   unsigned int size_changed :1;
+  unsigned int gutter_changed :1;
   unsigned int toolbar_changed :1;
   unsigned int windows_changed :1;
   unsigned int windows_structure_changed :1;
@@ -218,7 +221,6 @@ DECLARE_LRECORD (device, struct device);
 #define XDEVICE(x) XRECORD (x, device, struct device)
 #define XSETDEVICE(x, p) XSETRECORD (x, p, device)
 #define DEVICEP(x) RECORDP (x, device)
-#define GC_DEVICEP(x) GC_RECORDP (x, device)
 #define CHECK_DEVICE(x) CHECK_RECORD (x, device)
 #define CONCHECK_DEVICE(x) CONCHECK_RECORD (x, device)
 
@@ -245,7 +247,7 @@ error_check_device_type (struct device *d, Lisp_Object sym)
   return d;
 }
 # define DEVICE_TYPE_DATA(d, type)                     \
-  ((struct type##_device *) (error_check_device_type (d, Q##type))->device_data)
+  ((struct type##_device *) error_check_device_type (d, Q##type)->device_data)
 #else
 # define DEVICE_TYPE_DATA(d, type)                     \
   ((struct type##_device *) (d)->device_data)
@@ -308,7 +310,7 @@ int valid_device_class_p (Lisp_Object class);
 #define DEVICE_NAME(d) ((d)->name)
 #define DEVICE_CLASS(d) ((d)->device_class)
 /* Catch people attempting to set this. */
-#define DEVICE_SELECTED_FRAME(d) NON_LVALUE ((d)->_selected_frame)
+#define DEVICE_SELECTED_FRAME(d) NON_LVALUE ((d)->selected_frame)
 #define DEVICE_FRAME_WITH_FOCUS_REAL(d) ((d)->frame_with_focus_real)
 #define DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS(d) ((d)->frame_with_focus_for_hooks)
 #define DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS(d)                       \
@@ -331,11 +333,11 @@ int valid_device_class_p (Lisp_Object class);
 #define INVALIDATE_DEVICE_PIXEL_TO_GLYPH_CACHE(d)                      \
   ((void) ((d)->pixel_to_glyph_cache.valid = 0))
 
-#define INVALIDATE_PIXEL_TO_GLYPH_CACHE do {                           \
-  Lisp_Object _devcons_, _concons_;                                    \
-  DEVICE_LOOP_NO_BREAK (_devcons_, _concons_)                          \
-    INVALIDATE_DEVICE_PIXEL_TO_GLYPH_CACHE (XDEVICE (XCAR (_devcons_)));\
-  } while (0)
+#define INVALIDATE_PIXEL_TO_GLYPH_CACHE do {                                   \
+  Lisp_Object IPTGC_devcons, IPTGC_concons;                                    \
+  DEVICE_LOOP_NO_BREAK (IPTGC_devcons, IPTGC_concons)                          \
+    INVALIDATE_DEVICE_PIXEL_TO_GLYPH_CACHE (XDEVICE (XCAR (IPTGC_devcons)));   \
+} while (0)
 
 #define MARK_DEVICE_FACES_CHANGED(d)                   \
   ((void) (faces_changed = (d)->faces_changed = 1))
@@ -343,9 +345,18 @@ int valid_device_class_p (Lisp_Object class);
 #define MARK_DEVICE_GLYPHS_CHANGED(d)                  \
   ((void) (glyphs_changed = (d)->glyphs_changed = 1))
 
+#define MARK_DEVICE_SUBWINDOWS_CHANGED(d)                      \
+  ((void) (subwindows_changed = (d)->subwindows_changed = 1))
+
+#define MARK_DEVICE_SUBWINDOWS_STATE_CHANGED(d)                \
+  ((void) (subwindows_state_changed = (d)->subwindows_state_changed = 1))
+
 #define MARK_DEVICE_TOOLBARS_CHANGED(d)                        \
   ((void) (toolbar_changed = (d)->toolbar_changed = 1))
 
+#define MARK_DEVICE_GUTTERS_CHANGED(d)         \
+  ((void) (gutter_changed = (d)->gutter_changed = 1))
+
 #define MARK_DEVICE_SIZE_CHANGED(d)                    \
   ((void) (size_changed = (d)->size_changed = 1))
 
@@ -357,6 +368,14 @@ int valid_device_class_p (Lisp_Object class);
   MARK_DEVICE_FACES_CHANGED (mdffc_d);                 \
 } while (0)
 
+#define MARK_DEVICE_FRAMES_GLYPHS_CHANGED(d) do {      \
+  struct device *mdffc_d = (d);                                \
+  Lisp_Object frmcons;                                 \
+  DEVICE_FRAME_LOOP (frmcons, mdffc_d)                 \
+    XFRAME (XCAR (frmcons))->glyphs_changed = 1;               \
+  MARK_DEVICE_GLYPHS_CHANGED (mdffc_d);                \
+} while (0)
+
 #define MARK_DEVICE_FRAME_CHANGED(d)                   \
   ((void) (frame_changed = (d)->frame_changed = 1))
 
@@ -401,4 +420,4 @@ void set_device_selected_frame (struct device *d, Lisp_Object frame);
 Lisp_Object domain_device_type (Lisp_Object domain);
 int window_system_pixelated_geometry (Lisp_Object domain);
 
-#endif /* _XEMACS_DEVICE_H_ */
+#endif /* INCLUDED_device_h_ */