summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-08-13 19:29:25 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-08-13 19:29:25 +0400
commitc8ae93b0890e61c5fbc151216d9169968e532f30 (patch)
tree537c00d521356f4b18ef6a9f5d10d222c966fcdd /src/window.h
parent53b64418c20b6288e0e3a589b61db47861a575b6 (diff)
downloademacs-c8ae93b0890e61c5fbc151216d9169968e532f30.tar.gz
* window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
* nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient bool instead of BOOL. * w32term.h (struct scroll_bar): Convert fringe_extended_p from Lisp_Object to bitfield. Adjust comment. * w32term.c (x_scroll_bar_create): Adjust user. Use WINDOW_FRINGE_EXTENDED_P and bool for boolean. * xterm.c (XTset_vertical_scroll_bar): Likewise. Use bool for boolean. * xterm.h (struct scroll_bar): Prefer commonly used `unsigned' to `unsigned int' when defining a bitfield.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/window.h b/src/window.h
index a9afbc7f4a3..9d41a14cd23 100644
--- a/src/window.h
+++ b/src/window.h
@@ -828,13 +828,25 @@ wset_next_buffers (struct window *w, Lisp_Object val)
#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \
(window_box_left ((W), TEXT_AREA) + (X))
-/* 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
- the top level editing loop at the end of each command.
-
- This value is always the same as
- FRAME_SELECTED_WINDOW (selected_frame). */
+/* Nonzero if the background of the window W's fringe that is adjacent to
+ a scroll bar is extended to the gap between the fringe and the bar. */
+
+#define WINDOW_FRINGE_EXTENDED_P(w) \
+ (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
+ ? (WINDOW_LEFTMOST_P (w) \
+ && WINDOW_LEFT_FRINGE_WIDTH (w) \
+ && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) \
+ || WINDOW_LEFT_MARGIN_COLS (w) == 0)) \
+ : (WINDOW_RIGHTMOST_P (w) \
+ && WINDOW_RIGHT_FRINGE_WIDTH (w) \
+ && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) \
+ || WINDOW_RIGHT_MARGIN_COLS (w) == 0)))
+
+/* 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 the top level editing loop at the end of each command.
+
+ This value is always the same as FRAME_SELECTED_WINDOW (selected_frame). */
extern Lisp_Object selected_window;