Mercurial > hg > xemacs-beta
comparison src/event-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 | 68639fb08af8 |
comparison
equal
deleted
inserted
replaced
5919:2800105fcc9f | 5920:0f2338afbabf |
---|---|
1828 token = Fmake_symbol (name); | 1828 token = Fmake_symbol (name); |
1829 hsz = qxeDdeCreateStringHandle (mswindows_dde_mlid, | 1829 hsz = qxeDdeCreateStringHandle (mswindows_dde_mlid, |
1830 LISP_STRING_TO_TSTR (name), | 1830 LISP_STRING_TO_TSTR (name), |
1831 XEUNICODE_P ? CP_WINUNICODE : CP_WINANSI); | 1831 XEUNICODE_P ? CP_WINUNICODE : CP_WINANSI); |
1832 | 1832 |
1833 Fput(token, QHSZ, make_float ((int)hsz)); | 1833 Fput(token, QHSZ, make_float ((intptr_t)hsz)); |
1834 Vdde_advise_items = Fcons (token, Vdde_advise_items); | 1834 Vdde_advise_items = Fcons (token, Vdde_advise_items); |
1835 | 1835 |
1836 RETURN_UNGCPRO (token); | 1836 RETURN_UNGCPRO (token); |
1837 } | 1837 } |
1838 | 1838 |
1853 | 1853 |
1854 CHECK_SYMBOL (item); | 1854 CHECK_SYMBOL (item); |
1855 val = Fget (item, QHSZ, Qnil); | 1855 val = Fget (item, QHSZ, Qnil); |
1856 if (!FLOATP (val)) | 1856 if (!FLOATP (val)) |
1857 return Qnil; | 1857 return Qnil; |
1858 hsz = (HSZ)(int)XFLOAT_DATA (val); | 1858 hsz = (HSZ)(intptr_t)XFLOAT_DATA (val); |
1859 DdeFreeStringHandle (mswindows_dde_mlid, hsz); | 1859 DdeFreeStringHandle (mswindows_dde_mlid, hsz); |
1860 Vdde_advise_items = delq_no_quit (item, Vdde_advise_items); | 1860 Vdde_advise_items = delq_no_quit (item, Vdde_advise_items); |
1861 return Qnil; | 1861 return Qnil; |
1862 } | 1862 } |
1863 | 1863 |
1877 | 1877 |
1878 CHECK_SYMBOL (item); | 1878 CHECK_SYMBOL (item); |
1879 val = Fget (item, QHSZ, Qnil); | 1879 val = Fget (item, QHSZ, Qnil); |
1880 if (!FLOATP (val)) | 1880 if (!FLOATP (val)) |
1881 return Qnil; | 1881 return Qnil; |
1882 hsz = (HSZ)(int)XFLOAT_DATA (val); | 1882 hsz = (HSZ)(intptr_t)XFLOAT_DATA (val); |
1883 | 1883 |
1884 Fset (item, data); | 1884 Fset (item, data); |
1885 DdePostAdvise (mswindows_dde_mlid, mswindows_dde_topic_eval, hsz); | 1885 DdePostAdvise (mswindows_dde_mlid, mswindows_dde_topic_eval, hsz); |
1886 return Qnil; | 1886 return Qnil; |
1887 } | 1887 } |
1939 if (!SYMBOLP (elt)) | 1939 if (!SYMBOLP (elt)) |
1940 continue; | 1940 continue; |
1941 val = Fget (elt, QHSZ, Qnil); | 1941 val = Fget (elt, QHSZ, Qnil); |
1942 if (!FLOATP (val)) | 1942 if (!FLOATP (val)) |
1943 continue; | 1943 continue; |
1944 hsz = (HSZ) (int) XFLOAT_DATA (val); | 1944 hsz = (HSZ)(intptr_t) XFLOAT_DATA (val); |
1945 if (!DdeCmpStringHandles (hszItem, hsz)) | 1945 if (!DdeCmpStringHandles (hszItem, hsz)) |
1946 return (HDDEDATA) TRUE; | 1946 return (HDDEDATA) TRUE; |
1947 } | 1947 } |
1948 } | 1948 } |
1949 } | 1949 } |
2003 if (!SYMBOLP (elt)) | 2003 if (!SYMBOLP (elt)) |
2004 continue; | 2004 continue; |
2005 val = Fget (elt, QHSZ, Qnil); | 2005 val = Fget (elt, QHSZ, Qnil); |
2006 if (!FLOATP (val)) | 2006 if (!FLOATP (val)) |
2007 continue; | 2007 continue; |
2008 hsz = (HSZ) (int) XFLOAT_DATA (val); | 2008 hsz = (HSZ)(intptr_t) XFLOAT_DATA (val); |
2009 if (!DdeCmpStringHandles (hszItem, hsz)) | 2009 if (!DdeCmpStringHandles (hszItem, hsz)) |
2010 args[1] = Fsymbol_value (elt); | 2010 args[1] = Fsymbol_value (elt); |
2011 } | 2011 } |
2012 args[0] = build_ascstring ("%s"); | 2012 args[0] = build_ascstring ("%s"); |
2013 } | 2013 } |
2500 #ifdef DEBUG_XEMACS | 2500 #ifdef DEBUG_XEMACS |
2501 if (debug_mswindows_events) | 2501 if (debug_mswindows_events) |
2502 debug_output_mswin_message (hwnd, message_, wParam, lParam); | 2502 debug_output_mswin_message (hwnd, message_, wParam, lParam); |
2503 #endif /* DEBUG_XEMACS */ | 2503 #endif /* DEBUG_XEMACS */ |
2504 | 2504 |
2505 assert (!qxeGetWindowLong (hwnd, GWL_USERDATA)); | 2505 assert (!qxeGetWindowLongPtr (hwnd, GWLP_USERDATA)); |
2506 switch (message_) | 2506 switch (message_) |
2507 { | 2507 { |
2508 case WM_DESTROYCLIPBOARD: | 2508 case WM_DESTROYCLIPBOARD: |
2509 mswindows_handle_destroyclipboard (); | 2509 mswindows_handle_destroyclipboard (); |
2510 break; | 2510 break; |
3617 case WM_CTLCOLORSCROLLBAR: | 3617 case WM_CTLCOLORSCROLLBAR: |
3618 { | 3618 { |
3619 /* if we get an opportunity to paint a widget then do so if | 3619 /* if we get an opportunity to paint a widget then do so if |
3620 there is an appropriate face */ | 3620 there is an appropriate face */ |
3621 HWND crtlwnd = (HWND) lParam; | 3621 HWND crtlwnd = (HWND) lParam; |
3622 LONG ii = qxeGetWindowLong (crtlwnd, GWL_USERDATA); | 3622 LONG_PTR ii = qxeGetWindowLongPtr (crtlwnd, GWLP_USERDATA); |
3623 if (ii) | 3623 if (ii) |
3624 { | 3624 { |
3625 Lisp_Object image_instance; | 3625 Lisp_Object image_instance; |
3626 image_instance = GET_LISP_FROM_VOID ((void *) ii); | 3626 image_instance = GET_LISP_FROM_VOID ((void *) ii); |
3627 if (IMAGE_INSTANCEP (image_instance) | 3627 if (IMAGE_INSTANCEP (image_instance) |
4137 * Find the frame that matches the supplied mswindows window handle | 4137 * Find the frame that matches the supplied mswindows window handle |
4138 */ | 4138 */ |
4139 Lisp_Object | 4139 Lisp_Object |
4140 mswindows_find_frame (HWND hwnd) | 4140 mswindows_find_frame (HWND hwnd) |
4141 { | 4141 { |
4142 LONG l = qxeGetWindowLong (hwnd, XWL_FRAMEOBJ); | 4142 LONG_PTR l = qxeGetWindowLongPtr (hwnd, XWL_FRAMEOBJ); |
4143 Lisp_Object f; | 4143 Lisp_Object f; |
4144 if (l == 0) | 4144 if (l == 0) |
4145 { | 4145 { |
4146 /* We are in progress of frame creation. Return the frame | 4146 /* We are in progress of frame creation. Return the frame |
4147 being created, as it still not remembered in the window | 4147 being created, as it still not remembered in the window |
4148 extra storage. */ | 4148 extra storage. */ |
4149 assert (!NILP (Vmswindows_frame_being_created)); | 4149 assert (!NILP (Vmswindows_frame_being_created)); |
4150 return Vmswindows_frame_being_created; | 4150 return Vmswindows_frame_being_created; |
4151 } | 4151 } |
4152 f = GET_LISP_FROM_VOID ((void *) l); | 4152 f = GET_LISP_FROM_VOID ((intptr_t) l); |
4153 return f; | 4153 return f; |
4154 } | 4154 } |
4155 | 4155 |
4156 | 4156 |
4157 /************************************************************************/ | 4157 /************************************************************************/ |
4177 static int | 4177 static int |
4178 remove_timeout_mapper (Lisp_Object ev, void *data) | 4178 remove_timeout_mapper (Lisp_Object ev, void *data) |
4179 { | 4179 { |
4180 if (XEVENT_TYPE (ev) == timeout_event) | 4180 if (XEVENT_TYPE (ev) == timeout_event) |
4181 { | 4181 { |
4182 if ((int) data == XEVENT_TIMEOUT_INTERVAL_ID (ev)) | 4182 if ((intptr_t) data == XEVENT_TIMEOUT_INTERVAL_ID (ev)) |
4183 return 1; | 4183 return 1; |
4184 } | 4184 } |
4185 | 4185 |
4186 return 0; | 4186 return 0; |
4187 } | 4187 } |
4963 else | 4963 else |
4964 stderr_out ("%x", message_); | 4964 stderr_out ("%x", message_); |
4965 | 4965 |
4966 if (debug_mswindows_events > 1) | 4966 if (debug_mswindows_events > 1) |
4967 { | 4967 { |
4968 stderr_out (" wparam=%d lparam=%d hwnd=%x frame: ", | 4968 stderr_out (" wparam=%d lparam=%d hwnd=%p frame: ", |
4969 wParam, (int) lParam, (unsigned int) hwnd); | 4969 (int)wParam, (int) lParam, hwnd); |
4970 debug_print (frame); | 4970 debug_print (frame); |
4971 if (message_ == WM_WINDOWPOSCHANGED || | 4971 if (message_ == WM_WINDOWPOSCHANGED || |
4972 message_ == WM_WINDOWPOSCHANGING) | 4972 message_ == WM_WINDOWPOSCHANGING) |
4973 { | 4973 { |
4974 WINDOWPOS *wp = (WINDOWPOS *) lParam; | 4974 WINDOWPOS *wp = (WINDOWPOS *) lParam; |