aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2024-06-09 16:26:14 +0300
committerEli Zaretskii2024-06-09 16:26:14 +0300
commitb8e78d2657d124d97509726ce9a4e4efd01fd752 (patch)
tree8618b0cf772193619c2fb393a3fce0fe869cb831
parent5c8a8b7dd32d956abffbab501ea9316e2d4a57d1 (diff)
downloademacs-b8e78d2657d124d97509726ce9a4e4efd01fd752.tar.gz
emacs-b8e78d2657d124d97509726ce9a4e4efd01fd752.zip
Fix MS-Windows build broken by recent touch-screen changes
* src/w32term.c (TOUCHEVENTF_DOWN, TOUCHEVENTF_UP): (struct _TOUCHINPUT): Move before first use. (TOUCHEVENTF_MOVE, TOUCHEVENTMASKF_CONTACTAREA) (TOUCHEVENTMASKF_EXTRAINFO, TOUCHEVENTMASKF_TIMEFROMSYSTEM): Ifdef away unused macros. (w32_read_socket): Fix typo.
-rw-r--r--src/w32term.c58
1 files changed, 30 insertions, 28 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 74d73af727a..61185279cf9 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -120,43 +120,20 @@ BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
120/* PlgBlt is available since Windows 2000. */ 120/* PlgBlt is available since Windows 2000. */
121BOOL (WINAPI *pfnPlgBlt) (HDC, const POINT *, HDC, int, int, int, int, HBITMAP, int, int); 121BOOL (WINAPI *pfnPlgBlt) (HDC, const POINT *, HDC, int, int, int, int, HBITMAP, int, int);
122 122
123/* Functions that extract data from touch-screen events. */
124typedef BOOL (WINAPI * CloseTouchInputHandle_proc) (HANDLE);
125typedef BOOL (WINAPI * GetTouchInputInfo_proc) (HANDLE, UINT, PTOUCHINPUT, int);
126
127CloseTouchInputHandle_proc pfnCloseTouchInputHandle;
128GetTouchInputInfo_proc pfnGetTouchInputInfo;
129
130
131#ifndef LWA_ALPHA
132#define LWA_ALPHA 0x02
133#endif
134/* WS_EX_LAYERED is defined unconditionally by MingW, but only for W2K and
135 later targets by MSVC headers. */
136#ifndef WS_EX_LAYERED
137#define WS_EX_LAYERED 0x80000
138#endif
139
140/* SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN are not defined on 95 and
141 NT4. */
142#ifndef SM_CXVIRTUALSCREEN
143#define SM_CXVIRTUALSCREEN 78
144#endif
145#ifndef SM_CYVIRTUALSCREEN
146#define SM_CYVIRTUALSCREEN 79
147#endif
148
149/* Define required types and constants on systems with older headers 123/* Define required types and constants on systems with older headers
150 lest they be absent. */ 124 lest they be absent. */
151 125
152#if _WIN32_WINNT < 0x0601 126#if _WIN32_WINNT < 0x0601
153#define TOUCHEVENTF_DOWN 0x0001 127#define TOUCHEVENTF_DOWN 0x0001
154#define TOUCHEVENTF_MOVE 0x0002
155#define TOUCHEVENTF_UP 0x0004 128#define TOUCHEVENTF_UP 0x0004
156 129
130/* These are currently unused; prevent compiler warnings. */
131#if 0
132#define TOUCHEVENTF_MOVE 0x0002
157#define TOUCHEVENTMASKF_CONTACTAREA 0x0004 133#define TOUCHEVENTMASKF_CONTACTAREA 0x0004
158#define TOUCHEVENTMASKF_EXTRAINFO 0x0002 134#define TOUCHEVENTMASKF_EXTRAINFO 0x0002
159#define TOUCHEVENTMASKF_TIMEFROMSYSTEM 0x0001 135#define TOUCHEVENTMASKF_TIMEFROMSYSTEM 0x0001
136#endif /* 0 */
160 137
161#define WM_TOUCHMOVE 576 138#define WM_TOUCHMOVE 576
162 139
@@ -175,6 +152,31 @@ typedef struct _TOUCHINPUT
175} TOUCHINPUT, *PTOUCHINPUT; 152} TOUCHINPUT, *PTOUCHINPUT;
176#endif /* _WIN32_WINNT < 0x0601 */ 153#endif /* _WIN32_WINNT < 0x0601 */
177 154
155/* Functions that extract data from touch-screen events. */
156typedef BOOL (WINAPI * CloseTouchInputHandle_proc) (HANDLE);
157typedef BOOL (WINAPI * GetTouchInputInfo_proc) (HANDLE, UINT, PTOUCHINPUT, int);
158
159CloseTouchInputHandle_proc pfnCloseTouchInputHandle;
160GetTouchInputInfo_proc pfnGetTouchInputInfo;
161
162#ifndef LWA_ALPHA
163#define LWA_ALPHA 0x02
164#endif
165/* WS_EX_LAYERED is defined unconditionally by MingW, but only for W2K and
166 later targets by MSVC headers. */
167#ifndef WS_EX_LAYERED
168#define WS_EX_LAYERED 0x80000
169#endif
170
171/* SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN are not defined on 95 and
172 NT4. */
173#ifndef SM_CXVIRTUALSCREEN
174#define SM_CXVIRTUALSCREEN 78
175#endif
176#ifndef SM_CYVIRTUALSCREEN
177#define SM_CYVIRTUALSCREEN 79
178#endif
179
178/* The handle of the frame that currently owns the system caret. */ 180/* The handle of the frame that currently owns the system caret. */
179HWND w32_system_caret_hwnd; 181HWND w32_system_caret_hwnd;
180int w32_system_caret_height; 182int w32_system_caret_height;
@@ -6264,7 +6266,7 @@ w32_read_socket (struct terminal *terminal,
6264 } 6266 }
6265 } 6267 }
6266 6268
6267 (*CloseTouchInputHandle) ((HANDLE) msg.msg.lParam); 6269 (*pfnCloseTouchInputHandle) ((HANDLE) msg.msg.lParam);
6268 break; 6270 break;
6269 6271
6270 default: 6272 default: