comparison src/termhooks.h @ 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 04fb1d3d6992
children 9e30cf115e63
comparison
equal deleted inserted replaced
1993:645d96bd3daf 1994:73ce9dd21093
53 53
54 54
55 55
56 /* Multi-frame and mouse support hooks. */ 56 /* Multi-frame and mouse support hooks. */
57 57
58 enum scrollbar_part { 58 enum scroll_bar_part {
59 scrollbar_above_handle, 59 scroll_bar_above_handle,
60 scrollbar_handle, 60 scroll_bar_handle,
61 scrollbar_below_handle 61 scroll_bar_below_handle
62 }; 62 };
63 63
64 /* Return the current position of the mouse. 64 /* Return the current position of the mouse.
65 65
66 Set *f to the frame the mouse is in, or zero if the mouse is in no 66 Set *f to the frame the mouse is in, or zero if the mouse is in no
67 Emacs frame. If it is set to zero, all the other arguments are 67 Emacs frame. If it is set to zero, all the other arguments are
68 garbage. 68 garbage.
69 69
70 If the motion started in a scrollbar, set *bar_window to the 70 If the motion started in a scroll bar, set *bar_window to the
71 scrollbar's window, *part to the part the mouse is currently over, 71 scroll bar's window, *part to the part the mouse is currently over,
72 *x to the position of the mouse along the scrollbar, and *y to the 72 *x to the position of the mouse along the scroll bar, and *y to the
73 overall length of the scrollbar. 73 overall length of the scroll bar.
74 74
75 Otherwise, set *bar_window to Qnil, and *x and *y to the column and 75 Otherwise, set *bar_window to Qnil, and *x and *y to the column and
76 row of the character cell the mouse is over. 76 row of the character cell the mouse is over.
77 77
78 Set *time to the time the mouse was at the returned position. 78 Set *time to the time the mouse was at the returned position.
79 79
80 This should clear mouse_moved until the next motion 80 This should clear mouse_moved until the next motion
81 event arrives. */ 81 event arrives. */
82 extern void (*mouse_position_hook) ( /* FRAME_PTR *f, 82 extern void (*mouse_position_hook) ( /* FRAME_PTR *f,
83 Lisp_Object *bar_window, 83 Lisp_Object *bar_window,
84 enum scrollbar_part *part, 84 enum scroll_bar_part *part,
85 Lisp_Object *x, 85 Lisp_Object *x,
86 Lisp_Object *y, 86 Lisp_Object *y,
87 unsigned long *time */ ); 87 unsigned long *time */ );
88 88
89 /* The window system handling code should set this if the mouse has 89 /* The window system handling code should set this if the mouse has
107 windows. If RAISE is zero, F is sent to the back, behind all other 107 windows. If RAISE is zero, F is sent to the back, behind all other
108 windows. */ 108 windows. */
109 extern void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ ); 109 extern void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ );
110 110
111 111
112 /* Scrollbar hooks. */ 112 /* Scroll bar hooks. */
113 113
114 /* The representation of scrollbars is determined by the code which 114 /* The representation of scroll bars is determined by the code which
115 implements them, except for one thing: they must be represented by 115 implements them, except for one thing: they must be represented by
116 lisp objects. This allows us to place references to them in 116 lisp objects. This allows us to place references to them in
117 Lisp_Windows without worrying about those references becoming 117 Lisp_Windows without worrying about those references becoming
118 dangling references when the scrollbar is destroyed. 118 dangling references when the scroll bar is destroyed.
119 119
120 The window-system-independent portion of Emacs just refers to 120 The window-system-independent portion of Emacs just refers to
121 scrollbars via their windows, and never looks inside the scrollbar 121 scroll bars via their windows, and never looks inside the scroll bar
122 representation; it always uses hook functions to do all the 122 representation; it always uses hook functions to do all the
123 scrollbar manipulation it needs. 123 scroll bar manipulation it needs.
124 124
125 The `vertical_scrollbar' field of a Lisp_Window refers to that 125 The `vertical_scroll_bar' field of a Lisp_Window refers to that
126 window's scrollbar, or is nil if the window doesn't have a 126 window's scroll bar, or is nil if the window doesn't have a
127 scrollbar. 127 scroll bar.
128 128
129 The `scrollbars' and `condemned_scrollbars' fields of a Lisp_Frame 129 The `scroll_bars' and `condemned_scroll_bars' fields of a Lisp_Frame
130 are free for use by the scrollbar implementation in any way it sees 130 are free for use by the scroll bar implementation in any way it sees
131 fit. They are marked by the garbage collector. */ 131 fit. They are marked by the garbage collector. */
132 132
133 133
134 /* Set the vertical scrollbar for WINDOW to have its upper left corner 134 /* Set the vertical scroll bar for WINDOW to have its upper left corner
135 at (TOP, LEFT), and be LENGTH rows high. Set its handle to 135 at (TOP, LEFT), and be LENGTH rows high. Set its handle to
136 indicate that we are displaying PORTION characters out of a total 136 indicate that we are displaying PORTION characters out of a total
137 of WHOLE characters, starting at POSITION. If WINDOW doesn't yet 137 of WHOLE characters, starting at POSITION. If WINDOW doesn't yet
138 have a scrollbar, create one for it. */ 138 have a scroll bar, create one for it. */
139 extern void (*set_vertical_scrollbar_hook) 139 extern void (*set_vertical_scroll_bar_hook)
140 ( /* struct window *window, 140 ( /* struct window *window,
141 int portion, int whole, int position */ ); 141 int portion, int whole, int position */ );
142 142
143 143
144 /* The following three hooks are used when we're doing a thorough 144 /* The following three hooks are used when we're doing a thorough
145 redisplay of the frame. We don't explicitly know which scrollbars 145 redisplay of the frame. We don't explicitly know which scroll bars
146 are going to be deleted, because keeping track of when windows go 146 are going to be deleted, because keeping track of when windows go
147 away is a real pain - can you say set-window-configuration? 147 away is a real pain - can you say set-window-configuration?
148 Instead, we just assert at the beginning of redisplay that *all* 148 Instead, we just assert at the beginning of redisplay that *all*
149 scrollbars are to be removed, and then save scrollbars from the 149 scroll bars are to be removed, and then save scroll bars from the
150 firey pit when we actually redisplay their window. */ 150 firey pit when we actually redisplay their window. */
151 151
152 /* Arrange for all scrollbars on FRAME to be removed at the next call 152 /* Arrange for all scroll bars on FRAME to be removed at the next call
153 to `*judge_scrollbars_hook'. A scrollbar may be spared if 153 to `*judge_scroll_bars_hook'. A scroll bar may be spared if
154 `*redeem_scrollbar_hook' is applied to its window before the judgement. 154 `*redeem_scroll_bar_hook' is applied to its window before the judgement.
155 155
156 This should be applied to each frame each time its window tree is 156 This should be applied to each frame each time its window tree is
157 redisplayed, even if it is not displaying scrollbars at the moment; 157 redisplayed, even if it is not displaying scroll bars at the moment;
158 if the HAS_SCROLLBARS flag has just been turned off, only calling 158 if the HAS_SCROLL_BARS flag has just been turned off, only calling
159 this and the judge_scrollbars_hook will get rid of them. 159 this and the judge_scroll_bars_hook will get rid of them.
160 160
161 If non-zero, this hook should be safe to apply to any frame, 161 If non-zero, this hook should be safe to apply to any frame,
162 whether or not it can support scrollbars, and whether or not it is 162 whether or not it can support scroll bars, and whether or not it is
163 currently displaying them. */ 163 currently displaying them. */
164 extern void (*condemn_scrollbars_hook)( /* FRAME_PTR *frame */ ); 164 extern void (*condemn_scroll_bars_hook)( /* FRAME_PTR *frame */ );
165 165
166 /* Unmark WINDOW's scrollbar for deletion in this judgement cycle. 166 /* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
167 Note that it's okay to redeem a scrollbar that is not condemned. */ 167 Note that it's okay to redeem a scroll bar that is not condemned. */
168 extern void (*redeem_scrollbar_hook)( /* struct window *window */ ); 168 extern void (*redeem_scroll_bar_hook)( /* struct window *window */ );
169 169
170 /* Remove all scrollbars on FRAME that haven't been saved since the 170 /* Remove all scroll bars on FRAME that haven't been saved since the
171 last call to `*condemn_scrollbars_hook'. 171 last call to `*condemn_scroll_bars_hook'.
172 172
173 This should be applied to each frame after each time its window 173 This should be applied to each frame after each time its window
174 tree is redisplayed, even if it is not displaying scrollbars at the 174 tree is redisplayed, even if it is not displaying scroll bars at the
175 moment; if the HAS_SCROLLBARS flag has just been turned off, only 175 moment; if the HAS_SCROLL_BARS flag has just been turned off, only
176 calling this and condemn_scrollbars_hook will get rid of them. 176 calling this and condemn_scroll_bars_hook will get rid of them.
177 177
178 If non-zero, this hook should be safe to apply to any frame, 178 If non-zero, this hook should be safe to apply to any frame,
179 whether or not it can support scrollbars, and whether or not it is 179 whether or not it can support scroll bars, and whether or not it is
180 currently displaying them. */ 180 currently displaying them. */
181 extern void (*judge_scrollbars_hook)( /* FRAME_PTR *FRAME */ ); 181 extern void (*judge_scroll_bars_hook)( /* FRAME_PTR *FRAME */ );
182 182
183 183
184 /* Input queue declarations and hooks. */ 184 /* Input queue declarations and hooks. */
185 185
186 extern int (*read_socket_hook) (); 186 extern int (*read_socket_hook) ();
230 in characters, within the window. 230 in characters, within the window.
231 .frame_or_window gives the frame 231 .frame_or_window gives the frame
232 the mouse click occurred in. 232 the mouse click occurred in.
233 .timestamp gives a timestamp (in 233 .timestamp gives a timestamp (in
234 milliseconds) for the click. */ 234 milliseconds) for the click. */
235 scrollbar_click, /* .code gives the number of the mouse button 235 scroll_bar_click, /* .code gives the number of the mouse button
236 that was clicked. 236 that was clicked.
237 .modifiers holds the state of the modifier 237 .modifiers holds the state of the modifier
238 keys. 238 keys.
239 .part is a lisp symbol indicating which 239 .part is a lisp symbol indicating which
240 part of the scrollbar got clicked. 240 part of the scroll bar got clicked.
241 .x gives the distance from the start of the 241 .x gives the distance from the start of the
242 scroll bar of the click; .y gives the total 242 scroll bar of the click; .y gives the total
243 length of the scroll bar. 243 length of the scroll bar.
244 .frame_or_window gives the window 244 .frame_or_window gives the window
245 whose scrollbar was clicked in. 245 whose scroll bar was clicked in.
246 .timestamp gives a timestamp (in 246 .timestamp gives a timestamp (in
247 milliseconds) for the click. */ 247 milliseconds) for the click. */
248 } kind; 248 } kind;
249 249
250 Lisp_Object code; 250 Lisp_Object code;
251 enum scrollbar_part part; 251 enum scroll_bar_part part;
252 252
253 /* This field is copied into a vector while the event is in the queue, 253 /* This field is copied into a vector while the event is in the queue,
254 so that garbage collections won't kill it. */ 254 so that garbage collections won't kill it. */
255 Lisp_Object frame_or_window; 255 Lisp_Object frame_or_window;
256 256