XEmacs 21.2.20 "Yoko".
[chise/xemacs-chise.git.1] / src / window.h
index 41cc210..043a9fc 100644 (file)
@@ -28,7 +28,9 @@ Boston, MA 02111-1307, USA.  */
 #define _XEMACS_WINDOW_H_
 
 #include "redisplay.h"
+#ifdef HAVE_SCROLLBARS
 #include "scrollbar.h"
+#endif
 
 /* All windows in use are arranged into a tree, with pointers up and down.
 
@@ -128,6 +130,14 @@ struct window
   int hscroll;
   /* Idem for the window's modeline */
   int modeline_hscroll;
+  /* Amount to clip off the top line for pixel-based scrolling. Point
+     will remain constant but this will be incremented to
+     incrementally shift lines up. */
+  int top_yoffset;
+  /* Amount to clip off the left of the lines for pixel-based
+     scrolling. Hscroll will remain constant but this will be
+     incremented to incrementally shift lines left.*/
+  int left_xoffset;
   /* Number saying how recently window was selected */
   Lisp_Object use_time;
   /* text.modified of displayed buffer as of last time display completed */
@@ -143,8 +153,14 @@ struct window
   face_cachel_dynarr *face_cachels;
   /* glyph cache elements correct for this window and its current buffer */
   glyph_cachel_dynarr *glyph_cachels;
-
-
+  /* we cannot have a per-device cache of widgets / subwindows because
+     each visible instance needs to be a separate instance. The lowest
+     level of granularity we can get easily is the window that the
+     subwindow is in. This will fail if we attach the same subwindow
+     twice to a buffer. However, we are quite unlikely to do this,
+     especially with buttons which will need individual callbacks. The
+     proper solution is probably not worth the effort. */
+  Lisp_Object subwindow_instance_cache;
   /* List of starting positions for display lines.  Only valid if
      buffer has not changed. */
   line_start_cache_dynarr *line_start_cache;
@@ -246,7 +262,6 @@ DECLARE_LRECORD (window, struct window);
 #define XWINDOW(x) XRECORD (x, window, struct window)
 #define XSETWINDOW(x, p) XSETRECORD (x, p, window)
 #define WINDOWP(x) RECORDP (x, window)
-#define GC_WINDOWP(x) GC_RECORDP (x, window)
 #define CHECK_WINDOW(x) CHECK_RECORD (x, window)
 #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window)
 
@@ -321,6 +336,8 @@ int window_char_height (struct window *, int include_gutters_p);
 int window_displayed_height (struct window *);
 int window_is_leftmost (struct window *w);
 int window_is_rightmost (struct window *w);
+int window_is_lowest (struct window *w);
+int window_is_highest (struct window *w);
 int window_truncation_on (struct window *w);
 int window_needs_vertical_divider (struct window *);
 int window_scrollbar_width (struct window *w);
@@ -332,7 +349,6 @@ int window_top_gutter_height (struct window *w);
 int window_bottom_gutter_height (struct window *w);
 int window_left_gutter_width (struct window *w, int modeline);
 int window_right_gutter_width (struct window *w, int modeline);
-int window_bottom_toolbar_height (struct window *w);
 
 void delete_all_subwindows (struct window *w);
 void set_window_pixheight (Lisp_Object window, int pixheight,
@@ -373,6 +389,7 @@ int window_divider_width (struct window *w);
 /* XEmacs window size and positioning macros. */
 #define WINDOW_TOP(w) ((w)->pixel_top)
 #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w))
+#define WINDOW_TEXT_TOP_CLIP(w) ((w)->top_yoffset)
 #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height)
 #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w))
 #define WINDOW_LEFT(w) ((w)->pixel_left)