428
|
1 /* scrollbar implementation -- mswindows interface.
|
|
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
|
|
3 Copyright (C) 1994 Amdahl Corporation.
|
|
4 Copyright (C) 1995 Sun Microsystems, Inc.
|
|
5 Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>.
|
771
|
6 Copyright (C) 2001, 2002 Ben Wing.
|
428
|
7
|
|
8 This file is part of XEmacs.
|
|
9
|
|
10 XEmacs is free software; you can redistribute it and/or modify it
|
|
11 under the terms of the GNU General Public License as published by the
|
|
12 Free Software Foundation; either version 2, or (at your option) any
|
|
13 later version.
|
|
14
|
|
15 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
18 for more details.
|
|
19
|
|
20 You should have received a copy of the GNU General Public License
|
|
21 along with XEmacs; see the file COPYING. If not, write to
|
|
22 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
23 Boston, MA 02111-1307, USA. */
|
|
24
|
|
25 /* Synched up with: Not in FSF. */
|
|
26
|
771
|
27 /* This file essentially Mule-ized (except perhaps some Unicode splitting).
|
|
28 5-2000. */
|
|
29
|
428
|
30 #include <config.h>
|
|
31 #include "lisp.h"
|
|
32
|
800
|
33 #include "device.h"
|
617
|
34 #include "elhash.h"
|
428
|
35 #include "events.h"
|
872
|
36 #include "frame-impl.h"
|
617
|
37 #include "opaque.h"
|
428
|
38 #include "scrollbar.h"
|
|
39 #include "specifier.h"
|
872
|
40 #include "window-impl.h"
|
428
|
41
|
872
|
42 #include "console-msw-impl.h"
|
800
|
43 #include "scrollbar-msw.h"
|
|
44
|
428
|
45 /* We use a similar sort of vertical scrollbar drag hack for mswindows
|
|
46 * scrollbars as is used for Motif or Lucid scrollbars under X.
|
|
47 * We do character-based instead of line-based scrolling, which can mean that
|
|
48 * without the hack it is impossible to drag to the end of a buffer. */
|
|
49 #define VERTICAL_SCROLLBAR_DRAG_HACK
|
|
50
|
|
51 static int vertical_drag_in_progress = 0;
|
673
|
52 extern Lisp_Object mswindows_find_frame (HWND hwnd);
|
428
|
53
|
617
|
54 /* As long as the HWND is around, the scrollbar instance must be GC-protected.
|
|
55 We have gotten crashes, apparently from trying to access a dead, freed
|
|
56 frame inside of a window mirror pointed to by the scrollbar structure. */
|
|
57 static Lisp_Object Vmswindows_scrollbar_instance_table;
|
|
58
|
428
|
59 static void
|
|
60 mswindows_create_scrollbar_instance (struct frame *f, int vertical,
|
|
61 struct scrollbar_instance *sb)
|
|
62 {
|
|
63 int orientation;
|
617
|
64 Lisp_Object ptr;
|
442
|
65
|
428
|
66 sb->scrollbar_data = xnew_and_zero (struct mswindows_scrollbar_data);
|
442
|
67
|
428
|
68 if (vertical)
|
|
69 orientation = SBS_VERT;
|
|
70 else
|
|
71 orientation = SBS_HORZ;
|
442
|
72
|
428
|
73 SCROLLBAR_MSW_HANDLE (sb) =
|
771
|
74 qxeCreateWindowEx (0, XETEXT ("SCROLLBAR"), 0, orientation|WS_CHILD,
|
|
75 CW_USEDEFAULT, CW_USEDEFAULT,
|
|
76 CW_USEDEFAULT, CW_USEDEFAULT,
|
|
77 FRAME_MSWINDOWS_HANDLE (f),
|
|
78 NULL, NULL, NULL);
|
546
|
79 SCROLLBAR_MSW_INFO (sb).cbSize = sizeof (SCROLLINFO);
|
428
|
80 SCROLLBAR_MSW_INFO (sb).fMask = SIF_ALL;
|
617
|
81 GetScrollInfo (SCROLLBAR_MSW_HANDLE (sb), SB_CTL,
|
|
82 &SCROLLBAR_MSW_INFO (sb));
|
|
83 ptr = make_opaque_ptr (SCROLLBAR_MSW_HANDLE (sb));
|
|
84 Fputhash (ptr, wrap_scrollbar_instance (sb),
|
|
85 Vmswindows_scrollbar_instance_table);
|
771
|
86 qxeSetWindowLong (SCROLLBAR_MSW_HANDLE (sb), GWL_USERDATA,
|
617
|
87 (LONG) LISP_TO_VOID (ptr));
|
428
|
88 }
|
|
89
|
|
90 static void
|
|
91 mswindows_free_scrollbar_instance (struct scrollbar_instance *sb)
|
|
92 {
|
617
|
93 void *opaque =
|
771
|
94 (void *) qxeGetWindowLong (SCROLLBAR_MSW_HANDLE (sb), GWL_USERDATA);
|
617
|
95 Lisp_Object ptr;
|
|
96
|
826
|
97 ptr = VOID_TO_LISP (opaque);
|
617
|
98 assert (OPAQUE_PTRP (ptr));
|
|
99 ptr = Fremhash (ptr, Vmswindows_scrollbar_instance_table);
|
|
100 assert (!NILP (ptr));
|
428
|
101 DestroyWindow (SCROLLBAR_MSW_HANDLE (sb));
|
442
|
102 if (sb->scrollbar_data)
|
1726
|
103 xfree (sb->scrollbar_data, void *);
|
428
|
104 }
|
|
105
|
|
106 static void
|
611
|
107 unshow_that_mofo (void *handle)
|
|
108 {
|
|
109 ShowScrollBar ((HWND) handle, SB_CTL, 0);
|
|
110 }
|
|
111
|
|
112 static void
|
428
|
113 mswindows_release_scrollbar_instance (struct scrollbar_instance *sb)
|
|
114 {
|
611
|
115 if (gc_in_progress)
|
|
116 /* #### way bogus! need to remove the offending call.
|
|
117 see mark_redisplay(). */
|
|
118 register_post_gc_action (unshow_that_mofo,
|
|
119 (void *) SCROLLBAR_MSW_HANDLE (sb));
|
|
120 else
|
|
121 ShowScrollBar (SCROLLBAR_MSW_HANDLE (sb), SB_CTL, 0);
|
428
|
122 SCROLLBAR_MSW_SIZE (sb) = 0;
|
|
123 }
|
|
124
|
|
125 #define UPDATE_POS_FIELD(field) \
|
|
126 if (new_##field >= 0 && SCROLLBAR_MSW_DATA (sb)->field != new_##field) { \
|
|
127 SCROLLBAR_MSW_DATA (sb)->field = new_##field; \
|
|
128 pos_changed = 1; \
|
|
129 }
|
|
130
|
|
131 static void
|
2286
|
132 mswindows_update_scrollbar_instance_values (struct window *UNUSED (w),
|
428
|
133 struct scrollbar_instance *sb,
|
2286
|
134 int UNUSED (new_line_increment),
|
|
135 int UNUSED (new_page_increment),
|
428
|
136 int new_minimum, int new_maximum,
|
|
137 int new_slider_size,
|
|
138 int new_slider_position,
|
|
139 int new_scrollbar_width,
|
|
140 int new_scrollbar_height,
|
|
141 int new_scrollbar_x,
|
|
142 int new_scrollbar_y)
|
|
143 {
|
|
144 int pos_changed = 0;
|
771
|
145 int vert = qxeGetWindowLong (SCROLLBAR_MSW_HANDLE (sb), GWL_STYLE) & SBS_VERT;
|
428
|
146
|
|
147 #if 0
|
|
148 stderr_out ("[%d, %d], page = %d, pos = %d, inhibit = %d\n", new_minimum, new_maximum,
|
|
149 new_slider_size, new_slider_position,inhibit_slider_size_change);
|
|
150 #endif
|
|
151
|
|
152 /* These might be optimized, but since at least one will change at each
|
|
153 call, it's probably not worth it. */
|
|
154 SCROLLBAR_MSW_INFO (sb).nMin = new_minimum;
|
|
155 SCROLLBAR_MSW_INFO (sb).nMax = new_maximum;
|
|
156 SCROLLBAR_MSW_INFO (sb).nPage = new_slider_size + 1; /* +1 for DISABLENOSCROLL */
|
|
157 SCROLLBAR_MSW_INFO (sb).nPos = new_slider_position;
|
|
158 #ifndef VERTICAL_SCROLLBAR_DRAG_HACK
|
|
159 SCROLLBAR_MSW_INFO (sb).fMask = ((vert && vertical_drag_in_progress)
|
|
160 ? SIF_RANGE | SIF_POS
|
|
161 : SIF_ALL | SIF_DISABLENOSCROLL);
|
|
162 #else
|
|
163 SCROLLBAR_MSW_INFO (sb).fMask = SIF_ALL | SIF_DISABLENOSCROLL;
|
|
164
|
|
165 /* Ignore XEmacs' requests to update the thumb position and size; they don't
|
|
166 * bear any relation to reality because we're reporting made-up positions */
|
|
167 if (!(vert && vertical_drag_in_progress))
|
|
168 #endif
|
|
169 SetScrollInfo (SCROLLBAR_MSW_HANDLE (sb), SB_CTL, &SCROLLBAR_MSW_INFO (sb),
|
|
170 TRUE);
|
|
171
|
|
172 UPDATE_POS_FIELD (scrollbar_x);
|
|
173 UPDATE_POS_FIELD (scrollbar_y);
|
|
174 UPDATE_POS_FIELD (scrollbar_width);
|
|
175 UPDATE_POS_FIELD (scrollbar_height);
|
|
176
|
442
|
177 if (pos_changed)
|
428
|
178 {
|
617
|
179 MoveWindow (SCROLLBAR_MSW_HANDLE (sb),
|
|
180 new_scrollbar_x, new_scrollbar_y,
|
|
181 new_scrollbar_width, new_scrollbar_height,
|
|
182 TRUE);
|
428
|
183 }
|
|
184 }
|
|
185
|
|
186 static void
|
2286
|
187 mswindows_update_scrollbar_instance_status (struct window *UNUSED (w),
|
|
188 int UNUSED (active), int size,
|
428
|
189 struct scrollbar_instance *sb)
|
|
190 {
|
|
191 if (SCROLLBAR_MSW_SIZE (sb) != size)
|
|
192 {
|
|
193 SCROLLBAR_MSW_SIZE (sb) = size;
|
|
194 ShowScrollBar (SCROLLBAR_MSW_HANDLE (sb), SB_CTL,
|
|
195 SCROLLBAR_MSW_SIZE (sb));
|
|
196 SCROLLBAR_MSW_INFO(sb).fMask |= SIF_DISABLENOSCROLL;
|
|
197 SetScrollInfo(SCROLLBAR_MSW_HANDLE (sb), SB_CTL, &SCROLLBAR_MSW_INFO (sb), TRUE);
|
|
198 }
|
|
199 }
|
|
200
|
|
201 void
|
2286
|
202 mswindows_handle_scrollbar_event (HWND hwnd, int code, int UNUSED (pos))
|
428
|
203 {
|
|
204 struct frame *f;
|
|
205 Lisp_Object win, frame;
|
617
|
206 struct scrollbar_instance *sb = 0;
|
|
207 void *v;
|
428
|
208 SCROLLINFO scrollinfo;
|
771
|
209 int vert = qxeGetWindowLong (hwnd, GWL_STYLE) & SBS_VERT;
|
428
|
210 int value;
|
|
211
|
771
|
212 v = (void *) qxeGetWindowLong (hwnd, GWL_USERDATA);
|
617
|
213 if (!v)
|
546
|
214 {
|
617
|
215 /* apparently this can happen, as it was definitely necessary
|
|
216 to put the check in for sb below (VERTICAL_SCROLLBAR_DRAG_HACK) */
|
546
|
217 frame = mswindows_find_frame (hwnd);
|
|
218 f = XFRAME (frame);
|
|
219 win = FRAME_SELECTED_WINDOW (f);
|
|
220 }
|
|
221 else
|
|
222 {
|
617
|
223 Lisp_Object ptr;
|
826
|
224 ptr = VOID_TO_LISP (v);
|
617
|
225 assert (OPAQUE_PTRP (ptr));
|
|
226 ptr = Fgethash (ptr, Vmswindows_scrollbar_instance_table, Qnil);
|
|
227 sb = XSCROLLBAR_INSTANCE (ptr);
|
664
|
228 /* #### we're still hitting an abort here with 0 as the second
|
|
229 parameter, although only occasionally. It seems that sometimes we
|
|
230 receive events for scrollbars that don't exist anymore. I assume
|
|
231 it must happen like this: The user does something that causes a
|
|
232 scrollbar to disappear (e.g. Alt-TAB, causing recomputation of
|
|
233 everything in the new frame) and then immediately uses the mouse
|
|
234 wheel, generating scrollbar events. Both events get posted before
|
|
235 we have a chance to process them, and in processing the first, the
|
|
236 scrollbar mentioned in the second disappears. */
|
|
237 win = real_window (sb->mirror, 1);
|
|
238 if (NILP (win))
|
|
239 return;
|
617
|
240 frame = WINDOW_FRAME (XWINDOW (win));
|
546
|
241 f = XFRAME (frame);
|
|
242 }
|
428
|
243
|
673
|
244 /* SB_LINEDOWN == SB_CHARLEFT etc. This is the way they will
|
|
245 always be - any Windows is binary compatible backward with
|
|
246 old programs */
|
428
|
247
|
|
248 switch (code)
|
|
249 {
|
|
250 case SB_LINEDOWN:
|
|
251 mswindows_enqueue_misc_user_event
|
|
252 (frame, vert ? Qscrollbar_line_down : Qscrollbar_char_right, win);
|
|
253 break;
|
442
|
254
|
428
|
255 case SB_LINEUP:
|
|
256 mswindows_enqueue_misc_user_event
|
|
257 (frame, vert ? Qscrollbar_line_up : Qscrollbar_char_left, win);
|
|
258 break;
|
442
|
259
|
428
|
260 case SB_PAGEDOWN:
|
|
261 mswindows_enqueue_misc_user_event
|
|
262 (win, vert ? Qscrollbar_page_down : Qscrollbar_page_right,
|
|
263 vert ? Fcons (win, Qnil) : win);
|
|
264 break;
|
|
265
|
|
266 case SB_PAGEUP:
|
|
267 mswindows_enqueue_misc_user_event
|
|
268 (frame,
|
|
269 vert ? Qscrollbar_page_up : Qscrollbar_page_left,
|
|
270 vert ? Fcons (win, Qnil) : win);
|
|
271 break;
|
442
|
272
|
428
|
273 case SB_BOTTOM:
|
|
274 mswindows_enqueue_misc_user_event
|
|
275 (frame, vert ? Qscrollbar_to_bottom : Qscrollbar_to_right, win);
|
|
276 break;
|
|
277
|
|
278 case SB_TOP:
|
|
279 mswindows_enqueue_misc_user_event
|
|
280 (frame, vert ? Qscrollbar_to_top : Qscrollbar_to_left, win);
|
|
281 break;
|
|
282
|
|
283 case SB_THUMBTRACK:
|
|
284 case SB_THUMBPOSITION:
|
|
285 scrollinfo.cbSize = sizeof(SCROLLINFO);
|
|
286 scrollinfo.fMask = SIF_ALL;
|
|
287 GetScrollInfo (hwnd, SB_CTL, &scrollinfo);
|
|
288 vertical_drag_in_progress = vert;
|
|
289 #ifdef VERTICAL_SCROLLBAR_DRAG_HACK
|
|
290 if (vert && (scrollinfo.nTrackPos > scrollinfo.nPos))
|
|
291 /* new buffer position =
|
|
292 * buffer position at start of drag +
|
|
293 * ((text remaining in buffer at start of drag) *
|
|
294 * (amount that the thumb has been moved) /
|
|
295 * (space that remained past end of the thumb at start of drag)) */
|
|
296 value = (int)
|
|
297 (scrollinfo.nPos
|
|
298 + (((double)
|
|
299 (scrollinfo.nMax - scrollinfo.nPos)
|
|
300 * (scrollinfo.nTrackPos - scrollinfo.nPos))
|
|
301 / (scrollinfo.nMax - scrollinfo.nPage - scrollinfo.nPos)))
|
|
302 - 2; /* ensure that the last line doesn't disappear off screen */
|
|
303 else
|
|
304 #endif
|
|
305 value = scrollinfo.nTrackPos;
|
|
306 mswindows_enqueue_misc_user_event
|
|
307 (frame,
|
|
308 vert ? Qscrollbar_vertical_drag : Qscrollbar_horizontal_drag,
|
|
309 Fcons (win, make_int (value)));
|
|
310 break;
|
|
311
|
|
312 case SB_ENDSCROLL:
|
|
313 #ifdef VERTICAL_SCROLLBAR_DRAG_HACK
|
546
|
314 if (vertical_drag_in_progress && sb)
|
428
|
315 /* User has just dropped the thumb - finally update it */
|
|
316 SetScrollInfo (SCROLLBAR_MSW_HANDLE (sb), SB_CTL,
|
|
317 &SCROLLBAR_MSW_INFO (sb), TRUE);
|
|
318 #endif
|
|
319 vertical_drag_in_progress = 0;
|
|
320 break;
|
|
321 }
|
|
322 }
|
|
323
|
|
324 static int
|
771
|
325 can_scroll (struct scrollbar_instance *scrollbar)
|
428
|
326 {
|
|
327 return scrollbar != NULL
|
|
328 && IsWindowVisible (SCROLLBAR_MSW_HANDLE (scrollbar))
|
|
329 && IsWindowEnabled (SCROLLBAR_MSW_HANDLE (scrollbar));
|
|
330 }
|
|
331
|
|
332 int
|
464
|
333 mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta,
|
|
334 POINTS where)
|
428
|
335 {
|
442
|
336 int hasVertBar, hasHorzBar; /* Indicates presence of scroll bars */
|
428
|
337 unsigned wheelScrollLines = 0; /* Number of lines per wheel notch */
|
826
|
338 Lisp_Object win = Qnil, corpore, sano;
|
464
|
339 struct window_mirror *mirror;
|
707
|
340 int mene, _mene, tekel, upharsin;
|
|
341 Charbpos mens, sana;
|
|
342 Charcount in;
|
|
343 struct window *needle_in_haystack = 0;
|
464
|
344 POINT donde_esta;
|
428
|
345
|
464
|
346 donde_esta.x = where.x;
|
|
347 donde_esta.y = where.y;
|
|
348
|
|
349 /* Find the window to scroll */
|
|
350
|
707
|
351 /* The mouse event could actually occur outside of the emacs
|
|
352 frame. */
|
|
353 if (ScreenToClient (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)),
|
|
354 &donde_esta) != 0)
|
|
355 {
|
819
|
356 /* stderr_out ("donde_esta: %d %d\n", donde_esta.x, donde_esta.y); */
|
|
357 pixel_to_glyph_translation (XFRAME (frame), donde_esta.x, donde_esta.y,
|
|
358 &mene, &_mene, &tekel, &upharsin,
|
|
359 &needle_in_haystack,
|
|
360 &mens, &sana, &in, &corpore, &sano);
|
|
361
|
|
362 if (needle_in_haystack)
|
|
363 {
|
|
364 win = wrap_window (needle_in_haystack);
|
|
365 /* stderr_out ("found needle\n");
|
|
366 debug_print (win); */
|
|
367 }
|
707
|
368 }
|
819
|
369
|
|
370 if (!needle_in_haystack)
|
707
|
371 {
|
|
372 win = FRAME_SELECTED_WINDOW (XFRAME (frame));
|
|
373 needle_in_haystack = XWINDOW (win);
|
|
374 }
|
464
|
375
|
707
|
376 mirror = find_window_mirror (needle_in_haystack);
|
428
|
377
|
|
378 /* Check that there is something to scroll */
|
|
379 hasVertBar = can_scroll (mirror->scrollbar_vertical_instance);
|
|
380 hasHorzBar = can_scroll (mirror->scrollbar_horizontal_instance);
|
|
381 if (!hasVertBar && !hasHorzBar)
|
|
382 return FALSE;
|
|
383
|
|
384 /* No support for panning and zooming, so ignore */
|
|
385 if (keys & (MK_SHIFT | MK_CONTROL))
|
|
386 return FALSE;
|
|
387
|
|
388 /* Get the number of lines per wheel delta */
|
771
|
389 qxeSystemParametersInfo (SPI_GETWHEELSCROLLLINES, 0, &wheelScrollLines, 0);
|
428
|
390
|
|
391 /* Calculate the amount to scroll */
|
|
392 if (wheelScrollLines == WHEEL_PAGESCROLL)
|
|
393 {
|
|
394 /* Scroll by a page */
|
|
395 Lisp_Object function;
|
|
396 if (hasVertBar)
|
|
397 function = delta > 0 ? Qscrollbar_page_up : Qscrollbar_page_down;
|
|
398 else
|
|
399 function = delta > 0 ? Qscrollbar_page_left : Qscrollbar_page_right;
|
|
400 mswindows_enqueue_misc_user_event (frame, function, Fcons (win, Qnil));
|
|
401 }
|
|
402 else /* Scroll by a number of lines */
|
|
403 {
|
|
404 /* Calc the number of lines to scroll */
|
|
405 int toScroll = MulDiv (delta, wheelScrollLines, WHEEL_DELTA);
|
|
406
|
|
407 /* Do the scroll */
|
|
408 Lisp_Object function;
|
|
409 if (hasVertBar)
|
|
410 function = delta > 0 ? Qscrollbar_line_up : Qscrollbar_line_down;
|
|
411 else
|
|
412 function = delta > 0 ? Qscrollbar_char_left : Qscrollbar_char_right;
|
|
413 if (toScroll < 0)
|
|
414 toScroll = -toScroll;
|
|
415 while (toScroll--)
|
|
416 mswindows_enqueue_misc_user_event (frame, function, win);
|
|
417 }
|
|
418
|
|
419 return TRUE;
|
|
420 }
|
|
421
|
|
422 #ifdef MEMORY_USAGE_STATS
|
|
423
|
|
424 static int
|
2286
|
425 mswindows_compute_scrollbar_instance_usage (struct device *UNUSED (d),
|
|
426 struct scrollbar_instance *inst,
|
|
427 struct overhead_stats *ovstats)
|
428
|
428 {
|
|
429 int total = 0;
|
|
430
|
|
431 while (inst)
|
|
432 {
|
|
433 struct mswindows_scrollbar_data *data =
|
|
434 (struct mswindows_scrollbar_data *) inst->scrollbar_data;
|
|
435
|
2720
|
436 #ifdef MC_ALLOC
|
|
437 total += mc_alloced_storage_size (sizeof (*data), ovstats);
|
|
438 #else /* not MC_ALLOC */
|
428
|
439 total += malloced_storage_size (data, sizeof (*data), ovstats);
|
2720
|
440 #endif /* not MC_ALLOC */
|
428
|
441 inst = inst->next;
|
|
442 }
|
|
443
|
|
444 return total;
|
|
445 }
|
|
446
|
|
447 #endif /* MEMORY_USAGE_STATS */
|
|
448
|
|
449 /************************************************************************/
|
|
450 /* Device-specific ghost specifiers initialization */
|
|
451 /************************************************************************/
|
|
452
|
617
|
453 DEFUN ("mswindows-init-scrollbar-metrics", Fmswindows_init_scrollbar_metrics,
|
|
454 1, 1, 0, /*
|
428
|
455 */
|
|
456 (locale))
|
|
457 {
|
|
458 if (DEVICEP (locale))
|
|
459 {
|
|
460 add_spec_to_ghost_specifier (Vscrollbar_width,
|
|
461 make_int (GetSystemMetrics (SM_CXVSCROLL)),
|
|
462 locale, Qmswindows, Qnil);
|
|
463 add_spec_to_ghost_specifier (Vscrollbar_height,
|
|
464 make_int (GetSystemMetrics (SM_CYHSCROLL)),
|
|
465 locale, Qmswindows, Qnil);
|
|
466 }
|
|
467 return Qnil;
|
|
468 }
|
|
469
|
|
470
|
|
471 /************************************************************************/
|
|
472 /* initialization */
|
|
473 /************************************************************************/
|
|
474
|
|
475 void
|
|
476 console_type_create_scrollbar_mswindows (void)
|
|
477 {
|
|
478 CONSOLE_HAS_METHOD (mswindows, create_scrollbar_instance);
|
|
479 CONSOLE_HAS_METHOD (mswindows, free_scrollbar_instance);
|
|
480 CONSOLE_HAS_METHOD (mswindows, release_scrollbar_instance);
|
|
481 CONSOLE_HAS_METHOD (mswindows, update_scrollbar_instance_values);
|
|
482 CONSOLE_HAS_METHOD (mswindows, update_scrollbar_instance_status);
|
|
483 /* CONSOLE_HAS_METHOD (mswindows, scrollbar_width_changed_in_frame); */
|
|
484 #ifdef MEMORY_USAGE_STATS
|
|
485 CONSOLE_HAS_METHOD (mswindows, compute_scrollbar_instance_usage);
|
|
486 #endif
|
|
487 }
|
|
488
|
|
489 void
|
617
|
490 syms_of_scrollbar_mswindows (void)
|
428
|
491 {
|
|
492 DEFSUBR (Fmswindows_init_scrollbar_metrics);
|
|
493 }
|
|
494
|
|
495 void
|
617
|
496 vars_of_scrollbar_mswindows (void)
|
428
|
497 {
|
|
498 Fprovide (intern ("mswindows-scrollbars"));
|
|
499
|
617
|
500 staticpro (&Vmswindows_scrollbar_instance_table);
|
|
501 Vmswindows_scrollbar_instance_table =
|
|
502 make_lisp_hash_table (100, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
|
|
503 }
|