+/* Width of bottom divider of window W. */
+#define WINDOW_BOTTOM_DIVIDER_WIDTH(W) \
+ (((WINDOW_BOTTOMMOST_P (W) \
+ && NILP ((XWINDOW (FRAME_ROOT_WINDOW \
+ (WINDOW_XFRAME (W))))->next)) \
+ || EQ ((W)->prev, FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))) \
+ || (W)->pseudo_window_p) \
+ ? 0 \
+ : FRAME_BOTTOM_DIVIDER_WIDTH (WINDOW_XFRAME (W)))
+
+/* Height that a scroll bar in window W should have, if there is one.
+ Measured in pixels. If scroll bars are turned off, this is still
+ nonzero. */
+#define WINDOW_CONFIG_SCROLL_BAR_HEIGHT(W) \
+ (W->scroll_bar_height >= 0 \
+ ? W->scroll_bar_height \
+ : FRAME_CONFIG_SCROLL_BAR_HEIGHT (WINDOW_XFRAME (W)))
+
+/* Height that a scroll bar in window W should have, if there is one.
+ Measured in lines (characters). If scroll bars are turned off, this
+ is still nonzero. */
+#define WINDOW_CONFIG_SCROLL_BAR_LINES(W) \
+ (W->scroll_bar_height >= 0 \
+ ? ((W->scroll_bar_height \
+ + WINDOW_FRAME_LINE_HEIGHT (W) - 1) \
+ / WINDOW_FRAME_LINE_HEIGHT (W)) \
+ : FRAME_CONFIG_SCROLL_BAR_LINES (WINDOW_XFRAME (W)))
+
+/* Height of a scroll bar in window W, measured in columns. */
+#define WINDOW_SCROLL_BAR_LINES(W) \
+ (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (W) \
+ ? WINDOW_CONFIG_SCROLL_BAR_LINES (W) \
+ : 0)
+
+/* Height of scroll bar area in window W, measured in pixels. */
+#define WINDOW_SCROLL_BAR_AREA_HEIGHT(W) \
+ (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (W) \
+ ? WINDOW_CONFIG_SCROLL_BAR_HEIGHT (W) \
+ : 0)