From 4361366b72ab9c5b9a9591b22a299eab9b67f62e Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 20 Sep 1994 05:20:16 +0000 Subject: [PATCH] (FRAME_SCROLL_BAR_PIXEL_WIDTH): New macro, supersedes VERTICAL_SCROLL_BAR_PIXEL_WIDTH; no longer device-dependent. All callers changed. (FRAME_SCROLL_BAR_COLS): New macro, supersedes VERTICAL_SCROLL_BAR_WIDTH; no longer constant. All callers changed. (scroll_bar_pixel_width, scroll_bar_cols): New members of struct frame. --- src/frame.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/frame.h b/src/frame.h index a2d2e0e8069..53c0401d43b 100644 --- a/src/frame.h +++ b/src/frame.h @@ -240,6 +240,10 @@ struct frame Lisp_Object menu_bar_vector; /* Number of elements in the vector that have meaningful data. */ int menu_bar_items_used; + + /* Width of the scroll bar, in pixels and in characters. */ + int scroll_bar_pixel_width; + int scroll_bar_cols; }; #ifdef MULTI_FRAME @@ -293,6 +297,8 @@ typedef struct frame *FRAME_PTR; #define FRAME_FOCUS_FRAME(f) (f)->focus_frame #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((f)->has_vertical_scroll_bars) +#define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) ((f)->scroll_bar_pixel_width) +#define FRAME_SCROLL_BAR_COLS(f) ((f)->scroll_bar_cols) #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) @@ -423,6 +429,8 @@ extern EMACS_INT last_nonminibuf_frame; #define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ (the_only_frame.has_vertical_scroll_bars) +#define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) (the_only_frame.scroll_bar_pixel_width) +#define FRAME_SCROLL_BAR_COLS(f) (the_only_frame.scroll_bar_cols) #define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) #define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) #define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) @@ -451,9 +459,6 @@ extern EMACS_INT last_nonminibuf_frame; /* Device- and MULTI_FRAME-independent scroll bar stuff. */ -/* The number of columns a vertical scroll bar occupies. */ -#define VERTICAL_SCROLL_BAR_WIDTH (2) - /* Return the starting column (zero-based) of the vertical scroll bar for window W. The column before this one is the last column we can use for text. If the window touches the right edge of the frame, @@ -462,7 +467,8 @@ extern EMACS_INT last_nonminibuf_frame; #define WINDOW_VERTICAL_SCROLL_BAR_COLUMN(w) \ (((XINT ((w)->left) + XINT ((w)->width)) \ < FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) \ - ? XINT ((w)->left) + XINT ((w)->width) - VERTICAL_SCROLL_BAR_WIDTH \ + ? (XINT ((w)->left) + XINT ((w)->width) \ + - FRAME_SCROLL_BAR_COLS (XFRAME (WINDOW_FRAME (w)))) \ : FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) /* Return the height in lines of the vertical scroll bar in w. If the -- 2.39.5