XEmacs 21.2.7
[chise/xemacs-chise.git.1] / src / frame.h
index 3af2ae4..ff5b332 100644 (file)
@@ -23,9 +23,16 @@ Boston, MA 02111-1307, USA.  */
 #ifndef _XEMACS_FRAME_H_
 #define _XEMACS_FRAME_H_
 
+#ifdef HAVE_SCROLLBARS
 #include "scrollbar.h"
+#endif
+
+#ifdef HAVE_TOOLBARS
 #include "toolbar.h"
+#endif
+
 #include "device.h"
+#include "glyphs.h"
 
 #define FRAME_TYPE_NAME(f) ((f)->framemeths->name)
 #define FRAME_TYPE(f) ((f)->framemeths->symbol)
@@ -48,7 +55,7 @@ struct frame
   struct console_methods *framemeths;
 
   /* Size of text only area of this frame, excluding scrollbars,
-     toolbars and end of line glyphs. The size can be in charactes
+     toolbars and end of line glyphs. The size can be in characters
      or pixels, depending on units in which window system resizes
      its windows */
   int height, width;
@@ -60,7 +67,7 @@ struct frame
   /* Size of text-only are of the frame, in default font characters.
      This may be inaccurate due to rounding error */
   int char_height, char_width;
-  
+
   /* Size of the whole frame, including scrollbars, toolbars and end
      of line glyphs, in pixels */
   int pixheight, pixwidth;
@@ -83,6 +90,9 @@ struct frame
 
   int modiff;
 
+  /* subwindow cache elements for this frame */
+  subwindow_cachel_dynarr *subwindow_cachels;
+
 #ifdef HAVE_SCROLLBARS
   /* frame-local scrollbar information.  See scrollbar.c. */
   int scrollbar_y_offset;
@@ -108,7 +118,7 @@ struct frame
 #include "frameslots.h"
 
     /* Nonzero if frame is currently displayed.
-       Mutally exclusive with iconfied
+       Mutually exclusive with iconified
        JV: This now a tristate flag:
 Value : Emacs meaning                           :f-v-p : X meaning
 0     : not displayed                           : nil  : unmapped
@@ -157,6 +167,7 @@ Value : Emacs meaning                           :f-v-p : X meaning
   unsigned int extents_changed :1;
   unsigned int faces_changed :1;
   unsigned int frame_changed :1;
+  unsigned int subwindows_changed :1;
   unsigned int glyphs_changed :1;
   unsigned int icon_changed :1;
   unsigned int menubar_changed :1;
@@ -305,6 +316,19 @@ extern int frame_changed;
     glyphs_changed = 1;                                        \
 } while (0)
 
+#define MARK_FRAME_SUBWINDOWS_CHANGED(f) do {          \
+  struct frame *mfgc_f = (f);                          \
+  mfgc_f->subwindows_changed = 1;                              \
+  mfgc_f->modiff++;                                    \
+  if (!NILP (mfgc_f->device))                          \
+    {                                                  \
+      struct device *mfgc_d = XDEVICE (mfgc_f->device);        \
+      MARK_DEVICE_SUBWINDOWS_CHANGED (mfgc_d);         \
+    }                                                  \
+  else                                                 \
+    subwindows_changed = 1;                                    \
+} while (0)
+
 #define MARK_FRAME_TOOLBARS_CHANGED(f) do {            \
   struct frame *mftc_f = (f);                          \
   mftc_f->toolbar_changed = 1;                         \
@@ -416,6 +440,11 @@ extern int frame_changed;
 #define FRAME_SCROLLBAR_HEIGHT(f) 0
 #endif
 
+#define FW_FRAME(obj)                                  \
+   (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj))       \
+ : (FRAMEP  (obj) ? obj                                                \
+ : Qnil))
+
 #define FRAME_NEW_HEIGHT(f) ((f)->new_height)
 #define FRAME_NEW_WIDTH(f) ((f)->new_width)
 #define FRAME_CURSOR_X(f) ((f)->cursor_x)
@@ -433,6 +462,7 @@ extern int frame_changed;
   NON_LVALUE ((f)->last_nonminibuf_window)
 #define FRAME_SB_VCACHE(f) ((f)->sb_vcache)
 #define FRAME_SB_HCACHE(f) ((f)->sb_hcache)
+#define FRAME_SUBWINDOW_CACHE(f) ((f)->subwindow_cachels)
 
 #if 0 /* FSFmacs */