changeset 16264:012a1d850ee8

(WINDOW_LEFT_MARGIN): New macro. (WINDOW_RIGHT_EDGE, WINDOW_RIGHT_MARGIN): New macros. (WINDOW_FULL_WIDTH_P, WINDOW_RIGHTMOST_P): New macros.
author Richard M. Stallman <rms@gnu.org>
date Sat, 21 Sep 1996 03:31:53 +0000
parents a369af16e836
children 85a90affc238
files src/window.h
diffstat 1 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.h	Sat Sep 21 03:24:01 1996 +0000
+++ b/src/window.h	Sat Sep 21 03:31:53 1996 +0000
@@ -188,6 +188,40 @@
 
 #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