Mercurial > hg > xemacs-beta
comparison src/scrollbar-msw.c @ 5920:0f2338afbabf cygwin
Minimum necessary to get started:
sufficient to compile OK, run -nw, but not with window
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Mon, 21 Apr 2014 11:42:50 +0100 |
parents | 56144c8593a8 |
children |
comparison
equal
deleted
inserted
replaced
5919:2800105fcc9f | 5920:0f2338afbabf |
---|---|
79 GetScrollInfo (SCROLLBAR_MSW_HANDLE (sb), SB_CTL, | 79 GetScrollInfo (SCROLLBAR_MSW_HANDLE (sb), SB_CTL, |
80 &SCROLLBAR_MSW_INFO (sb)); | 80 &SCROLLBAR_MSW_INFO (sb)); |
81 ptr = make_opaque_ptr (SCROLLBAR_MSW_HANDLE (sb)); | 81 ptr = make_opaque_ptr (SCROLLBAR_MSW_HANDLE (sb)); |
82 Fputhash (ptr, wrap_scrollbar_instance (sb), | 82 Fputhash (ptr, wrap_scrollbar_instance (sb), |
83 Vmswindows_scrollbar_instance_table); | 83 Vmswindows_scrollbar_instance_table); |
84 qxeSetWindowLong (SCROLLBAR_MSW_HANDLE (sb), GWL_USERDATA, | 84 qxeSetWindowLongPtr (SCROLLBAR_MSW_HANDLE (sb), GWLP_USERDATA, |
85 (LONG) STORE_LISP_IN_VOID (ptr)); | 85 (LONG_PTR) STORE_LISP_IN_VOID (ptr)); |
86 } | 86 } |
87 | 87 |
88 static void | 88 static void |
89 mswindows_free_scrollbar_instance (struct scrollbar_instance *sb) | 89 mswindows_free_scrollbar_instance (struct scrollbar_instance *sb) |
90 { | 90 { |
91 if (sb->scrollbar_data) | 91 if (sb->scrollbar_data) |
92 { | 92 { |
93 void *opaque = | 93 LONG_PTR opaque = |
94 (void *) qxeGetWindowLong (SCROLLBAR_MSW_HANDLE (sb), GWL_USERDATA); | 94 qxeGetWindowLongPtr (SCROLLBAR_MSW_HANDLE (sb), GWLP_USERDATA); |
95 Lisp_Object ptr; | 95 Lisp_Object ptr; |
96 | 96 |
97 ptr = GET_LISP_FROM_VOID (opaque); | 97 ptr = GET_LISP_FROM_VOID (opaque); |
98 assert (OPAQUE_PTRP (ptr)); | 98 assert (OPAQUE_PTRP (ptr)); |
99 ptr = Fremhash (ptr, Vmswindows_scrollbar_instance_table); | 99 ptr = Fremhash (ptr, Vmswindows_scrollbar_instance_table); |
203 mswindows_handle_scrollbar_event (HWND hwnd, int code, int UNUSED (pos)) | 203 mswindows_handle_scrollbar_event (HWND hwnd, int code, int UNUSED (pos)) |
204 { | 204 { |
205 struct frame *f; | 205 struct frame *f; |
206 Lisp_Object win, frame; | 206 Lisp_Object win, frame; |
207 struct scrollbar_instance *sb = 0; | 207 struct scrollbar_instance *sb = 0; |
208 void *v; | 208 LONG_PTR v; |
209 SCROLLINFO scrollinfo; | 209 SCROLLINFO scrollinfo; |
210 int vert = qxeGetWindowLong (hwnd, GWL_STYLE) & SBS_VERT; | 210 int vert = qxeGetWindowLong (hwnd, GWL_STYLE) & SBS_VERT; |
211 int value; | 211 int value; |
212 | 212 |
213 v = (void *) qxeGetWindowLong (hwnd, GWL_USERDATA); | 213 v = qxeGetWindowLongPtr (hwnd, GWLP_USERDATA); |
214 if (!v) | 214 if (!v) |
215 { | 215 { |
216 /* apparently this can happen, as it was definitely necessary | 216 /* apparently this can happen, as it was definitely necessary |
217 to put the check in for sb below (VERTICAL_SCROLLBAR_DRAG_HACK) */ | 217 to put the check in for sb below (VERTICAL_SCROLLBAR_DRAG_HACK) */ |
218 frame = mswindows_find_frame (hwnd); | 218 frame = mswindows_find_frame (hwnd); |