428
|
1 /* Generic scrollbar implementation.
|
|
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
|
|
3 Copyright (C) 1995 Free Software Foundation, Inc.
|
|
4 Copyright (C) 1995 Sun Microsystems, Inc.
|
|
5 Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>.
|
|
6
|
|
7 This file is part of XEmacs.
|
|
8
|
|
9 XEmacs is free software; you can redistribute it and/or modify it
|
|
10 under the terms of the GNU General Public License as published by the
|
|
11 Free Software Foundation; either version 2, or (at your option) any
|
|
12 later version.
|
|
13
|
|
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
17 for more details.
|
|
18
|
|
19 You should have received a copy of the GNU General Public License
|
|
20 along with XEmacs; see the file COPYING. If not, write to
|
|
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
22 Boston, MA 02111-1307, USA. */
|
|
23
|
|
24 /* Synched up with: Not in FSF. */
|
|
25
|
|
26 /* This file has been Mule-ized. */
|
|
27
|
|
28 #include <config.h>
|
|
29 #include "lisp.h"
|
|
30
|
|
31 #include "buffer.h"
|
|
32 #include "commands.h"
|
|
33 #include "scrollbar.h"
|
872
|
34 #include "device-impl.h"
|
|
35 #include "frame-impl.h"
|
428
|
36 #include "glyphs.h"
|
|
37 #include "gutter.h"
|
|
38 #include "window.h"
|
|
39
|
|
40 Lisp_Object Qinit_scrollbar_from_resources;
|
|
41
|
|
42 Lisp_Object Qscrollbar_line_up;
|
|
43 Lisp_Object Qscrollbar_line_down;
|
|
44 Lisp_Object Qscrollbar_page_up;
|
|
45 Lisp_Object Qscrollbar_page_down;
|
|
46 Lisp_Object Qscrollbar_to_top;
|
|
47 Lisp_Object Qscrollbar_to_bottom;
|
|
48 Lisp_Object Qscrollbar_vertical_drag;
|
|
49
|
|
50 Lisp_Object Qscrollbar_char_left;
|
|
51 Lisp_Object Qscrollbar_char_right;
|
|
52 Lisp_Object Qscrollbar_page_left;
|
|
53 Lisp_Object Qscrollbar_page_right;
|
|
54 Lisp_Object Qscrollbar_to_left;
|
|
55 Lisp_Object Qscrollbar_to_right;
|
|
56 Lisp_Object Qscrollbar_horizontal_drag;
|
|
57
|
|
58 #define DEFAULT_SCROLLBAR_WIDTH 15
|
|
59 #define DEFAULT_SCROLLBAR_HEIGHT 15
|
|
60
|
|
61 /* Width and height of the scrollbar. */
|
|
62 Lisp_Object Vscrollbar_width;
|
|
63 Lisp_Object Vscrollbar_height;
|
|
64
|
|
65 /* Scrollbar visibility specifiers */
|
|
66 Lisp_Object Vhorizontal_scrollbar_visible_p;
|
|
67 Lisp_Object Vvertical_scrollbar_visible_p;
|
|
68
|
|
69 /* Scrollbar location specifiers */
|
|
70 Lisp_Object Vscrollbar_on_left_p;
|
|
71 Lisp_Object Vscrollbar_on_top_p;
|
|
72
|
|
73 Lisp_Object Vscrollbar_pointer_glyph;
|
|
74
|
|
75 EXFUN (Fcenter_to_window_line, 2);
|
|
76
|
|
77 static void update_scrollbar_instance (struct window *w, int vertical,
|
|
78 struct scrollbar_instance *instance);
|
|
79
|
|
80
|
617
|
81 static Lisp_Object
|
|
82 mark_scrollbar_instance (Lisp_Object obj)
|
|
83 {
|
|
84 struct scrollbar_instance *data = XSCROLLBAR_INSTANCE (obj);
|
|
85 mark_object (wrap_window_mirror (data->mirror));
|
|
86 if (data->next)
|
|
87 return wrap_scrollbar_instance (data->next);
|
|
88 else
|
|
89 return Qnil;
|
|
90 }
|
|
91
|
|
92 DEFINE_LRECORD_IMPLEMENTATION ("scrollbar-instance", scrollbar_instance,
|
|
93 mark_scrollbar_instance,
|
|
94 internal_object_printer, 0, 0, 0, 0,
|
|
95 struct scrollbar_instance);
|
|
96
|
428
|
97 static void
|
|
98 free_scrollbar_instance (struct scrollbar_instance *instance,
|
|
99 struct frame *frame)
|
|
100 {
|
|
101 if (!instance)
|
|
102 return;
|
|
103 else
|
|
104 {
|
|
105 struct device *d = XDEVICE (frame->device);
|
|
106
|
|
107 MAYBE_DEVMETH (d, free_scrollbar_instance, (instance));
|
617
|
108 /* not worth calling free_managed_lcrecord() -- scrollbar instances
|
|
109 are not created that frequently and it's dangerous. */
|
428
|
110 }
|
|
111 }
|
|
112
|
|
113 static void
|
|
114 free_window_mirror_scrollbars (struct window_mirror *mir)
|
|
115 {
|
|
116 free_scrollbar_instance (mir->scrollbar_vertical_instance, mir->frame);
|
|
117 mir->scrollbar_vertical_instance = 0;
|
|
118
|
|
119 free_scrollbar_instance (mir->scrollbar_horizontal_instance, mir->frame);
|
|
120 mir->scrollbar_horizontal_instance = 0;
|
|
121 }
|
|
122
|
|
123 static struct window_mirror *
|
|
124 free_scrollbars_loop (Lisp_Object window, struct window_mirror *mir)
|
|
125 {
|
|
126 struct window_mirror *retval = NULL;
|
|
127
|
|
128 while (mir)
|
|
129 {
|
|
130 assert (!NILP (window));
|
|
131
|
|
132 if (mir->vchild)
|
|
133 {
|
|
134 retval = free_scrollbars_loop (XWINDOW (window)->vchild,
|
|
135 mir->vchild);
|
|
136 }
|
|
137 else if (mir->hchild)
|
|
138 {
|
|
139 retval = free_scrollbars_loop (XWINDOW (window)->hchild,
|
|
140 mir->hchild);
|
|
141 }
|
|
142
|
|
143 if (retval != NULL)
|
|
144 return retval;
|
|
145
|
|
146 if (mir->scrollbar_vertical_instance ||
|
|
147 mir->scrollbar_horizontal_instance)
|
|
148 free_window_mirror_scrollbars (mir);
|
|
149
|
|
150 mir = mir->next;
|
|
151 window = XWINDOW (window)->next;
|
|
152 }
|
|
153
|
|
154 return NULL;
|
|
155 }
|
|
156
|
|
157 /* Destroy all scrollbars associated with FRAME. Only called from
|
|
158 delete_frame_internal. */
|
|
159 void
|
|
160 free_frame_scrollbars (struct frame *f)
|
|
161 {
|
|
162 if (!HAS_FRAMEMETH_P (f, create_scrollbar_instance))
|
|
163 return;
|
|
164
|
|
165 if (f->mirror_dirty)
|
|
166 update_frame_window_mirror (f);
|
|
167
|
617
|
168 free_scrollbars_loop (f->root_window, XWINDOW_MIRROR (f->root_mirror));
|
428
|
169
|
|
170 while (FRAME_SB_VCACHE (f))
|
|
171 {
|
|
172 struct scrollbar_instance *tofree = FRAME_SB_VCACHE (f);
|
|
173 FRAME_SB_VCACHE (f) = FRAME_SB_VCACHE (f)->next;
|
|
174 tofree->next = NULL;
|
|
175 free_scrollbar_instance (tofree, f);
|
|
176 }
|
|
177
|
|
178 while (FRAME_SB_HCACHE (f))
|
|
179 {
|
|
180 struct scrollbar_instance *tofree = FRAME_SB_HCACHE (f);
|
|
181 FRAME_SB_HCACHE (f) = FRAME_SB_HCACHE (f)->next;
|
|
182 tofree->next = NULL;
|
|
183 free_scrollbar_instance (tofree, f);
|
|
184 }
|
|
185 }
|
|
186
|
|
187
|
|
188 static struct scrollbar_instance *
|
|
189 create_scrollbar_instance (struct frame *f, int vertical)
|
|
190 {
|
|
191 struct device *d = XDEVICE (f->device);
|
|
192 struct scrollbar_instance *instance =
|
617
|
193 alloc_lcrecord_type (struct scrollbar_instance,
|
|
194 &lrecord_scrollbar_instance);
|
428
|
195
|
617
|
196 zero_lcrecord (instance);
|
428
|
197 MAYBE_DEVMETH (d, create_scrollbar_instance, (f, vertical, instance));
|
|
198
|
|
199 return instance;
|
|
200 }
|
|
201
|
|
202
|
|
203 #define GET_SCROLLBAR_INSTANCE_INTERNAL(cache) \
|
|
204 do { \
|
|
205 if (FRAME_SB_##cache (f)) \
|
|
206 { \
|
|
207 struct scrollbar_instance *retval = FRAME_SB_##cache (f); \
|
|
208 FRAME_SB_##cache (f) = FRAME_SB_##cache (f)->next; \
|
|
209 retval->next = NULL; \
|
|
210 return retval; \
|
|
211 } \
|
|
212 } while (0)
|
|
213
|
|
214 static struct scrollbar_instance *
|
|
215 get_scrollbar_instance (struct frame *f, int vertical)
|
|
216 {
|
|
217 /* Check if there are any available scrollbars already in existence. */
|
|
218 if (vertical)
|
|
219 GET_SCROLLBAR_INSTANCE_INTERNAL (VCACHE);
|
|
220 else
|
|
221 GET_SCROLLBAR_INSTANCE_INTERNAL (HCACHE);
|
|
222
|
|
223 return create_scrollbar_instance (f, vertical);
|
|
224 }
|
|
225 #undef GET_SCROLLBAR_INSTANCE_INTERNAL
|
|
226
|
|
227 #define RELEASE_SCROLLBAR_INSTANCE_INTERNAL(cache) \
|
|
228 do { \
|
|
229 if (!FRAME_SB_##cache (f)) \
|
|
230 { \
|
|
231 instance->next = NULL; \
|
|
232 FRAME_SB_##cache (f) = instance; \
|
|
233 } \
|
|
234 else \
|
|
235 { \
|
|
236 instance->next = FRAME_SB_##cache (f); \
|
|
237 FRAME_SB_##cache (f) = instance; \
|
|
238 } \
|
|
239 } while (0)
|
|
240
|
|
241 static void
|
|
242 release_scrollbar_instance (struct frame *f, int vertical,
|
|
243 struct scrollbar_instance *instance)
|
|
244 {
|
|
245 /* #### should we do "instance->mir = 0;" for safety? */
|
|
246 if (vertical)
|
|
247 RELEASE_SCROLLBAR_INSTANCE_INTERNAL (VCACHE);
|
|
248 else
|
|
249 RELEASE_SCROLLBAR_INSTANCE_INTERNAL (HCACHE);
|
|
250 }
|
|
251 #undef RELEASE_SCROLLBAR_INSTANCE_INTERNAL
|
|
252
|
|
253 #ifdef MEMORY_USAGE_STATS
|
|
254
|
|
255 int
|
|
256 compute_scrollbar_instance_usage (struct device *d,
|
|
257 struct scrollbar_instance *inst,
|
|
258 struct overhead_stats *ovstats)
|
|
259 {
|
|
260 int total = 0;
|
|
261
|
|
262 total += DEVMETH (d, compute_scrollbar_instance_usage, (d, inst, ovstats));
|
|
263
|
|
264 while (inst)
|
|
265 {
|
|
266 total += malloced_storage_size (inst, sizeof (*inst), ovstats);
|
|
267 inst = inst->next;
|
|
268 }
|
|
269
|
|
270 return total;
|
|
271 }
|
|
272
|
|
273 #endif /* MEMORY_USAGE_STATS */
|
|
274
|
|
275 void
|
|
276 update_window_scrollbars (struct window *w, struct window_mirror *mirror,
|
|
277 int active, int horiz_only)
|
|
278 {
|
|
279 struct frame *f = XFRAME (w->frame);
|
|
280 struct device *d = XDEVICE (f->device);
|
|
281
|
|
282 if (!HAS_DEVMETH_P (d, create_scrollbar_instance))
|
|
283 return;
|
|
284
|
|
285 in_display++;
|
|
286
|
|
287 /* It is possible for this to get called from the mirror update
|
|
288 routines. In that case the structure is in an indeterminate
|
|
289 state but we know exactly what struct we are working with. So we
|
|
290 pass it in in that case. We also take advantage of it at some
|
|
291 other points where we know what the mirror struct is. */
|
|
292 if (!mirror)
|
|
293 mirror = find_window_mirror (w);
|
|
294
|
|
295 if (!mirror->scrollbar_vertical_instance && active)
|
|
296 mirror->scrollbar_vertical_instance = get_scrollbar_instance (f, 1);
|
|
297
|
|
298 if (!mirror->scrollbar_horizontal_instance && active)
|
|
299 mirror->scrollbar_horizontal_instance = get_scrollbar_instance (f, 0);
|
|
300
|
|
301 if (!horiz_only && mirror->scrollbar_vertical_instance)
|
|
302 {
|
|
303 int size = (active ? window_scrollbar_width (w) : 0);
|
|
304 struct scrollbar_instance *instance;
|
|
305
|
|
306 instance = mirror->scrollbar_vertical_instance;
|
|
307 instance->scrollbar_is_active = active;
|
|
308 instance->mirror = mirror;
|
|
309
|
|
310 if (active && size)
|
|
311 update_scrollbar_instance (w, 1, instance);
|
|
312 MAYBE_DEVMETH (d, update_scrollbar_instance_status,
|
|
313 (w, active, size, instance));
|
|
314
|
|
315 if (!active)
|
|
316 {
|
|
317 release_scrollbar_instance (f, 1, instance);
|
|
318 mirror->scrollbar_vertical_instance = NULL;
|
|
319 }
|
|
320 }
|
|
321
|
|
322 if (mirror->scrollbar_horizontal_instance)
|
|
323 {
|
|
324 int size = (active ? window_scrollbar_height (w) : 0);
|
|
325 struct scrollbar_instance *instance;
|
|
326
|
|
327 instance = mirror->scrollbar_horizontal_instance;
|
|
328 instance->scrollbar_is_active = active;
|
|
329 instance->mirror = mirror;
|
|
330
|
|
331 if (active && size)
|
|
332 update_scrollbar_instance (w, 0, instance);
|
|
333 MAYBE_DEVMETH (d, update_scrollbar_instance_status,
|
|
334 (w, active, size, instance));
|
|
335
|
|
336 if (!active)
|
|
337 {
|
|
338 release_scrollbar_instance (f, 0, instance);
|
|
339 mirror->scrollbar_horizontal_instance = NULL;
|
|
340 }
|
|
341 }
|
|
342
|
|
343 in_display--;
|
|
344 }
|
|
345
|
|
346 void
|
|
347 release_window_mirror_scrollbars (struct window_mirror *mir)
|
|
348 {
|
|
349 struct device *d = XDEVICE (mir->frame->device);
|
|
350
|
|
351 if (!HAS_DEVMETH_P (d, create_scrollbar_instance))
|
|
352 return;
|
|
353
|
|
354 if (mir->scrollbar_vertical_instance)
|
|
355 {
|
|
356 release_scrollbar_instance (mir->frame, 1,
|
|
357 mir->scrollbar_vertical_instance);
|
|
358 MAYBE_DEVMETH (d, release_scrollbar_instance,
|
|
359 (mir->scrollbar_vertical_instance));
|
|
360 }
|
|
361 mir->scrollbar_vertical_instance = 0;
|
|
362
|
|
363 if (mir->scrollbar_horizontal_instance)
|
|
364 {
|
|
365 release_scrollbar_instance (mir->frame, 0,
|
|
366 mir->scrollbar_horizontal_instance);
|
|
367 MAYBE_DEVMETH (d, release_scrollbar_instance,
|
|
368 (mir->scrollbar_horizontal_instance));
|
|
369 }
|
|
370 mir->scrollbar_horizontal_instance = 0;
|
|
371 }
|
|
372
|
|
373 /*
|
|
374 * If w->sb_point is on the top line then return w->sb_point else
|
|
375 * return w->start. If flag, then return beginning point of line
|
|
376 * which w->sb_point lies on.
|
|
377 */
|
665
|
378 static Charbpos
|
428
|
379 scrollbar_point (struct window *w, int flag)
|
|
380 {
|
665
|
381 Charbpos start_pos, end_pos, sb_pos;
|
428
|
382 Lisp_Object buf;
|
|
383 struct buffer *b;
|
|
384
|
|
385 if (NILP (w->buffer)) /* non-leaf window */
|
|
386 return 0;
|
|
387
|
|
388 start_pos = marker_position (w->start[CURRENT_DISP]);
|
|
389 sb_pos = marker_position (w->sb_point);
|
|
390
|
|
391 if (!flag && sb_pos < start_pos)
|
|
392 return start_pos;
|
|
393
|
|
394 buf = get_buffer (w->buffer, 0);
|
|
395 if (!NILP (buf))
|
|
396 b = XBUFFER (buf);
|
|
397 else
|
|
398 return start_pos;
|
|
399
|
|
400 if (flag)
|
|
401 end_pos = find_next_newline_no_quit (b, sb_pos, -1);
|
|
402 else
|
|
403 end_pos = find_next_newline_no_quit (b, start_pos, 1);
|
|
404
|
|
405 if (flag)
|
|
406 return end_pos;
|
|
407 else if (sb_pos > end_pos)
|
|
408 return start_pos;
|
|
409 else
|
|
410 return sb_pos;
|
|
411 }
|
|
412
|
|
413 /*
|
|
414 * Update a window's horizontal or vertical scrollbar.
|
|
415 */
|
|
416 static void
|
|
417 update_scrollbar_instance (struct window *w, int vertical,
|
|
418 struct scrollbar_instance *instance)
|
|
419 {
|
|
420 struct frame *f = XFRAME (w->frame);
|
|
421 struct device *d = XDEVICE (f->device);
|
|
422 struct buffer *b = XBUFFER (w->buffer);
|
665
|
423 Charbpos start_pos, end_pos, sb_pos;
|
428
|
424 int scrollbar_width = window_scrollbar_width (w);
|
|
425 int scrollbar_height = window_scrollbar_height (w);
|
|
426
|
|
427 int new_line_increment = -1, new_page_increment = -1;
|
|
428 int new_minimum = -1, new_maximum = -1;
|
|
429 int new_slider_size = -1, new_slider_position = -1;
|
|
430 int new_width = -1, new_height = -1, new_x = -1, new_y = -1;
|
444
|
431 struct window *new_window = 0; /* #### currently unused */
|
428
|
432
|
|
433 end_pos = BUF_Z (b) - w->window_end_pos[CURRENT_DISP];
|
|
434 sb_pos = scrollbar_point (w, 0);
|
|
435 start_pos = sb_pos;
|
|
436
|
|
437 /* The end position must be strictly greater than the start
|
|
438 position, at least for the Motify scrollbar. It shouldn't hurt
|
|
439 anything for other scrollbar implementations. */
|
|
440 if (end_pos <= start_pos)
|
|
441 end_pos = start_pos + 1;
|
|
442
|
|
443 if (vertical)
|
|
444 {
|
|
445 new_height = WINDOW_TEXT_HEIGHT (w);
|
|
446 new_width = scrollbar_width;
|
|
447 }
|
|
448 else
|
|
449 {
|
|
450 new_height = scrollbar_height;
|
|
451 new_width = WINDOW_TEXT_WIDTH (w);
|
|
452 }
|
|
453
|
|
454 /* If the height and width are not greater than 0, then later on the
|
|
455 Motif widgets will bitch and moan. */
|
|
456 if (new_height <= 0)
|
|
457 new_height = 1;
|
|
458 if (new_width <= 0)
|
|
459 new_width = 1;
|
|
460
|
|
461 assert (instance->mirror && XWINDOW (real_window(instance->mirror, 0)) == w);
|
|
462
|
|
463 /* Only character-based scrollbars are implemented at the moment.
|
|
464 Line-based will be implemented in the future. */
|
|
465
|
|
466 instance->scrollbar_is_active = 1;
|
|
467 new_line_increment = 1;
|
|
468 new_page_increment = 1;
|
|
469
|
|
470 /* We used to check for inhibit_scrollbar_slider_size_change here,
|
|
471 but that seems bogus. */
|
|
472 {
|
|
473 int x_offset, y_offset;
|
|
474
|
|
475 /* Scrollbars are always the farthest from the text area, barring
|
|
476 gutters. */
|
|
477 if (vertical)
|
|
478 {
|
|
479 if (!NILP (w->scrollbar_on_left_p))
|
|
480 {
|
|
481 x_offset = WINDOW_LEFT (w);
|
|
482 }
|
442
|
483 else
|
428
|
484 {
|
|
485 x_offset = WINDOW_RIGHT (w) - scrollbar_width;
|
|
486 if (window_needs_vertical_divider (w))
|
|
487 x_offset -= window_divider_width (w);
|
|
488 }
|
|
489 y_offset = WINDOW_TEXT_TOP (w) + f->scrollbar_y_offset;
|
|
490 }
|
|
491 else
|
|
492 {
|
|
493 x_offset = WINDOW_TEXT_LEFT (w);
|
|
494 y_offset = f->scrollbar_y_offset;
|
|
495
|
|
496 if (!NILP (w->scrollbar_on_top_p))
|
|
497 {
|
|
498 y_offset += WINDOW_TOP (w);
|
|
499 }
|
|
500 else
|
|
501 {
|
|
502 y_offset += WINDOW_TEXT_BOTTOM (w);
|
|
503 }
|
|
504 }
|
|
505
|
|
506 new_x = x_offset;
|
|
507 new_y = y_offset;
|
|
508 }
|
|
509
|
|
510 /* A disabled scrollbar has its slider sized to the entire height of
|
|
511 the scrollbar. Currently the minibuffer scrollbar is
|
|
512 disabled. */
|
|
513 if (!MINI_WINDOW_P (w) && vertical)
|
|
514 {
|
|
515 if (!DEVMETH_OR_GIVEN (d, inhibit_scrollbar_slider_size_change, (), 0))
|
|
516 {
|
|
517 new_minimum = BUF_BEGV (b);
|
|
518 new_maximum = max (BUF_ZV (b), new_minimum + 1);
|
|
519 new_slider_size = min ((end_pos - start_pos),
|
|
520 (new_maximum - new_minimum));
|
|
521 new_slider_position = sb_pos;
|
|
522 new_window = w;
|
|
523 }
|
|
524 }
|
|
525 else if (!MINI_WINDOW_P (w))
|
|
526 {
|
|
527 /* The minus one is to account for the truncation glyph. */
|
|
528 int wcw = window_char_width (w, 0) - 1;
|
|
529 int max_width, max_slide;
|
|
530
|
|
531 if (w->max_line_len < wcw)
|
|
532 {
|
|
533 max_width = 1;
|
|
534 max_slide = 1;
|
|
535 wcw = 1;
|
|
536 }
|
|
537 else
|
|
538 {
|
|
539 max_width = w->max_line_len + 2;
|
|
540 max_slide = max_width - wcw;
|
|
541 }
|
|
542
|
|
543 new_minimum = 0;
|
|
544 new_maximum = max_width;
|
|
545 new_slider_size = wcw;
|
|
546 new_slider_position = min (w->hscroll, max_slide);
|
|
547 }
|
|
548 else /* MINI_WINDOW_P (w) */
|
|
549 {
|
|
550 new_minimum = 1;
|
|
551 new_maximum = 2;
|
|
552 new_slider_size = 1;
|
|
553 new_slider_position = 1;
|
|
554 instance->scrollbar_is_active = 0;
|
|
555 }
|
|
556
|
|
557 DEVMETH (d, update_scrollbar_instance_values, (w, instance,
|
|
558 new_line_increment,
|
|
559 new_page_increment,
|
|
560 new_minimum,
|
|
561 new_maximum,
|
|
562 new_slider_size,
|
|
563 new_slider_position,
|
|
564 new_width, new_height,
|
|
565 new_x, new_y));
|
|
566 }
|
|
567
|
|
568 void
|
|
569 init_frame_scrollbars (struct frame *f)
|
|
570 {
|
|
571 struct device *d = XDEVICE (f->device);
|
|
572
|
|
573 if (HAS_DEVMETH_P (d, create_scrollbar_instance))
|
|
574 {
|
|
575 int depth = unlock_ghost_specifiers_protected ();
|
793
|
576 Lisp_Object frame = wrap_frame (f);
|
|
577
|
428
|
578 call_critical_lisp_code (XDEVICE (FRAME_DEVICE (f)),
|
|
579 Qinit_scrollbar_from_resources,
|
|
580 frame);
|
771
|
581 unbind_to (depth);
|
428
|
582 }
|
|
583 }
|
|
584
|
|
585 void
|
|
586 init_device_scrollbars (struct device *d)
|
|
587 {
|
|
588 if (HAS_DEVMETH_P (d, create_scrollbar_instance))
|
|
589 {
|
|
590 int depth = unlock_ghost_specifiers_protected ();
|
793
|
591 Lisp_Object device = wrap_device (d);
|
|
592
|
428
|
593 call_critical_lisp_code (d,
|
|
594 Qinit_scrollbar_from_resources,
|
|
595 device);
|
771
|
596 unbind_to (depth);
|
428
|
597 }
|
|
598 }
|
|
599
|
|
600 void
|
|
601 init_global_scrollbars (struct device *d)
|
|
602 {
|
|
603 if (HAS_DEVMETH_P (d, create_scrollbar_instance))
|
|
604 {
|
|
605 int depth = unlock_ghost_specifiers_protected ();
|
|
606 call_critical_lisp_code (d,
|
|
607 Qinit_scrollbar_from_resources,
|
|
608 Qglobal);
|
771
|
609 unbind_to (depth);
|
428
|
610 }
|
|
611 }
|
|
612
|
|
613 static void
|
|
614 vertical_scrollbar_changed_in_window (Lisp_Object specifier,
|
|
615 struct window *w,
|
|
616 Lisp_Object oldval)
|
|
617 {
|
|
618 /* Hold on your cerebella guys. If we always show the dividers,
|
|
619 changing scrollbar affects only how the text and scrollbar are
|
|
620 laid out in the window. If we do not want the dividers to show up
|
|
621 always, then we mark more drastic change, because changing
|
|
622 divider appearance changes lotta things. Although we actually need
|
|
623 to do this only if the scrollbar has appeared or disappeared
|
|
624 completely at either window edge, we do this always, as users
|
|
625 usually do not reposition scrollbars 200 times a second or so. Do
|
|
626 you? */
|
|
627 if (NILP (w->vertical_divider_always_visible_p))
|
|
628 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (XFRAME (WINDOW_FRAME (w)));
|
|
629 else
|
|
630 MARK_WINDOWS_CHANGED (w);
|
|
631 }
|
|
632
|
|
633 /* This function is called as a result of a change to the
|
|
634 `scrollbar-pointer' glyph. */
|
|
635 static void
|
|
636 scrollbar_pointer_changed_in_window (Lisp_Object specifier, struct window *w,
|
|
637 Lisp_Object oldval)
|
|
638 {
|
|
639 struct frame *f = XFRAME (WINDOW_FRAME (w));
|
|
640
|
|
641 if (f->init_finished)
|
|
642 MAYBE_FRAMEMETH (f, scrollbar_pointer_changed_in_window, (w));
|
|
643 }
|
|
644
|
|
645 /* ####
|
|
646
|
|
647 All of the following stuff is functions that handle scrollbar
|
|
648 actions. All of it should be moved into Lisp. This may require
|
|
649 adding some badly-needed primitives. */
|
|
650
|
|
651 /********** vertical scrollbar stuff **********/
|
|
652
|
|
653 /*
|
|
654 * If the original point is still visible, put the cursor back there.
|
|
655 * Otherwise, when scrolling down stick it at the beginning of the
|
|
656 * first visible line and when scrolling up stick it at the beginning
|
|
657 * of the last visible line.
|
|
658 */
|
|
659
|
|
660 /* #### This function should be moved into Lisp */
|
|
661 static void
|
|
662 scrollbar_reset_cursor (Lisp_Object win, Lisp_Object orig_pt)
|
|
663 {
|
|
664 /* When this function is called we know that start is already
|
|
665 accurate. We know this because either set-window-start or
|
|
666 recenter was called immediately prior to it being called. */
|
|
667 Lisp_Object buf;
|
665
|
668 Charbpos start_pos = XINT (Fwindow_start (win));
|
|
669 Charbpos ptint = XINT (orig_pt);
|
428
|
670 struct window *w = XWINDOW (win);
|
|
671 int selected = ((w == XWINDOW (Fselected_window (XFRAME (w->frame)->device)))
|
|
672 ? 1
|
|
673 : 0);
|
|
674
|
|
675 buf = Fwindow_buffer (win);
|
|
676 if (NILP (buf))
|
|
677 return; /* the window was deleted out from under us */
|
|
678
|
|
679 if (ptint < XINT (Fwindow_start (win)))
|
|
680 {
|
|
681 if (selected)
|
|
682 Fgoto_char (make_int (start_pos), buf);
|
|
683 else
|
|
684 Fset_window_point (win, make_int (start_pos));
|
|
685 }
|
|
686 else if (!point_would_be_visible (XWINDOW (win), start_pos, ptint))
|
|
687 {
|
|
688 Fmove_to_window_line (make_int (-1), win);
|
|
689
|
|
690 if (selected)
|
|
691 Fbeginning_of_line (Qnil, buf);
|
|
692 else
|
|
693 {
|
|
694 /* #### Taken from forward-line. */
|
665
|
695 Charbpos pos;
|
428
|
696
|
|
697 pos = find_next_newline (XBUFFER (buf),
|
|
698 marker_position (w->pointm[CURRENT_DISP]),
|
|
699 -1);
|
|
700 Fset_window_point (win, make_int (pos));
|
|
701 }
|
|
702 }
|
|
703 else
|
|
704 {
|
|
705 if (selected)
|
|
706 Fgoto_char (orig_pt, buf);
|
|
707 else
|
|
708 Fset_window_point (win, orig_pt);
|
|
709 }
|
|
710 }
|
|
711
|
|
712 DEFUN ("scrollbar-line-up", Fscrollbar_line_up, 1, 1, 0, /*
|
|
713 Function called when the line-up arrow on the scrollbar is clicked.
|
|
714 This is the little arrow at the top of the scrollbar. One argument, the
|
|
715 scrollbar's window. You can advise this function to change the scrollbar
|
|
716 behavior.
|
|
717 */
|
|
718 (window))
|
|
719 {
|
|
720 CHECK_LIVE_WINDOW (window);
|
|
721 window_scroll (window, make_int (1), -1, ERROR_ME_NOT);
|
|
722 zmacs_region_stays = 1;
|
|
723 return Qnil;
|
|
724 }
|
|
725
|
|
726 DEFUN ("scrollbar-line-down", Fscrollbar_line_down, 1, 1, 0, /*
|
|
727 Function called when the line-down arrow on the scrollbar is clicked.
|
|
728 This is the little arrow at the bottom of the scrollbar. One argument, the
|
|
729 scrollbar's window. You can advise this function to change the scrollbar
|
|
730 behavior.
|
|
731 */
|
|
732 (window))
|
|
733 {
|
|
734 CHECK_LIVE_WINDOW (window);
|
|
735 window_scroll (window, make_int (1), 1, ERROR_ME_NOT);
|
|
736 zmacs_region_stays = 1;
|
|
737 return Qnil;
|
|
738 }
|
|
739
|
|
740 DEFUN ("scrollbar-page-up", Fscrollbar_page_up, 1, 1, 0, /*
|
|
741 Function called when the user gives the "page-up" scrollbar action.
|
|
742 \(The way this is done can vary from scrollbar to scrollbar.) One argument,
|
|
743 a cons containing the scrollbar's window and a value (#### document me!
|
|
744 This value is nil for Motif/Lucid scrollbars and a number for Athena
|
|
745 scrollbars). You can advise this function to change the scrollbar
|
|
746 behavior.
|
|
747 */
|
|
748 (object))
|
|
749 {
|
|
750 Lisp_Object window = Fcar (object);
|
|
751
|
|
752 CHECK_LIVE_WINDOW (window);
|
|
753 /* Motif and Athena scrollbars behave differently, but in accordance
|
|
754 with their standard behaviors. It is not possible to hide the
|
|
755 differences down in lwlib because knowledge of XEmacs buffer and
|
|
756 cursor motion routines is necessary. */
|
442
|
757
|
|
758 if (NILP (XCDR (object)))
|
|
759 window_scroll (window, Qnil, -1, ERROR_ME_NOT);
|
|
760 else
|
|
761 {
|
665
|
762 Charbpos charbpos;
|
442
|
763 Lisp_Object value = Fcdr (object);
|
428
|
764
|
442
|
765 CHECK_INT (value);
|
|
766 Fmove_to_window_line (Qzero, window);
|
|
767 /* can't use Fvertical_motion() because it moves the buffer point
|
|
768 rather than the window's point.
|
428
|
769
|
442
|
770 #### It does? Why does it take a window argument then? */
|
665
|
771 charbpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)),
|
442
|
772 XINT (value), 0);
|
665
|
773 Fset_window_point (window, make_int (charbpos));
|
442
|
774 Fcenter_to_window_line (Qzero, window);
|
|
775 }
|
|
776
|
428
|
777 zmacs_region_stays = 1;
|
|
778 return Qnil;
|
|
779 }
|
|
780
|
|
781 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /*
|
|
782 Function called when the user gives the "page-down" scrollbar action.
|
|
783 \(The way this is done can vary from scrollbar to scrollbar.) One argument,
|
|
784 a cons containing the scrollbar's window and a value (#### document me!
|
|
785 This value is nil for Motif/Lucid scrollbars and a number for Athena
|
|
786 scrollbars). You can advise this function to change the scrollbar
|
|
787 behavior.
|
|
788 */
|
|
789 (object))
|
|
790 {
|
|
791 Lisp_Object window = Fcar (object);
|
|
792
|
|
793 CHECK_LIVE_WINDOW (window);
|
|
794 /* Motif and Athena scrollbars behave differently, but in accordance
|
|
795 with their standard behaviors. It is not possible to hide the
|
|
796 differences down in lwlib because knowledge of XEmacs buffer and
|
|
797 cursor motion routines is necessary. */
|
442
|
798
|
|
799 if (NILP (XCDR (object)))
|
|
800 window_scroll (window, Qnil, 1, ERROR_ME_NOT);
|
|
801 else
|
|
802 {
|
|
803 Lisp_Object value = Fcdr (object);
|
|
804 CHECK_INT (value);
|
|
805 Fmove_to_window_line (value, window);
|
|
806 Fcenter_to_window_line (Qzero, window);
|
|
807 }
|
|
808
|
428
|
809 zmacs_region_stays = 1;
|
|
810 return Qnil;
|
|
811 }
|
|
812
|
|
813 DEFUN ("scrollbar-to-top", Fscrollbar_to_top, 1, 1, 0, /*
|
|
814 Function called when the user invokes the "to-top" scrollbar action.
|
|
815 The way this is done can vary from scrollbar to scrollbar, but
|
|
816 C-button1 on the up-arrow is very common. One argument, the
|
|
817 scrollbar's window. You can advise this function to change the
|
|
818 scrollbar behavior.
|
|
819 */
|
|
820 (window))
|
|
821 {
|
|
822 Lisp_Object orig_pt = Fwindow_point (window);
|
|
823 Fset_window_point (window, Fpoint_min (Fwindow_buffer (window)));
|
|
824 Fcenter_to_window_line (Qzero, window);
|
|
825 scrollbar_reset_cursor (window, orig_pt);
|
|
826 zmacs_region_stays = 1;
|
|
827 return Qnil;
|
|
828 }
|
|
829
|
|
830 DEFUN ("scrollbar-to-bottom", Fscrollbar_to_bottom, 1, 1, 0, /*
|
|
831 Function called when the user invokes the "to-bottom" scrollbar action.
|
|
832 The way this is done can vary from scrollbar to scrollbar, but
|
|
833 C-button1 on the down-arrow is very common. One argument, the
|
|
834 scrollbar's window. You can advise this function to change the
|
|
835 scrollbar behavior.
|
|
836 */
|
|
837 (window))
|
|
838 {
|
|
839 Lisp_Object orig_pt = Fwindow_point (window);
|
|
840 Fset_window_point (window, Fpoint_max (Fwindow_buffer (window)));
|
|
841 Fcenter_to_window_line (make_int (-3), window);
|
|
842 scrollbar_reset_cursor (window, orig_pt);
|
|
843 zmacs_region_stays = 1;
|
|
844 return Qnil;
|
|
845 }
|
|
846
|
|
847 DEFUN ("scrollbar-vertical-drag", Fscrollbar_vertical_drag, 1, 1, 0, /*
|
|
848 Function called when the user drags the vertical scrollbar slider.
|
|
849 One argument, a cons containing the scrollbar's window and a value
|
|
850 between point-min and point-max. You can advise this function to
|
|
851 change the scrollbar behavior.
|
|
852 */
|
|
853 (object))
|
|
854 {
|
665
|
855 Charbpos start_pos;
|
428
|
856 Lisp_Object orig_pt;
|
|
857 Lisp_Object window = Fcar (object);
|
|
858 Lisp_Object value = Fcdr (object);
|
|
859
|
|
860 orig_pt = Fwindow_point (window);
|
|
861 Fset_marker (XWINDOW (window)->sb_point, value, Fwindow_buffer (window));
|
|
862 start_pos = scrollbar_point (XWINDOW (window), 1);
|
|
863 Fset_window_start (window, make_int (start_pos), Qnil);
|
|
864 scrollbar_reset_cursor (window, orig_pt);
|
|
865 Fsit_for(Qzero, Qnil);
|
|
866 zmacs_region_stays = 1;
|
|
867 return Qnil;
|
|
868 }
|
|
869
|
|
870 DEFUN ("scrollbar-set-hscroll", Fscrollbar_set_hscroll, 2, 2, 0, /*
|
|
871 Set WINDOW's hscroll position to VALUE.
|
|
872 This ensures that VALUE is in the proper range for the horizontal scrollbar.
|
|
873 */
|
|
874 (window, value))
|
|
875 {
|
|
876 struct window *w;
|
|
877 int hscroll, wcw, max_len;
|
|
878
|
|
879 CHECK_LIVE_WINDOW (window);
|
|
880 if (!EQ (value, Qmax))
|
|
881 CHECK_INT (value);
|
|
882
|
|
883 w = XWINDOW (window);
|
|
884 wcw = window_char_width (w, 0) - 1;
|
440
|
885 /* #### We should be able to scroll further right as long as there is
|
428
|
886 a visible truncation glyph. This calculation for max is bogus. */
|
|
887 max_len = w->max_line_len + 2;
|
|
888
|
|
889 if (EQ (value, Qmax) || (XINT (value) > (max_len - wcw)))
|
|
890 hscroll = max_len - wcw;
|
|
891 else
|
|
892 hscroll = XINT (value);
|
|
893
|
|
894 /* Can't allow this out of set-window-hscroll's acceptable range. */
|
|
895 /* #### What hell on the earth this code limits scroll size to the
|
|
896 machine-dependent SHORT size? -- kkm */
|
|
897 if (hscroll < 0)
|
|
898 hscroll = 0;
|
|
899 else if (hscroll >= (1 << (SHORTBITS - 1)) - 1)
|
|
900 hscroll = (1 << (SHORTBITS - 1)) - 1;
|
|
901
|
|
902 if (hscroll != w->hscroll)
|
|
903 Fset_window_hscroll (window, make_int (hscroll));
|
|
904
|
|
905 return Qnil;
|
|
906 }
|
|
907
|
|
908
|
|
909 /************************************************************************/
|
|
910 /* initialization */
|
|
911 /************************************************************************/
|
|
912
|
|
913 void
|
|
914 syms_of_scrollbar (void)
|
|
915 {
|
617
|
916 INIT_LRECORD_IMPLEMENTATION (scrollbar_instance);
|
|
917
|
563
|
918 DEFSYMBOL (Qscrollbar_line_up);
|
|
919 DEFSYMBOL (Qscrollbar_line_down);
|
|
920 DEFSYMBOL (Qscrollbar_page_up);
|
|
921 DEFSYMBOL (Qscrollbar_page_down);
|
|
922 DEFSYMBOL (Qscrollbar_to_top);
|
|
923 DEFSYMBOL (Qscrollbar_to_bottom);
|
|
924 DEFSYMBOL (Qscrollbar_vertical_drag);
|
428
|
925
|
563
|
926 DEFSYMBOL (Qscrollbar_char_left);
|
|
927 DEFSYMBOL (Qscrollbar_char_right);
|
|
928 DEFSYMBOL (Qscrollbar_page_left);
|
|
929 DEFSYMBOL (Qscrollbar_page_right);
|
|
930 DEFSYMBOL (Qscrollbar_to_left);
|
|
931 DEFSYMBOL (Qscrollbar_to_right);
|
|
932 DEFSYMBOL (Qscrollbar_horizontal_drag);
|
428
|
933
|
563
|
934 DEFSYMBOL (Qinit_scrollbar_from_resources);
|
428
|
935
|
|
936 /* #### All these functions should be moved into Lisp.
|
|
937 See comment above. */
|
|
938 DEFSUBR (Fscrollbar_line_up);
|
|
939 DEFSUBR (Fscrollbar_line_down);
|
|
940 DEFSUBR (Fscrollbar_page_up);
|
|
941 DEFSUBR (Fscrollbar_page_down);
|
|
942 DEFSUBR (Fscrollbar_to_top);
|
|
943 DEFSUBR (Fscrollbar_to_bottom);
|
|
944 DEFSUBR (Fscrollbar_vertical_drag);
|
|
945
|
|
946 DEFSUBR (Fscrollbar_set_hscroll);
|
|
947 }
|
|
948
|
|
949 void
|
|
950 vars_of_scrollbar (void)
|
|
951 {
|
|
952 DEFVAR_LISP ("scrollbar-pointer-glyph", &Vscrollbar_pointer_glyph /*
|
|
953 *The shape of the mouse-pointer when over a scrollbar.
|
|
954 This is a glyph; use `set-glyph-image' to change it.
|
|
955 If unspecified in a particular domain, the window-system-provided
|
|
956 default pointer is used.
|
|
957 */ );
|
|
958
|
|
959 Fprovide (intern ("scrollbar"));
|
|
960 }
|
|
961
|
|
962 void
|
|
963 specifier_vars_of_scrollbar (void)
|
|
964 {
|
|
965 DEFVAR_SPECIFIER ("scrollbar-width", &Vscrollbar_width /*
|
|
966 *Width of vertical scrollbars.
|
|
967 This is a specifier; use `set-specifier' to change it.
|
|
968 */ );
|
|
969 Vscrollbar_width = make_magic_specifier (Qnatnum);
|
|
970 set_specifier_fallback
|
|
971 (Vscrollbar_width,
|
|
972 list1 (Fcons (Qnil, make_int (DEFAULT_SCROLLBAR_WIDTH))));
|
|
973 set_specifier_caching (Vscrollbar_width,
|
438
|
974 offsetof (struct window, scrollbar_width),
|
428
|
975 vertical_scrollbar_changed_in_window,
|
438
|
976 offsetof (struct frame, scrollbar_width),
|
444
|
977 frame_size_slipped, 0);
|
428
|
978
|
|
979 DEFVAR_SPECIFIER ("scrollbar-height", &Vscrollbar_height /*
|
|
980 *Height of horizontal scrollbars.
|
|
981 This is a specifier; use `set-specifier' to change it.
|
|
982 */ );
|
|
983 Vscrollbar_height = make_magic_specifier (Qnatnum);
|
|
984 set_specifier_fallback
|
|
985 (Vscrollbar_height,
|
|
986 list1 (Fcons (Qnil, make_int (DEFAULT_SCROLLBAR_HEIGHT))));
|
|
987 set_specifier_caching (Vscrollbar_height,
|
438
|
988 offsetof (struct window, scrollbar_height),
|
428
|
989 some_window_value_changed,
|
438
|
990 offsetof (struct frame, scrollbar_height),
|
444
|
991 frame_size_slipped, 0);
|
428
|
992
|
|
993 DEFVAR_SPECIFIER ("horizontal-scrollbar-visible-p", &Vhorizontal_scrollbar_visible_p /*
|
|
994 *Whether the horizontal scrollbar is visible.
|
|
995 This is a specifier; use `set-specifier' to change it.
|
|
996 */ );
|
|
997 Vhorizontal_scrollbar_visible_p = Fmake_specifier (Qboolean);
|
|
998 set_specifier_fallback (Vhorizontal_scrollbar_visible_p,
|
|
999 list1 (Fcons (Qnil, Qt)));
|
|
1000 set_specifier_caching (Vhorizontal_scrollbar_visible_p,
|
438
|
1001 offsetof (struct window,
|
|
1002 horizontal_scrollbar_visible_p),
|
428
|
1003 some_window_value_changed,
|
438
|
1004 offsetof (struct frame,
|
|
1005 horizontal_scrollbar_visible_p),
|
444
|
1006 frame_size_slipped, 0);
|
428
|
1007
|
|
1008 DEFVAR_SPECIFIER ("vertical-scrollbar-visible-p", &Vvertical_scrollbar_visible_p /*
|
|
1009 *Whether the vertical scrollbar is visible.
|
|
1010 This is a specifier; use `set-specifier' to change it.
|
|
1011 */ );
|
|
1012 Vvertical_scrollbar_visible_p = Fmake_specifier (Qboolean);
|
|
1013 set_specifier_fallback (Vvertical_scrollbar_visible_p,
|
|
1014 list1 (Fcons (Qnil, Qt)));
|
|
1015 set_specifier_caching (Vvertical_scrollbar_visible_p,
|
438
|
1016 offsetof (struct window,
|
|
1017 vertical_scrollbar_visible_p),
|
428
|
1018 vertical_scrollbar_changed_in_window,
|
438
|
1019 offsetof (struct frame,
|
|
1020 vertical_scrollbar_visible_p),
|
444
|
1021 frame_size_slipped, 0);
|
428
|
1022
|
|
1023 DEFVAR_SPECIFIER ("scrollbar-on-left-p", &Vscrollbar_on_left_p /*
|
|
1024 *Whether the vertical scrollbar is on the left side of window or frame.
|
|
1025 This is a specifier; use `set-specifier' to change it.
|
|
1026 */ );
|
|
1027 Vscrollbar_on_left_p = Fmake_specifier (Qboolean);
|
442
|
1028
|
428
|
1029 {
|
|
1030 /* Kludge. Under X, we want athena scrollbars on the left,
|
|
1031 while all other scrollbars go on the right by default. */
|
|
1032 Lisp_Object fallback = list1 (Fcons (Qnil, Qnil));
|
|
1033 #if defined (HAVE_X_WINDOWS) \
|
|
1034 && !defined (LWLIB_SCROLLBARS_MOTIF) \
|
|
1035 && !defined (LWLIB_SCROLLBARS_LUCID) \
|
|
1036 && !defined (LWLIB_SCROLLBARS_ATHENA3D)
|
|
1037
|
|
1038 fallback = Fcons (Fcons (list1 (Qx), Qt), fallback);
|
|
1039 #endif
|
|
1040 set_specifier_fallback (Vscrollbar_on_left_p, fallback);
|
|
1041 }
|
|
1042
|
|
1043 set_specifier_caching (Vscrollbar_on_left_p,
|
438
|
1044 offsetof (struct window, scrollbar_on_left_p),
|
428
|
1045 vertical_scrollbar_changed_in_window,
|
438
|
1046 offsetof (struct frame, scrollbar_on_left_p),
|
444
|
1047 frame_size_slipped, 0);
|
428
|
1048
|
|
1049 DEFVAR_SPECIFIER ("scrollbar-on-top-p", &Vscrollbar_on_top_p /*
|
|
1050 *Whether the horizontal scrollbar is on the top side of window or frame.
|
|
1051 This is a specifier; use `set-specifier' to change it.
|
|
1052 */ );
|
|
1053 Vscrollbar_on_top_p = Fmake_specifier (Qboolean);
|
|
1054 set_specifier_fallback (Vscrollbar_on_top_p,
|
|
1055 list1 (Fcons (Qnil, Qnil)));
|
|
1056 set_specifier_caching (Vscrollbar_on_top_p,
|
438
|
1057 offsetof (struct window, scrollbar_on_top_p),
|
428
|
1058 some_window_value_changed,
|
438
|
1059 offsetof (struct frame, scrollbar_on_top_p),
|
444
|
1060 frame_size_slipped, 0);
|
428
|
1061 }
|
|
1062
|
|
1063 void
|
|
1064 complex_vars_of_scrollbar (void)
|
|
1065 {
|
|
1066 Vscrollbar_pointer_glyph = Fmake_glyph_internal (Qpointer);
|
|
1067
|
|
1068 set_specifier_caching (XGLYPH (Vscrollbar_pointer_glyph)->image,
|
438
|
1069 offsetof (struct window, scrollbar_pointer),
|
428
|
1070 scrollbar_pointer_changed_in_window,
|
444
|
1071 0, 0, 0);
|
428
|
1072 }
|