diff options
| author | Karl Heuer | 1994-09-20 05:20:16 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-20 05:20:16 +0000 |
| commit | 4361366b72ab9c5b9a9591b22a299eab9b67f62e (patch) | |
| tree | b9d078cc697eb6d769ab7b5063cee45fb502d45a /src | |
| parent | 6d80dce9f9392c315f7819fe39fef63a7637e0d0 (diff) | |
| download | emacs-4361366b72ab9c5b9a9591b22a299eab9b67f62e.tar.gz emacs-4361366b72ab9c5b9a9591b22a299eab9b67f62e.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.h | 14 |
1 files 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 | |||
| 240 | Lisp_Object menu_bar_vector; | 240 | Lisp_Object menu_bar_vector; |
| 241 | /* Number of elements in the vector that have meaningful data. */ | 241 | /* Number of elements in the vector that have meaningful data. */ |
| 242 | int menu_bar_items_used; | 242 | int menu_bar_items_used; |
| 243 | |||
| 244 | /* Width of the scroll bar, in pixels and in characters. */ | ||
| 245 | int scroll_bar_pixel_width; | ||
| 246 | int scroll_bar_cols; | ||
| 243 | }; | 247 | }; |
| 244 | 248 | ||
| 245 | #ifdef MULTI_FRAME | 249 | #ifdef MULTI_FRAME |
| @@ -293,6 +297,8 @@ typedef struct frame *FRAME_PTR; | |||
| 293 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame | 297 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame |
| 294 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) | 298 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) |
| 295 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((f)->has_vertical_scroll_bars) | 299 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((f)->has_vertical_scroll_bars) |
| 300 | #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) ((f)->scroll_bar_pixel_width) | ||
| 301 | #define FRAME_SCROLL_BAR_COLS(f) ((f)->scroll_bar_cols) | ||
| 296 | #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) | 302 | #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) |
| 297 | #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) | 303 | #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) |
| 298 | #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) | 304 | #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) |
| @@ -423,6 +429,8 @@ extern EMACS_INT last_nonminibuf_frame; | |||
| 423 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) | 429 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) |
| 424 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ | 430 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ |
| 425 | (the_only_frame.has_vertical_scroll_bars) | 431 | (the_only_frame.has_vertical_scroll_bars) |
| 432 | #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) (the_only_frame.scroll_bar_pixel_width) | ||
| 433 | #define FRAME_SCROLL_BAR_COLS(f) (the_only_frame.scroll_bar_cols) | ||
| 426 | #define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) | 434 | #define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) |
| 427 | #define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) | 435 | #define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) |
| 428 | #define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) | 436 | #define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) |
| @@ -451,9 +459,6 @@ extern EMACS_INT last_nonminibuf_frame; | |||
| 451 | 459 | ||
| 452 | /* Device- and MULTI_FRAME-independent scroll bar stuff. */ | 460 | /* Device- and MULTI_FRAME-independent scroll bar stuff. */ |
| 453 | 461 | ||
| 454 | /* The number of columns a vertical scroll bar occupies. */ | ||
| 455 | #define VERTICAL_SCROLL_BAR_WIDTH (2) | ||
| 456 | |||
| 457 | /* Return the starting column (zero-based) of the vertical scroll bar | 462 | /* Return the starting column (zero-based) of the vertical scroll bar |
| 458 | for window W. The column before this one is the last column we can | 463 | for window W. The column before this one is the last column we can |
| 459 | use for text. If the window touches the right edge of the frame, | 464 | use for text. If the window touches the right edge of the frame, |
| @@ -462,7 +467,8 @@ extern EMACS_INT last_nonminibuf_frame; | |||
| 462 | #define WINDOW_VERTICAL_SCROLL_BAR_COLUMN(w) \ | 467 | #define WINDOW_VERTICAL_SCROLL_BAR_COLUMN(w) \ |
| 463 | (((XINT ((w)->left) + XINT ((w)->width)) \ | 468 | (((XINT ((w)->left) + XINT ((w)->width)) \ |
| 464 | < FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) \ | 469 | < FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) \ |
| 465 | ? XINT ((w)->left) + XINT ((w)->width) - VERTICAL_SCROLL_BAR_WIDTH \ | 470 | ? (XINT ((w)->left) + XINT ((w)->width) \ |
| 471 | - FRAME_SCROLL_BAR_COLS (XFRAME (WINDOW_FRAME (w)))) \ | ||
| 466 | : FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) | 472 | : FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) |
| 467 | 473 | ||
| 468 | /* Return the height in lines of the vertical scroll bar in w. If the | 474 | /* Return the height in lines of the vertical scroll bar in w. If the |