]> code.delx.au - gnu-emacs/blobdiff - src/window.h
(Ffile_attributes): Use cast to avoid warnings.
[gnu-emacs] / src / window.h
index 0b0e0aa256da3db0daa46e4dcf7f754777ff082c..0e35ad0d8a732c80d1d3e7741fb0c10ba8f68ab5 100644 (file)
@@ -112,6 +112,9 @@ struct window
     /* Non-nil means next redisplay must use the value of start
        set up for it in advance.  Set by scrolling commands.  */
     Lisp_Object force_start;
+    /* Non-nil means we have explicitly changed the value of start,
+       but that the next redisplay is not obliged to use the new value.  */
+    Lisp_Object optional_new_start;
     /* Number of columns display within the window is scrolled to the left.  */
     Lisp_Object hscroll;
     /* Number saying how recently window was selected */
@@ -188,6 +191,40 @@ struct window
 
 #define MINI_WINDOW_P(W)  (!EQ ((W)->mini_p, Qnil))
 
+/* Return the frame column at which the text in window W starts.
+   This is different from the `left' field because it does not include
+   a left-hand scroll bar if any.  */
+   
+#define WINDOW_LEFT_MARGIN(W) \
+     (XFASTINT ((W)->left) \
+      + FRAME_LEFT_SCROLL_BAR_WIDTH (XFRAME (WINDOW_FRAME (W))))
+
+/* Return the frame column before window W ends.
+   This includes a right-hand scroll bar, if any.  */
+
+#define WINDOW_RIGHT_EDGE(W) \
+     (XFASTINT ((W)->left) + XFASTINT ((W)->width))
+
+/* Return the frame column before which the text in window W ends.
+   This is different from WINDOW_RIGHT_EDGE because it does not include
+   a right-hand scroll bar if any.  */
+
+#define WINDOW_RIGHT_MARGIN(W) \
+     (WINDOW_RIGHT_EDGE (W) \
+      - (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (XFRAME (WINDOW_FRAME (W))) \
+        ? FRAME_SCROLL_BAR_COLS (XFRAME (WINDOW_FRAME (W))) \
+        : 0))
+
+/* 1 if window W takes up the full width of its frame.  */ 
+
+#define WINDOW_FULL_WIDTH_P(W) \
+     (XFASTINT ((W)->width) == FRAME_WINDOW_WIDTH (XFRAME (WINDOW_FRAME (W))))
+
+/* 1 if window W's has no other windows to its right in its frame.  */ 
+
+#define WINDOW_RIGHTMOST_P(W) \
+     (WINDOW_RIGHT_EDGE (W) == FRAME_WINDOW_WIDTH (XFRAME (WINDOW_FRAME (W))))
+     
 /* This is the window in which the terminal's cursor should
    be left when nothing is being done with it.  This must
    always be a leaf window, and its buffer is selected by