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