Mercurial > emacs
changeset 1994:73ce9dd21093
Use the term `scroll bar', instead of `scrollbar'.
* alloc.c, frame.c, frame.h, indent.c, keyboard.c, keyboard.h,
lisp.h, term.c, termhooks.h, window.c, window.h, xdisp.c, xfns.c,
xterm.c, xterm.h: Terminology changed.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 02 Mar 1993 08:22:42 +0000 |
parents | 645d96bd3daf |
children | f149ad4ad9d4 |
files | src/alloc.c src/frame.h src/indent.c src/term.c src/termhooks.h src/window.c src/window.h src/xfns.c src/xterm.h |
diffstat | 9 files changed, 208 insertions(+), 208 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alloc.c Tue Mar 02 08:21:49 1993 +0000 +++ b/src/alloc.c Tue Mar 02 08:22:42 1993 +0000 @@ -1534,8 +1534,8 @@ mark_object (&ptr->selected_window); mark_object (&ptr->minibuffer_window); mark_object (&ptr->param_alist); - mark_object (&ptr->scrollbars); - mark_object (&ptr->condemned_scrollbars); + mark_object (&ptr->scroll_bars); + mark_object (&ptr->condemned_scroll_bars); } break; #endif /* not MULTI_FRAME */
--- a/src/frame.h Tue Mar 02 08:21:49 1993 +0000 +++ b/src/frame.h Tue Mar 02 08:22:42 1993 +0000 @@ -122,15 +122,15 @@ or modified with modify-frame-parameters. */ Lisp_Object param_alist; - /* List of scrollbars on this frame. + /* List of scroll bars on this frame. Actually, we don't specify exactly what is stored here at all; the - scrollbar implementation code can use it to store anything it likes. + scroll bar implementation code can use it to store anything it likes. This field is marked by the garbage collector. It is here instead of in the `display' structure so that the garbage collector doesn't need to look inside the window-system-dependent structure. */ - Lisp_Object scrollbars; - Lisp_Object condemned_scrollbars; + Lisp_Object scroll_bars; + Lisp_Object condemned_scroll_bars; /* The output method says how the contents of this frame are displayed. It could be using termcap, or using an X window. */ @@ -189,12 +189,12 @@ char wants_modeline; /* Non-zero if the hardware device this frame is displaying on can - support scrollbars. */ - char can_have_scrollbars; + support scroll bars. */ + char can_have_scroll_bars; - /* If can_have_scrollbars is non-zero, this is non-zero if we should + /* If can_have_scroll_bars is non-zero, this is non-zero if we should actually display them on this frame. */ - char has_vertical_scrollbars; + char has_vertical_scroll_bars; /* Non-0 means raise this frame to the top of the heap when selected. */ char auto_raise; @@ -263,10 +263,10 @@ #define FRAME_MESSAGE_BUF(f) (f)->message_buf #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos #define FRAME_FOCUS_FRAME(f) (f)->focus_frame -#define FRAME_CAN_HAVE_SCROLLBARS(f) ((f)->can_have_scrollbars) -#define FRAME_HAS_VERTICAL_SCROLLBARS(f) ((f)->has_vertical_scrollbars) -#define FRAME_SCROLLBARS(f) ((f)->scrollbars) -#define FRAME_CONDEMNED_SCROLLBARS(f) ((f)->condemned_scrollbars) +#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_BARS(f) ((f)->scroll_bars) +#define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) /* Emacs's redisplay code could become confused if a frame's visibility changes at arbitrary times. For example, if a frame is @@ -391,11 +391,11 @@ #define FRAME_MESSAGE_BUF(f) (the_only_frame.message_buf) #define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) #define FRAME_FOCUS_FRAME(f) (Qnil) -#define FRAME_CAN_HAVE_SCROLLBARS(f) (the_only_frame.can_have_scrollbars) -#define FRAME_HAS_VERTICAL_SCROLLBARS(f) \ - (the_only_frame.has_vertical_scrollbars) -#define FRAME_SCROLLBARS(f) (the_only_frame.scrollbars) -#define FRAME_CONDEMNED_SCROLLBARS(f) (the_only_frame.condemned_scrollbars) +#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_BARS(f) (the_only_frame.scroll_bars) +#define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) /* See comments in definition above. */ #define FRAME_SAMPLE_VISIBILITY(f) (0) @@ -419,22 +419,22 @@ #endif /* not MULTI_FRAME */ -/* Device- and MULTI_FRAME-independent scrollbar stuff. */ +/* Device- and MULTI_FRAME-independent scroll bar stuff. */ -/* The number of columns a vertical scrollbar occupies. */ -#define VERTICAL_SCROLLBAR_WIDTH (2) +/* The number of columns a vertical scroll bar occupies. */ +#define VERTICAL_SCROLL_BAR_WIDTH (2) -/* Return the starting column (zero-based) of the vertical scrollbar +/* 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, - we have extra space allocated for it. Otherwise, the scrollbar + we have extra space allocated for it. Otherwise, the scroll bar takes over the window's rightmost columns. */ -#define WINDOW_VERTICAL_SCROLLBAR_COLUMN(w) \ +#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_SCROLLBAR_WIDTH \ + ? XINT ((w)->left) + XINT ((w)->width) - VERTICAL_SCROLL_BAR_WIDTH \ : FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) -/* Return the height in lines of the vertical scrollbar in w. If the - window has a mode line, don't make the scrollbar extend that far. */ -#define WINDOW_VERTICAL_SCROLLBAR_HEIGHT(w) (window_internal_height (w)) +/* Return the height in lines of the vertical scroll bar in w. If the + window has a mode line, don't make the scroll bar extend that far. */ +#define WINDOW_VERTICAL_SCROLL_BAR_HEIGHT(w) (window_internal_height (w))
--- a/src/indent.c Tue Mar 02 08:21:49 1993 +0000 +++ b/src/indent.c Tue Mar 02 08:22:42 1993 +0000 @@ -396,15 +396,15 @@ When displaying in window w, a typical formula for WIDTH is: window_width - 1 - - (has_vertical_scrollbars - ? VERTICAL_SCROLLBAR_WIDTH + - (has_vertical_scroll_bars + ? VERTICAL_SCROLL_BAR_WIDTH : (window_width + window_left != frame_width)) where window_width is XFASTINT (w->width), window_left is XFASTINT (w->left), - has_vertical_scrollbars is - FRAME_HAS_VERTICAL_SCROLLBARS (XFRAME (WINDOW_FRAME (window))) + has_vertical_scroll_bars is + FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (WINDOW_FRAME (window))) and frame_width = FRAME_WIDTH (XFRAME (window->frame)) Or, @@ -412,7 +412,7 @@ The `-1' accounts for the continuation-line backslashes; the rest accounts for window borders if the window is split vertically, and - the scrollbars if the frame supports them. */ + the scroll bars if the frame supports them. */ struct position * compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, tab_offset)
--- a/src/term.c Tue Mar 02 08:21:49 1993 +0000 +++ b/src/term.c Tue Mar 02 08:22:42 1993 +0000 @@ -99,10 +99,10 @@ Emacs frame. If it is set to zero, all the other arguments are garbage. - If the motion started in a scrollbar, set *bar_window to the - scrollbar's window, *part to the part the mouse is currently over, - *x to the position of the mouse along the scrollbar, and *y to the - overall length of the scrollbar. + If the motion started in a scroll bar, set *bar_window to the + scroll bar's window, *part to the part the mouse is currently over, + *x to the position of the mouse along the scroll bar, and *y to the + overall length of the scroll bar. Otherwise, set *bar_window to Qnil, and *x and *y to the column and row of the character cell the mouse is over. @@ -113,7 +113,7 @@ event arrives. */ void (*mouse_position_hook) ( /* FRAME_PTR *f, Lisp_Object *bar_window, - enum scrollbar_part *part, + enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, unsigned long *time */ ); @@ -137,54 +137,54 @@ windows. */ void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ ); -/* Set the vertical scrollbar for WINDOW to have its upper left corner +/* Set the vertical scroll bar for WINDOW to have its upper left corner at (TOP, LEFT), and be LENGTH rows high. Set its handle to indicate that we are displaying PORTION characters out of a total of WHOLE characters, starting at POSITION. If WINDOW doesn't yet - have a scrollbar, create one for it. */ -void (*set_vertical_scrollbar_hook) + have a scroll bar, create one for it. */ +void (*set_vertical_scroll_bar_hook) ( /* struct window *window, int portion, int whole, int position */ ); /* The following three hooks are used when we're doing a thorough - redisplay of the frame. We don't explicitly know which scrollbars + redisplay of the frame. We don't explicitly know which scroll bars are going to be deleted, because keeping track of when windows go away is a real pain - can you say set-window-configuration? Instead, we just assert at the beginning of redisplay that *all* - scrollbars are to be removed, and then save scrollbars from the + scroll bars are to be removed, and then save scroll bars from the firey pit when we actually redisplay their window. */ -/* Arrange for all scrollbars on FRAME to be removed at the next call - to `*judge_scrollbars_hook'. A scrollbar may be spared if - `*redeem_scrollbar_hook' is applied to its window before the judgement. +/* Arrange for all scroll bars on FRAME to be removed at the next call + to `*judge_scroll_bars_hook'. A scroll bar may be spared if + `*redeem_scroll_bar_hook' is applied to its window before the judgement. This should be applied to each frame each time its window tree is - redisplayed, even if it is not displaying scrollbars at the moment; - if the HAS_SCROLLBARS flag has just been turned off, only calling - this and the judge_scrollbars_hook will get rid of them. + redisplayed, even if it is not displaying scroll bars at the moment; + if the HAS_SCROLL_BARS flag has just been turned off, only calling + this and the judge_scroll_bars_hook will get rid of them. If non-zero, this hook should be safe to apply to any frame, - whether or not it can support scrollbars, and whether or not it is + whether or not it can support scroll bars, and whether or not it is currently displaying them. */ -void (*condemn_scrollbars_hook)( /* FRAME_PTR *frame */ ); +void (*condemn_scroll_bars_hook)( /* FRAME_PTR *frame */ ); -/* Unmark WINDOW's scrollbar for deletion in this judgement cycle. - Note that it's okay to redeem a scrollbar that is not condemned. */ -void (*redeem_scrollbar_hook)( /* struct window *window */ ); +/* Unmark WINDOW's scroll bar for deletion in this judgement cycle. + Note that it's okay to redeem a scroll bar that is not condemned. */ +void (*redeem_scroll_bar_hook)( /* struct window *window */ ); -/* Remove all scrollbars on FRAME that haven't been saved since the - last call to `*condemn_scrollbars_hook'. +/* Remove all scroll bars on FRAME that haven't been saved since the + last call to `*condemn_scroll_bars_hook'. This should be applied to each frame after each time its window - tree is redisplayed, even if it is not displaying scrollbars at the - moment; if the HAS_SCROLLBARS flag has just been turned off, only - calling this and condemn_scrollbars_hook will get rid of them. + tree is redisplayed, even if it is not displaying scroll bars at the + moment; if the HAS_SCROLL_BARS flag has just been turned off, only + calling this and condemn_scroll_bars_hook will get rid of them. If non-zero, this hook should be safe to apply to any frame, - whether or not it can support scrollbars, and whether or not it is + whether or not it can support scroll bars, and whether or not it is currently displaying them. */ -void (*judge_scrollbars_hook)( /* FRAME_PTR *FRAME */ ); +void (*judge_scroll_bars_hook)( /* FRAME_PTR *FRAME */ ); /* Strings, numbers and flags taken from the termcap entry. */ @@ -1495,8 +1495,8 @@ /* meaningless in this case */ baud_rate = 9600; - FRAME_CAN_HAVE_SCROLLBARS (selected_frame) = 0; - FRAME_HAS_VERTICAL_SCROLLBARS (selected_frame) = 0; + FRAME_CAN_HAVE_SCROLL_BARS (selected_frame) = 0; + FRAME_HAS_VERTICAL_SCROLL_BARS (selected_frame) = 0; } /* VARARGS 1 */
--- a/src/termhooks.h Tue Mar 02 08:21:49 1993 +0000 +++ b/src/termhooks.h Tue Mar 02 08:22:42 1993 +0000 @@ -55,10 +55,10 @@ /* Multi-frame and mouse support hooks. */ -enum scrollbar_part { - scrollbar_above_handle, - scrollbar_handle, - scrollbar_below_handle +enum scroll_bar_part { + scroll_bar_above_handle, + scroll_bar_handle, + scroll_bar_below_handle }; /* Return the current position of the mouse. @@ -67,10 +67,10 @@ Emacs frame. If it is set to zero, all the other arguments are garbage. - If the motion started in a scrollbar, set *bar_window to the - scrollbar's window, *part to the part the mouse is currently over, - *x to the position of the mouse along the scrollbar, and *y to the - overall length of the scrollbar. + If the motion started in a scroll bar, set *bar_window to the + scroll bar's window, *part to the part the mouse is currently over, + *x to the position of the mouse along the scroll bar, and *y to the + overall length of the scroll bar. Otherwise, set *bar_window to Qnil, and *x and *y to the column and row of the character cell the mouse is over. @@ -81,7 +81,7 @@ event arrives. */ extern void (*mouse_position_hook) ( /* FRAME_PTR *f, Lisp_Object *bar_window, - enum scrollbar_part *part, + enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, unsigned long *time */ ); @@ -109,76 +109,76 @@ extern void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ ); -/* Scrollbar hooks. */ +/* Scroll bar hooks. */ -/* The representation of scrollbars is determined by the code which +/* The representation of scroll bars is determined by the code which implements them, except for one thing: they must be represented by lisp objects. This allows us to place references to them in Lisp_Windows without worrying about those references becoming - dangling references when the scrollbar is destroyed. + dangling references when the scroll bar is destroyed. The window-system-independent portion of Emacs just refers to - scrollbars via their windows, and never looks inside the scrollbar + scroll bars via their windows, and never looks inside the scroll bar representation; it always uses hook functions to do all the - scrollbar manipulation it needs. + scroll bar manipulation it needs. - The `vertical_scrollbar' field of a Lisp_Window refers to that - window's scrollbar, or is nil if the window doesn't have a - scrollbar. + The `vertical_scroll_bar' field of a Lisp_Window refers to that + window's scroll bar, or is nil if the window doesn't have a + scroll bar. - The `scrollbars' and `condemned_scrollbars' fields of a Lisp_Frame - are free for use by the scrollbar implementation in any way it sees + The `scroll_bars' and `condemned_scroll_bars' fields of a Lisp_Frame + are free for use by the scroll bar implementation in any way it sees fit. They are marked by the garbage collector. */ -/* Set the vertical scrollbar for WINDOW to have its upper left corner +/* Set the vertical scroll bar for WINDOW to have its upper left corner at (TOP, LEFT), and be LENGTH rows high. Set its handle to indicate that we are displaying PORTION characters out of a total of WHOLE characters, starting at POSITION. If WINDOW doesn't yet - have a scrollbar, create one for it. */ -extern void (*set_vertical_scrollbar_hook) + have a scroll bar, create one for it. */ +extern void (*set_vertical_scroll_bar_hook) ( /* struct window *window, int portion, int whole, int position */ ); /* The following three hooks are used when we're doing a thorough - redisplay of the frame. We don't explicitly know which scrollbars + redisplay of the frame. We don't explicitly know which scroll bars are going to be deleted, because keeping track of when windows go away is a real pain - can you say set-window-configuration? Instead, we just assert at the beginning of redisplay that *all* - scrollbars are to be removed, and then save scrollbars from the + scroll bars are to be removed, and then save scroll bars from the firey pit when we actually redisplay their window. */ -/* Arrange for all scrollbars on FRAME to be removed at the next call - to `*judge_scrollbars_hook'. A scrollbar may be spared if - `*redeem_scrollbar_hook' is applied to its window before the judgement. +/* Arrange for all scroll bars on FRAME to be removed at the next call + to `*judge_scroll_bars_hook'. A scroll bar may be spared if + `*redeem_scroll_bar_hook' is applied to its window before the judgement. This should be applied to each frame each time its window tree is - redisplayed, even if it is not displaying scrollbars at the moment; - if the HAS_SCROLLBARS flag has just been turned off, only calling - this and the judge_scrollbars_hook will get rid of them. + redisplayed, even if it is not displaying scroll bars at the moment; + if the HAS_SCROLL_BARS flag has just been turned off, only calling + this and the judge_scroll_bars_hook will get rid of them. If non-zero, this hook should be safe to apply to any frame, - whether or not it can support scrollbars, and whether or not it is + whether or not it can support scroll bars, and whether or not it is currently displaying them. */ -extern void (*condemn_scrollbars_hook)( /* FRAME_PTR *frame */ ); +extern void (*condemn_scroll_bars_hook)( /* FRAME_PTR *frame */ ); -/* Unmark WINDOW's scrollbar for deletion in this judgement cycle. - Note that it's okay to redeem a scrollbar that is not condemned. */ -extern void (*redeem_scrollbar_hook)( /* struct window *window */ ); +/* Unmark WINDOW's scroll bar for deletion in this judgement cycle. + Note that it's okay to redeem a scroll bar that is not condemned. */ +extern void (*redeem_scroll_bar_hook)( /* struct window *window */ ); -/* Remove all scrollbars on FRAME that haven't been saved since the - last call to `*condemn_scrollbars_hook'. +/* Remove all scroll bars on FRAME that haven't been saved since the + last call to `*condemn_scroll_bars_hook'. This should be applied to each frame after each time its window - tree is redisplayed, even if it is not displaying scrollbars at the - moment; if the HAS_SCROLLBARS flag has just been turned off, only - calling this and condemn_scrollbars_hook will get rid of them. + tree is redisplayed, even if it is not displaying scroll bars at the + moment; if the HAS_SCROLL_BARS flag has just been turned off, only + calling this and condemn_scroll_bars_hook will get rid of them. If non-zero, this hook should be safe to apply to any frame, - whether or not it can support scrollbars, and whether or not it is + whether or not it can support scroll bars, and whether or not it is currently displaying them. */ -extern void (*judge_scrollbars_hook)( /* FRAME_PTR *FRAME */ ); +extern void (*judge_scroll_bars_hook)( /* FRAME_PTR *FRAME */ ); /* Input queue declarations and hooks. */ @@ -232,23 +232,23 @@ the mouse click occurred in. .timestamp gives a timestamp (in milliseconds) for the click. */ - scrollbar_click, /* .code gives the number of the mouse button + scroll_bar_click, /* .code gives the number of the mouse button that was clicked. .modifiers holds the state of the modifier keys. .part is a lisp symbol indicating which - part of the scrollbar got clicked. + part of the scroll bar got clicked. .x gives the distance from the start of the scroll bar of the click; .y gives the total length of the scroll bar. .frame_or_window gives the window - whose scrollbar was clicked in. + whose scroll bar was clicked in. .timestamp gives a timestamp (in milliseconds) for the click. */ } kind; Lisp_Object code; - enum scrollbar_part part; + enum scroll_bar_part part; /* This field is copied into a vector while the event is in the queue, so that garbage collections won't kill it. */
--- a/src/window.c Tue Mar 02 08:21:49 1993 +0000 +++ b/src/window.c Tue Mar 02 08:22:42 1993 +0000 @@ -2038,7 +2038,7 @@ /* Return the number of columns in W. - Don't count columns occupied by scrollbars or the vertical bar + Don't count columns occupied by scroll bars or the vertical bar separating W from the sibling to its right. */ int window_internal_width (w) @@ -2056,9 +2056,9 @@ /* If we are not flush right, then our rightmost columns are occupied by some sort of separator. */ - /* Scrollbars occupy a few columns. */ - if (FRAME_HAS_VERTICAL_SCROLLBARS (f)) - return width - VERTICAL_SCROLLBAR_WIDTH; + /* Scroll bars occupy a few columns. */ + if (FRAME_HAS_VERTICAL_SCROLL_BARS (f)) + return width - VERTICAL_SCROLL_BAR_WIDTH; /* The column of `|' characters separating side-by-side windows occupies one column only. */ @@ -2899,13 +2899,13 @@ ((X-POS Y-POS) WINDOW FRAME-PART KEYSEQ).\n\ KEYSEQ is a string, the key sequence to be looked up in the mouse maps.\n\ WINDOW is the window that the click applies do.\n\ -If FRAME-PART is non-nil, the event was on a scrollbar;\n\ -then Y-POS is really the total length of the scrollbar, while X-POS is\n\ -the relative position of the scrollbar's value within that total length.\n\ +If FRAME-PART is non-nil, the event was on a scroll bar;\n\ +then Y-POS is really the total length of the scroll bar, while X-POS is\n\ +the relative position of the scroll bar's value within that total length.\n\ FRAME-PART is one of the following symbols:\n\ - `vertical-scrollbar', `vertical-slider',\n\ + `vertical-scroll-bar', `vertical-slider',\n\ `vertical-thumbup', `vertical-thumbdown',\n\ - `horizontal-scrollbar', `horizontal-slider',\n\ + `horizontal-scroll-bar', `horizontal-slider',\n\ `horizontal-thumbleft', `horizontal-thumbright'"); Vmouse_event = Qnil;
--- a/src/window.h Tue Mar 02 08:21:49 1993 +0000 +++ b/src/window.h Tue Mar 02 08:22:42 1993 +0000 @@ -123,12 +123,12 @@ Lisp_Object last_modified; /* Value of point at that time */ Lisp_Object last_point; - /* This window's vertical scrollbar. This field is only for use + /* This window's vertical scroll bar. This field is only for use by the window-system-dependent code which implements the - scrollbars; it can store anything it likes here. If this - window is newly created and we haven't displayed a scrollbar in - it yet, or if the frame doesn't have any scrollbars, this is nil. */ - Lisp_Object vertical_scrollbar; + scroll bars; it can store anything it likes here. If this + window is newly created and we haven't displayed a scroll bar in + it yet, or if the frame doesn't have any scroll bars, this is nil. */ + Lisp_Object vertical_scroll_bar; /* The rest are currently not used or only half used */ /* Frame coords of point at that time */
--- a/src/xfns.c Tue Mar 02 08:21:49 1993 +0000 +++ b/src/xfns.c Tue Mar 02 08:22:42 1993 +0000 @@ -245,7 +245,7 @@ Lisp_Object Qsuppress_initial_map; Lisp_Object Qtop; Lisp_Object Qundefined_color; -Lisp_Object Qvertical_scrollbars; +Lisp_Object Qvertical_scroll_bars; Lisp_Object Qwindow_id; Lisp_Object Qx_frame_parameter; @@ -306,7 +306,7 @@ X_PARM_NAME, X_PARM_AUTORAISE, X_PARM_AUTOLOWER, - X_PARM_VERT_SCROLLBAR, + X_PARM_VERT_SCROLL_BAR, }; @@ -329,7 +329,7 @@ void x_explicitly_set_name (); void x_set_autoraise (); void x_set_autolower (); -void x_set_vertical_scrollbars (); +void x_set_vertical_scroll_bars (); static struct x_frame_parm_table x_frame_parms[] = { @@ -346,7 +346,7 @@ "name", x_explicitly_set_name, "auto-raise", x_set_autoraise, "auto-lower", x_set_autolower, - "vertical-scrollbars", x_set_vertical_scrollbars, + "vertical-scroll-bars", x_set_vertical_scroll_bars, }; /* Attach the `x-frame-parameter' properties to @@ -1043,13 +1043,13 @@ } void -x_set_vertical_scrollbars (f, arg, oldval) +x_set_vertical_scroll_bars (f, arg, oldval) struct frame *f; Lisp_Object arg, oldval; { - if (NILP (arg) != ! FRAME_HAS_VERTICAL_SCROLLBARS (f)) + if (NILP (arg) != ! FRAME_HAS_VERTICAL_SCROLL_BARS (f)) { - FRAME_HAS_VERTICAL_SCROLLBARS (f) = ! NILP (arg); + FRAME_HAS_VERTICAL_SCROLL_BARS (f) = ! NILP (arg); /* We set this parameter before creating the X window for the frame, so we can get the geometry right from the start. @@ -1594,9 +1594,9 @@ else if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound)) error ("Must specify *both* height and width"); - f->display.x->vertical_scrollbar_extra = - (FRAME_HAS_VERTICAL_SCROLLBARS (f) - ? VERTICAL_SCROLLBAR_PIXEL_WIDTH (f) + f->display.x->vertical_scroll_bar_extra = + (FRAME_HAS_VERTICAL_SCROLL_BARS (f) + ? VERTICAL_SCROLL_BAR_PIXEL_WIDTH (f) : 0); f->display.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); f->display.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); @@ -1859,8 +1859,8 @@ else f = make_frame (1); - /* Note that X Windows does support scrollbars. */ - FRAME_CAN_HAVE_SCROLLBARS (f) = 1; + /* Note that X Windows does support scroll bars. */ + FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; /* Set the name; the functions to which we pass f expect the name to be set. */ @@ -1892,8 +1892,8 @@ /* This defaults to 2 in order to match xterm. */ x_default_parameter (f, parms, Qinternal_border_width, make_number (2), "internalBorderWidth", "BorderWidth", number); - x_default_parameter (f, parms, Qvertical_scrollbars, Qt, - "verticalScrollbars", "Scrollbars", boolean); + x_default_parameter (f, parms, Qvertical_scroll_bars, Qt, + "verticalScrollBars", "ScrollBars", boolean); /* Also do the stuff which must be set before the window exists. */ x_default_parameter (f, parms, Qforeground_color, build_string ("black"), @@ -3103,7 +3103,7 @@ BLOCK_INPUT; } while (XTYPE (obj) == Lisp_Cons /* Mouse event */ - && EQ (Fcar (Fcdr (Fcdr (obj))), Qnil) /* Not scrollbar */ + && EQ (Fcar (Fcdr (Fcdr (obj))), Qnil) /* Not scroll bar */ && EQ (Vmouse_depressed, Qnil) /* Only motion events */ && EQ (Vmouse_window, selected_window) /* In this window */ && x_mouse_frame); @@ -3207,14 +3207,14 @@ Normally X-POS and Y-POS are the position of the click on the frame\n\ (measured in characters and lines), and WINDOW is the window clicked in.\n\ KEYSEQ is a string, the key sequence to be looked up in the mouse maps.\n\ -If FRAME-PART is non-nil, the event was on a scrollbar;\n\ -then Y-POS is really the total length of the scrollbar, while X-POS is\n\ -the relative position of the scrollbar's value within that total length,\n\ +If FRAME-PART is non-nil, the event was on a scroll bar;\n\ +then Y-POS is really the total length of the scroll bar, while X-POS is\n\ +the relative position of the scroll bar's value within that total length,\n\ and a third element OFFSET appears in that list: the height of the thumb-up\n\ area at the top of the scroll bar.\n\ FRAME-PART is one of the following symbols:\n\ - `vertical-scrollbar', `vertical-thumbup', `vertical-thumbdown',\n\ - `horizontal-scrollbar', `horizontal-thumbleft', `horizontal-thumbright'.\n\ + `vertical-scroll-bar', `vertical-thumbup', `vertical-thumbdown',\n\ + `horizontal-scroll-bar', `horizontal-thumbleft', `horizontal-thumbright'.\n\ TIMESTAMP is the lower 23 bits of the X-server's timestamp for\n\ the mouse event.") (arg) @@ -3275,7 +3275,7 @@ Fcons (timestamp, Qnil))))); return Vmouse_event; } - else if ((f = x_window_to_scrollbar (xrep.MouseWindow, &part, &prefix)) != 0) + else if ((f = x_window_to_scroll_bar (xrep.MouseWindow, &part, &prefix)) != 0) { int pos, len; Lisp_Object keyseq; @@ -3284,17 +3284,17 @@ keyseq = concat2 (Fchar_to_string (make_number (prefix)), Fchar_to_string (make_number (com_letter))); - pos = xrep.MouseY - (f->display.x->v_scrollbar_width - 2); + pos = xrep.MouseY - (f->display.x->v_scroll_bar_width - 2); XSET (tempx, Lisp_Int, pos); len = ((FONT_HEIGHT (f->display.x->font) * f->height) + f->display.x->internal_border_width - - (2 * (f->display.x->v_scrollbar_width - 2))); + - (2 * (f->display.x->v_scroll_bar_width - 2))); XSET (tempy, Lisp_Int, len); XSET (timestamp, Lisp_Int, (xrep.MouseTime & 0x7fffff)); Vmouse_window = f->selected_window; Vmouse_event = Fcons (Fcons (tempx, Fcons (tempy, - Fcons (make_number (f->display.x->v_scrollbar_width - 2), + Fcons (make_number (f->display.x->v_scroll_bar_width - 2), Qnil))), Fcons (Vmouse_window, Fcons (intern (part), @@ -3344,7 +3344,7 @@ default: if (f = x_window_to_frame (xrep.MouseWindow)) Vmouse_window = f->selected_window; - else if (f = x_window_to_scrollbar (xrep.MouseWindow, &part, &prefix)) + else if (f = x_window_to_scroll_bar (xrep.MouseWindow, &part, &prefix)) Vmouse_window = f->selected_window; return Vmouse_event = Qnil; } @@ -3823,8 +3823,8 @@ staticpro (&Qtop); Qundefined_color = intern ("undefined-color"); staticpro (&Qundefined_color); - Qvertical_scrollbars = intern ("vertical-scrollbars"); - staticpro (&Qvertical_scrollbars); + Qvertical_scroll_bars = intern ("vertical-scroll-bars"); + staticpro (&Qvertical_scroll_bars); Qwindow_id = intern ("window-id"); staticpro (&Qwindow_id); Qx_frame_parameter = intern ("x-frame-parameter");
--- a/src/xterm.h Tue Mar 02 08:21:49 1993 +0000 +++ b/src/xterm.h Tue Mar 02 08:22:42 1993 +0000 @@ -335,8 +335,8 @@ XWMHints wm_hints; /* The size of the extra width currently allotted for vertical - scrollbars, in pixels. */ - int vertical_scrollbar_extra; + scroll bars, in pixels. */ + int vertical_scroll_bar_extra; }; /* Return the window associated with the frame F. */ @@ -377,130 +377,130 @@ extern struct face *x_face_table[]; -/* X-specific scrollbar stuff. */ +/* X-specific scroll bar stuff. */ -/* We represent scrollbars as lisp vectors. This allows us to place +/* We represent scroll bars as lisp vectors. This allows us to place references to them in windows without worrying about whether we'll - end up with windows referring to dead scrollbars; the garbage + end up with windows referring to dead scroll bars; the garbage collector will free it when its time comes. - We use struct scrollbar as a template for accessing fields of the + We use struct scroll_bar as a template for accessing fields of the vector. */ -struct scrollbar { +struct scroll_bar { /* These fields are shared by all vectors. */ int size_from_Lisp_Vector_struct; struct Lisp_Vector *next_from_Lisp_Vector_struct; - /* The window we're a scrollbar for. */ + /* The window we're a scroll bar for. */ Lisp_Object window; - /* The next and previous in the chain of scrollbars in this frame. */ + /* The next and previous in the chain of scroll bars in this frame. */ Lisp_Object next, prev; - /* The X window representing this scrollbar. Since this is a full + /* The X window representing this scroll bar. Since this is a full 32-bit quantity, we store it split into two 32-bit values. */ Lisp_Object x_window_low, x_window_high; - /* The position and size of the scrollbar in pixels, relative to the + /* The position and size of the scroll bar in pixels, relative to the frame. */ Lisp_Object top, left, width, height; /* The starting and ending positions of the handle, relative to the handle area (i.e. zero is the top position, not - SCROLLBAR_TOP_BORDER). If they're equal, that means the handle + SCROLL_BAR_TOP_BORDER). If they're equal, that means the handle hasn't been drawn yet. These are not actually the locations where the beginning and end are drawn; in order to keep handles from becoming invisible when editing large files, we establish a minimum height by always - drawing handle bottoms VERTICAL_SCROLLBAR_MIN_HANDLE pixels below + drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below where they would be normally; the bottom and top are in a different co-ordinate system. */ Lisp_Object start, end; - /* If the scrollbar handle is currently being dragged by the user, + /* If the scroll bar handle is currently being dragged by the user, this is the number of pixels from the top of the handle to the place where the user grabbed it. If the handle isn't currently being dragged, this is Qnil. */ Lisp_Object dragging; }; -/* The number of elements a vector holding a struct scrollbar needs. */ -#define SCROLLBAR_VEC_SIZE \ - ((sizeof (struct scrollbar) - sizeof (int) - sizeof (struct Lisp_Vector *)) \ +/* The number of elements a vector holding a struct scroll_bar needs. */ +#define SCROLL_BAR_VEC_SIZE \ + ((sizeof (struct scroll_bar) - sizeof (int) - sizeof (struct Lisp_Vector *)) \ / sizeof (Lisp_Object)) -/* Turning a lisp vector value into a pointer to a struct scrollbar. */ -#define XSCROLLBAR(vec) ((struct scrollbar *) XPNTR (vec)) +/* Turning a lisp vector value into a pointer to a struct scroll_bar. */ +#define XSCROLL_BAR(vec) ((struct scroll_bar *) XPNTR (vec)) /* Building a 32-bit C integer from two 16-bit lisp integers. */ -#define SCROLLBAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) +#define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) /* Setting two lisp integers to the low and high words of a 32-bit C int. */ -#define SCROLLBAR_UNPACK(low, high, int32) \ +#define SCROLL_BAR_UNPACK(low, high, int32) \ (XSET ((low), Lisp_Int, (int32) & 0xffff), \ XSET ((high), Lisp_Int, ((int32) >> 16) & 0xffff)) -/* Extract the X window id of the scrollbar from a struct scrollbar. */ -#define SCROLLBAR_X_WINDOW(ptr) \ - ((Window) SCROLLBAR_PACK ((ptr)->x_window_low, (ptr)->x_window_high)) +/* Extract the X window id of the scroll bar from a struct scroll_bar. */ +#define SCROLL_BAR_X_WINDOW(ptr) \ + ((Window) SCROLL_BAR_PACK ((ptr)->x_window_low, (ptr)->x_window_high)) -/* Store a window id in a struct scrollbar. */ -#define SET_SCROLLBAR_X_WINDOW(ptr, id) \ - (SCROLLBAR_UNPACK ((ptr)->x_window_low, (ptr)->x_window_high, (int) id)) +/* Store a window id in a struct scroll_bar. */ +#define SET_SCROLL_BAR_X_WINDOW(ptr, id) \ + (SCROLL_BAR_UNPACK ((ptr)->x_window_low, (ptr)->x_window_high, (int) id)) -/* Return the outside pixel width for a vertical scrollbar on frame F. */ -#define VERTICAL_SCROLLBAR_PIXEL_WIDTH(f) (2*FONT_WIDTH ((f)->display.x->font)) +/* Return the outside pixel width for a vertical scroll bar on frame F. */ +#define VERTICAL_SCROLL_BAR_PIXEL_WIDTH(f) (2*FONT_WIDTH ((f)->display.x->font)) -/* Return the outside pixel height for a vertical scrollbar HEIGHT +/* Return the outside pixel height for a vertical scroll bar HEIGHT rows high on frame F. */ -#define VERTICAL_SCROLLBAR_PIXEL_HEIGHT(f, height) \ +#define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ ((height) * FONT_HEIGHT ((f)->display.x->font)) -/* Return the inside width of a vertical scrollbar, given the outside +/* Return the inside width of a vertical scroll bar, given the outside width. */ -#define VERTICAL_SCROLLBAR_INSIDE_WIDTH(width) \ - ((width) - VERTICAL_SCROLLBAR_LEFT_BORDER - VERTICAL_SCROLLBAR_RIGHT_BORDER) +#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(width) \ + ((width) - VERTICAL_SCROLL_BAR_LEFT_BORDER - VERTICAL_SCROLL_BAR_RIGHT_BORDER) /* Return the length of the rectangle within which the top of the handle must stay. This isn't equivalent to the inside height, - because the scrollbar handle has a minimum height. + because the scroll bar handle has a minimum height. - This is the real range of motion for the scrollbar, so when we're - scaling buffer positions to scrollbar positions, we use this, not - VERTICAL_SCROLLBAR_INSIDE_HEIGHT. */ -#define VERTICAL_SCROLLBAR_TOP_RANGE(height) \ - (VERTICAL_SCROLLBAR_INSIDE_HEIGHT (height) - VERTICAL_SCROLLBAR_MIN_HANDLE) + This is the real range of motion for the scroll bar, so when we're + scaling buffer positions to scroll bar positions, we use this, not + VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */ +#define VERTICAL_SCROLL_BAR_TOP_RANGE(height) \ + (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (height) - VERTICAL_SCROLL_BAR_MIN_HANDLE) -/* Return the inside height of vertical scrollbar, given the outside - height. See VERTICAL_SCROLLBAR_TOP_RANGE too. */ -#define VERTICAL_SCROLLBAR_INSIDE_HEIGHT(height) \ - ((height) - VERTICAL_SCROLLBAR_TOP_BORDER - VERTICAL_SCROLLBAR_BOTTOM_BORDER) +/* Return the inside height of vertical scroll bar, given the outside + height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */ +#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(height) \ + ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER) -/* Border widths for scrollbars. +/* Border widths for scroll bars. - Scrollbar windows don't have any X borders; their border width is + Scroll bar windows don't have any X borders; their border width is set to zero, and we redraw borders ourselves. This makes the code a bit cleaner, since we don't have to convert between outside width (used when relating to the rest of the screen) and inside width - (used when sizing and drawing the scrollbar window itself). + (used when sizing and drawing the scroll bar window itself). The handle moves up and down/back and forth in a rectange inset - from the edges of the scrollbar. These are widths by which we - inset the handle boundaries from the scrollbar edges. */ -#define VERTICAL_SCROLLBAR_LEFT_BORDER (2) -#define VERTICAL_SCROLLBAR_RIGHT_BORDER (3) -#define VERTICAL_SCROLLBAR_TOP_BORDER (2) -#define VERTICAL_SCROLLBAR_BOTTOM_BORDER (2) + from the edges of the scroll bar. These are widths by which we + inset the handle boundaries from the scroll bar edges. */ +#define VERTICAL_SCROLL_BAR_LEFT_BORDER (2) +#define VERTICAL_SCROLL_BAR_RIGHT_BORDER (3) +#define VERTICAL_SCROLL_BAR_TOP_BORDER (2) +#define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (2) -/* Minimum lengths for scrollbar handles, in pixels. */ -#define VERTICAL_SCROLLBAR_MIN_HANDLE (5) +/* Minimum lengths for scroll bar handles, in pixels. */ +#define VERTICAL_SCROLL_BAR_MIN_HANDLE (5) /* Manipulating pixel sizes and character sizes. @@ -520,7 +520,7 @@ WIDTH columns/HEIGHT rows. */ #define CHAR_TO_PIXEL_WIDTH(f, width) \ (CHAR_TO_PIXEL_COL (f, width) \ - + (f)->display.x->vertical_scrollbar_extra \ + + (f)->display.x->vertical_scroll_bar_extra \ + (f)->display.x->internal_border_width) #define CHAR_TO_PIXEL_HEIGHT(f, height) \ (CHAR_TO_PIXEL_ROW (f, height) \ @@ -541,7 +541,7 @@ #define PIXEL_TO_CHAR_WIDTH(f, width) \ (PIXEL_TO_CHAR_COL (f, ((width) \ - (f)->display.x->internal_border_width \ - - (f)->display.x->vertical_scrollbar_extra))) + - (f)->display.x->vertical_scroll_bar_extra))) #define PIXEL_TO_CHAR_HEIGHT(f, height) \ (PIXEL_TO_CHAR_ROW (f, ((height) \ - (f)->display.x->internal_border_width)))