ReactOS  0.4.13-dev-259-g5ca9c9c
input.c
Go to the documentation of this file.
1 /*
2  * ReactOS kernel
3  * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 /*
20  * PROJECT: ReactOS user32.dll
21  * FILE: win32ss/user/user32/windows/input.c
22  * PURPOSE: Input
23  * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
24  * UPDATE HISTORY:
25  * 09-05-2001 CSH Created
26  */
27 
28 #include <user32.h>
29 
30 #include <strsafe.h>
31 
33 
34 /*
35  * @implemented
36  */
37 BOOL
38 WINAPI
40  HWND hWnd,
41  POINT pt)
42 {
43  return NtUserDragDetect(hWnd, pt);
44 #if 0
45  MSG msg;
46  RECT rect;
47  POINT tmp;
50 
51  rect.left = pt.x - dx;
52  rect.right = pt.x + dx;
53  rect.top = pt.y - dy;
54  rect.bottom = pt.y + dy;
55 
57 
58  for (;;)
59  {
60  while (
63  )
64  {
65  if (msg.message == WM_LBUTTONUP)
66  {
68  return FALSE;
69  }
70  if (msg.message == WM_MOUSEMOVE)
71  {
72  tmp.x = LOWORD(msg.lParam);
73  tmp.y = HIWORD(msg.lParam);
74  if (!PtInRect(&rect, tmp))
75  {
77  return TRUE;
78  }
79  }
80  if (msg.message == WM_KEYDOWN)
81  {
82  if (msg.wParam == VK_ESCAPE)
83  {
85  return TRUE;
86  }
87  }
88  }
89  WaitMessage();
90  }
91  return 0;
92 #endif
93 }
94 
95 /*
96  * @implemented
97  */
100 {
102 }
103 
104 /*
105  * @implemented
106  */
107 SHORT
108 WINAPI
111 {
112  if (vKey < 0 || vKey > 256)
113  return 0;
114  return (SHORT)NtUserGetAsyncKeyState((DWORD)vKey);
115 }
116 
117 
118 /*
119  * @implemented
120  */
121 HKL WINAPI
123 {
124  return NtUserxGetKeyboardLayout(idThread);
125 }
126 
127 
128 /*
129  * @implemented
130  */
131 UINT WINAPI
133 {
134  return GetOEMCP();
135 }
136 
137 
138 /*
139  * @implemented
140  */
141 int WINAPI
143  LPSTR lpString,
144  int nSize)
145 {
146  LPWSTR pwszBuf;
147  UINT cchBuf = 0;
148  int iRet = 0;
149  BOOL defChar = FALSE;
150 
151  pwszBuf = HeapAlloc(GetProcessHeap(), 0, nSize * sizeof(WCHAR));
152  if (!pwszBuf)
153  return 0;
154 
155  cchBuf = NtUserGetKeyNameText(lParam, pwszBuf, nSize);
156 
157  iRet = WideCharToMultiByte(CP_ACP, 0,
158  pwszBuf, cchBuf,
159  lpString, nSize, ".", &defChar); // FIXME: do we need defChar?
160  lpString[iRet] = 0;
161  HeapFree(GetProcessHeap(), 0, pwszBuf);
162 
163  return iRet;
164 }
165 
166 /*
167  * @implemented
168  */
169 int WINAPI
171  LPWSTR lpString,
172  int nSize)
173 {
174  return NtUserGetKeyNameText(lParam, lpString, nSize);
175 }
176 
177 /*
178  * @implemented
179  */
180 SHORT
181 WINAPI
183 GetKeyState(int nVirtKey)
184 {
185  return (SHORT)NtUserGetKeyState((DWORD)nVirtKey);
186 }
187 
188 /*
189  * @implemented
190  */
191 BOOL WINAPI
193 {
195 
197  return FALSE;
198 
199  if (!WideCharToMultiByte(CP_ACP, 0, buf, -1, pwszKLID, KL_NAMELENGTH, NULL, NULL))
200  return FALSE;
201 
202  return TRUE;
203 }
204 
205 /*
206  * @implemented
207  */
208 BOOL WINAPI
210 {
211  return NtUserGetKeyboardLayoutName(pwszKLID);
212 }
213 
214 /*
215  * @implemented
216  */
217 int WINAPI
218 GetKeyboardType(int nTypeFlag)
219 {
220  return NtUserxGetKeyboardType(nTypeFlag);
221 }
222 
223 /*
224  * @implemented
225  */
226 BOOL WINAPI
228 {
229  TRACE("%p\n", plii);
230 
231  if (plii->cbSize != sizeof (*plii))
232  {
234  return FALSE;
235  }
236 
237  plii->dwTime = gpsi->dwLastRITEventTickCount;
238  return TRUE;
239 }
240 
241 /*
242  * @implemented
243  */
244 HKL WINAPI
246  UINT Flags)
247 {
248  WCHAR wszKLID[16];
249 
250  if (!MultiByteToWideChar(CP_ACP, 0, pszKLID, -1,
251  wszKLID, sizeof(wszKLID)/sizeof(wszKLID[0])))
252  {
253  return FALSE;
254  }
255 
256  return LoadKeyboardLayoutW(wszKLID, Flags);
257 }
258 
259 /*
260  * @implemented
261  */
262 HKL WINAPI
264  UINT Flags)
265 {
266  DWORD dwhkl, dwType, dwSize;
267  UNICODE_STRING ustrKbdName;
268  UNICODE_STRING ustrKLID;
269  WCHAR wszRegKey[256] = L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\";
270  WCHAR wszLayoutId[10], wszNewKLID[10];
271  HKEY hKey;
272 
273  /* LOWORD of dwhkl is Locale Identifier */
274  dwhkl = LOWORD(wcstoul(pwszKLID, NULL, 16));
275 
276  if (Flags & KLF_SUBSTITUTE_OK)
277  {
278  /* Check substitutes key */
279  if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Keyboard Layout\\Substitutes", 0,
280  KEY_READ, &hKey) == ERROR_SUCCESS)
281  {
282  dwSize = sizeof(wszNewKLID);
283  if (RegQueryValueExW(hKey, pwszKLID, NULL, &dwType, (LPBYTE)wszNewKLID, &dwSize) == ERROR_SUCCESS)
284  {
285  /* Use new KLID value */
286  pwszKLID = wszNewKLID;
287  }
288 
289  /* Close the key now */
290  RegCloseKey(hKey);
291  }
292  }
293 
294  /* Append KLID at the end of registry key */
295  StringCbCatW(wszRegKey, sizeof(wszRegKey), pwszKLID);
296 
297  /* Open layout registry key for read */
298  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRegKey, 0,
299  KEY_READ, &hKey) == ERROR_SUCCESS)
300  {
301  dwSize = sizeof(wszLayoutId);
302  if (RegQueryValueExW(hKey, L"Layout Id", NULL, &dwType, (LPBYTE)wszLayoutId, &dwSize) == ERROR_SUCCESS)
303  {
304  /* If Layout Id is specified, use this value | f000 as HIWORD */
305  /* FIXME: Microsoft Office expects this value to be something specific
306  * for Japanese and Korean Windows with an IME the value is 0xe001
307  * We should probably check to see if an IME exists and if so then
308  * set this word properly.
309  */
310  dwhkl |= (0xf000 | wcstol(wszLayoutId, NULL, 16)) << 16;
311  }
312 
313  /* Close the key now */
314  RegCloseKey(hKey);
315  }
316  else
317  {
318  ERR("Could not find keyboard layout %S.\n", pwszKLID);
319  return NULL;
320  }
321 
322  /* If Layout Id is not given HIWORD == LOWORD (for dwhkl) */
323  if (!HIWORD(dwhkl))
324  dwhkl |= dwhkl << 16;
325 
326  ZeroMemory(&ustrKbdName, sizeof(ustrKbdName));
327  RtlInitUnicodeString(&ustrKLID, pwszKLID);
328  return NtUserLoadKeyboardLayoutEx(NULL, 0, &ustrKbdName,
329  NULL, &ustrKLID,
330  dwhkl, Flags);
331 }
332 
333 /*
334  * @implemented
335  */
336 UINT WINAPI
338  UINT uMapType)
339 {
340  return MapVirtualKeyExA(uCode, uMapType, GetKeyboardLayout(0));
341 }
342 
343 /*
344  * @implemented
345  */
346 UINT WINAPI
348  UINT uMapType,
349  HKL dwhkl)
350 {
351  return MapVirtualKeyExW(uCode, uMapType, dwhkl);
352 }
353 
354 
355 /*
356  * @implemented
357  */
358 UINT WINAPI
360  UINT uMapType,
361  HKL dwhkl)
362 {
363  return NtUserMapVirtualKeyEx(uCode, uMapType, 0, dwhkl);
364 }
365 
366 
367 /*
368  * @implemented
369  */
370 UINT WINAPI
372  UINT uMapType)
373 {
374  return MapVirtualKeyExW(uCode, uMapType, GetKeyboardLayout(0));
375 }
376 
377 
378 /*
379  * @implemented
380  */
382 OemKeyScan(WORD wOemChar)
383 {
384  WCHAR p;
385  SHORT Vk;
386  UINT Scan;
387 
388  MultiByteToWideChar(CP_OEMCP, 0, (PCSTR)&wOemChar, 1, &p, 1);
389  Vk = VkKeyScanW(p);
390  Scan = MapVirtualKeyW((Vk & 0x00ff), 0);
391  if (!Scan) return -1;
392  /*
393  Page 450-1, MS W2k SuperBible by SAMS. Return, low word has the
394  scan code and high word has the shift state.
395  */
396  return ((Vk & 0xff00) << 8) | Scan;
397 }
398 
399 
400 /*
401  * @implemented
402  */
403 BOOL WINAPI
405 {
407  uInterval,
408  NULL,
409  0);
410 }
411 
412 
413 /*
414  * @implemented
415  */
416 BOOL
417 WINAPI
419  BOOL fSwap)
420 {
421  return NtUserxSwapMouseButton(fSwap);
422 }
423 
424 
425 /*
426  * @implemented
427  */
428 int WINAPI
429 ToAscii(UINT uVirtKey,
430  UINT uScanCode,
431  CONST BYTE *lpKeyState,
432  LPWORD lpChar,
433  UINT uFlags)
434 {
435  return ToAsciiEx(uVirtKey, uScanCode, lpKeyState, lpChar, uFlags, 0);
436 }
437 
438 
439 /*
440  * @implemented
441  */
442 int WINAPI
443 ToAsciiEx(UINT uVirtKey,
444  UINT uScanCode,
445  CONST BYTE *lpKeyState,
446  LPWORD lpChar,
447  UINT uFlags,
448  HKL dwhkl)
449 {
450  WCHAR UniChars[2];
451  int Ret, CharCount;
452 
453  Ret = ToUnicodeEx(uVirtKey, uScanCode, lpKeyState, UniChars, 2, uFlags, dwhkl);
454  CharCount = (Ret < 0 ? 1 : Ret);
455  WideCharToMultiByte(CP_ACP, 0, UniChars, CharCount, (LPSTR)lpChar, 2, NULL, NULL);
456 
457  return Ret;
458 }
459 
460 
461 /*
462  * @implemented
463  */
464 int WINAPI
465 ToUnicode(UINT wVirtKey,
466  UINT wScanCode,
467  CONST BYTE *lpKeyState,
468  LPWSTR pwszBuff,
469  int cchBuff,
470  UINT wFlags)
471 {
472  return ToUnicodeEx(wVirtKey, wScanCode, lpKeyState, pwszBuff, cchBuff,
473  wFlags, 0);
474 }
475 
476 
477 /*
478  * @implemented
479  */
480 int WINAPI
481 ToUnicodeEx(UINT wVirtKey,
482  UINT wScanCode,
483  CONST BYTE *lpKeyState,
484  LPWSTR pwszBuff,
485  int cchBuff,
486  UINT wFlags,
487  HKL dwhkl)
488 {
489  return NtUserToUnicodeEx(wVirtKey, wScanCode, (PBYTE)lpKeyState, pwszBuff, cchBuff,
490  wFlags, dwhkl);
491 }
492 
493 
494 
495 /*
496  * @implemented
497  */
500 {
501  WCHAR wChar;
502 
503  if (IsDBCSLeadByte(ch))
504  return -1;
505 
506  MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wChar, 1);
507  return VkKeyScanW(wChar);
508 }
509 
510 
511 /*
512  * @implemented
513  */
516  HKL dwhkl)
517 {
518  WCHAR wChar;
519 
520  if (IsDBCSLeadByte(ch))
521  return -1;
522 
523  MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wChar, 1);
524  return VkKeyScanExW(wChar, dwhkl);
525 }
526 
527 
528 /*
529  * @implemented
530  */
533  HKL dwhkl)
534 {
535  return (SHORT)NtUserVkKeyScanEx(ch, dwhkl, TRUE);
536 }
537 
538 
539 /*
540  * @implemented
541  */
544 {
545  return (SHORT)NtUserVkKeyScanEx(ch, 0, FALSE);
546 }
547 
548 
549 /*
550  * @implemented
551  */
552 VOID
553 WINAPI
555  BYTE bVk,
556  BYTE bScan,
557  DWORD dwFlags,
558  ULONG_PTR dwExtraInfo)
559 {
560  INPUT Input;
561 
562  Input.type = INPUT_KEYBOARD;
563  Input.ki.wVk = bVk;
564  Input.ki.wScan = bScan;
565  Input.ki.dwFlags = dwFlags;
566  Input.ki.time = 0;
567  Input.ki.dwExtraInfo = dwExtraInfo;
568 
569  NtUserSendInput(1, &Input, sizeof(INPUT));
570 }
571 
572 
573 /*
574  * @implemented
575  */
576 VOID
577 WINAPI
579  DWORD dwFlags,
580  DWORD dx,
581  DWORD dy,
582  DWORD dwData,
583  ULONG_PTR dwExtraInfo)
584 {
585  INPUT Input;
586 
587  Input.type = INPUT_MOUSE;
588  Input.mi.dx = dx;
589  Input.mi.dy = dy;
590  Input.mi.mouseData = dwData;
591  Input.mi.dwFlags = dwFlags;
592  Input.mi.time = 0;
593  Input.mi.dwExtraInfo = dwExtraInfo;
594 
595  NtUserSendInput(1, &Input, sizeof(INPUT));
596 }
597 
598 /* EOF */
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
BOOL WINAPI DragDetect(HWND hWnd, POINT pt)
Definition: input.c:39
UINT WINAPI MapVirtualKeyExW(UINT uCode, UINT uMapType, HKL dwhkl)
Definition: input.c:359
#define TRUE
Definition: types.h:120
#define KL_NAMELENGTH
Definition: winuser.h:122
HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags)
Definition: input.c:263
UINT WINAPI MapVirtualKeyExA(UINT uCode, UINT uMapType, HKL dwhkl)
Definition: input.c:347
#define WM_MOUSEFIRST
Definition: winuser.h:1750
long y
Definition: polytest.cpp:48
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WideCharToMultiByte
Definition: compat.h:101
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
UINT WINAPI GetKBCodePage(VOID)
Definition: input.c:132
int WINAPI ToAscii(UINT uVirtKey, UINT uScanCode, CONST BYTE *lpKeyState, LPWORD lpChar, UINT uFlags)
Definition: input.c:429
long x
Definition: polytest.cpp:48
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define KEY_READ
Definition: nt_native.h:1023
SHORT WINAPI VkKeyScanExA(CHAR ch, HKL dwhkl)
Definition: input.c:515
#define pt(x, y)
Definition: drawing.c:79
#define CP_ACP
Definition: compat.h:99
#define HKEY_CURRENT_USER
Definition: winreg.h:11
BOOL WINAPI WaitMessage(void)
Definition: ntwrapper.h:350
GLint dy
Definition: linetemp.h:97
char CHAR
Definition: xmlstorage.h:175
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2024
HWND hWnd
Definition: settings.c:17
Definition: arc.h:84
int WINAPI GetKeyboardType(int nTypeFlag)
Definition: input.c:218
static HANDLE ULONG_PTR dwData
Definition: file.c:35
#define ZeroMemory
Definition: winbase.h:1635
DWORD WINAPI OemKeyScan(WORD wOemChar)
Definition: input.c:382
SHORT WINAPI VkKeyScanW(WCHAR ch)
Definition: input.c:543
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
UINT uFlags
Definition: api.c:60
char * LPSTR
Definition: xmlstorage.h:182
#define VK_ESCAPE
Definition: winuser.h:2168
PSERVERINFO gpsi
Definition: main.c:27
VOID WINAPI mouse_event(DWORD dwFlags, DWORD dx, DWORD dy, DWORD dwData, ULONG_PTR dwExtraInfo)
Definition: input.c:578
BOOL WINAPI SetDoubleClickTime(UINT uInterval)
Definition: input.c:404
& rect
Definition: startmenu.cpp:1413
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:342
uint32_t ULONG_PTR
Definition: typedefs.h:63
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
HKL WINAPI GetKeyboardLayout(DWORD idThread)
Definition: input.c:122
#define INPUT_KEYBOARD
Definition: winable.h:10
#define WM_KEYFIRST
Definition: winuser.h:1690
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
EXTINLINE BOOL NtUserxEnableWindow(HWND hWnd, BOOL bEnable)
Definition: ntwrapper.h:681
int WINAPI ToUnicode(UINT wVirtKey, UINT wScanCode, CONST BYTE *lpKeyState, LPWSTR pwszBuff, int cchBuff, UINT wFlags)
Definition: input.c:465
EXTINLINE HKL NtUserxGetKeyboardLayout(DWORD idThread)
Definition: ntwrapper.h:626
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
short SHORT
Definition: pedump.c:59
SHORT NTAPI NtUserGetKeyState(INT VirtKey)
Definition: msgqueue.c:2573
SHORT WINAPI VkKeyScanA(CHAR ch)
Definition: input.c:499
EXTINLINE INT NtUserxGetKeyboardType(INT nTypeFlag)
Definition: ntwrapper.h:631
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SwapMouseButton(BOOL fSwap)
Definition: input.c:418
BOOL WINAPI IsDBCSLeadByte(BYTE TestByte)
Definition: nls.c:2221
#define WM_KEYDOWN
Definition: winuser.h:1691
SHORT WINAPI DECLSPEC_HOTPATCH GetKeyState(int nVirtKey)
Definition: input.c:183
#define SM_CXDRAG
Definition: winuser.h:1018
const char * LPCSTR
Definition: xmlstorage.h:183
UINT APIENTRY NtUserSendInput(UINT nInputs, LPINPUT pInput, INT cbSize)
Definition: input.c:707
BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID)
Definition: input.c:192
int WINAPI GetKeyNameTextW(LONG lParam, LPWSTR lpString, int nSize)
Definition: input.c:170
#define KLF_SUBSTITUTE_OK
Definition: winuser.h:112
#define DECLSPEC_HOTPATCH
Definition: _mingw.h:224
#define INPUT_MOUSE
Definition: winable.h:9
int WINAPI GetKeyNameTextA(LONG lParam, LPSTR lpString, int nSize)
Definition: input.c:142
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
BOOL WINAPI EnableWindow(HWND hWnd, BOOL bEnable)
Definition: input.c:99
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_MOUSELAST
Definition: winuser.h:1777
#define WINAPI
Definition: msvc.h:8
BOOL WINAPI GetKeyboardLayoutNameW(LPWSTR pwszKLID)
Definition: input.c:209
BOOL bScan
Definition: wlanconf.c:24
unsigned short WORD
Definition: ntddk_ex.h:93
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WM_KEYLAST
Definition: winuser.h:1704
#define SetLastError(x)
Definition: compat.h:409
UINT NTAPI NtUserMapVirtualKeyEx(UINT keyCode, UINT transType, DWORD keyboardId, HKL dwhkl)
Definition: keyboard.c:1290
HKL NTAPI NtUserLoadKeyboardLayoutEx(IN HANDLE Handle, IN DWORD offTable, IN PUNICODE_STRING puszKeyboardName, IN HKL hKL, IN PUNICODE_STRING puszKLID, IN DWORD dwKLID, IN UINT Flags)
Definition: kbdlayout.c:596
DWORD NTAPI NtUserVkKeyScanEx(WCHAR wChar, HKL KeyboardLayout, BOOL bUsehHK)
Definition: keyboard.c:1541
SHORT WINAPI VkKeyScanExW(WCHAR ch, HKL dwhkl)
Definition: input.c:532
static const WCHAR L[]
Definition: oid.c:1250
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
BOOL NTAPI NtUserGetKeyboardLayoutName(LPWSTR lpszName)
Definition: kbdlayout.c:557
unsigned char BYTE
Definition: mem.h:68
UINT_PTR HKL
Definition: msctf.idl:101
int WINAPI ToUnicodeEx(UINT wVirtKey, UINT wScanCode, CONST BYTE *lpKeyState, LPWSTR pwszBuff, int cchBuff, UINT wFlags, HKL dwhkl)
Definition: input.c:481
#define SPI_SETDOUBLECLICKTIME
Definition: winuser.h:1363
WINE_DEFAULT_DEBUG_CHANNEL(user32)
uint16_t * LPWORD
Definition: typedefs.h:54
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define ERR(fmt,...)
Definition: debug.h:109
HWND WINAPI SetCapture(_In_ HWND hWnd)
_In_ BOOL bEnable
Definition: winddi.h:3426
BOOL NTAPI NtUserSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
Definition: sysparams.c:2129
#define WM_LBUTTONUP
Definition: winuser.h:1753
EXTINLINE BOOL NtUserxSwapMouseButton(BOOL fSwap)
Definition: ntwrapper.h:596
unsigned int UINT
Definition: ndis.h:50
#define WM_MOUSEMOVE
Definition: winuser.h:1751
SHORT NTAPI NtUserGetAsyncKeyState(INT Key)
Definition: keyboard.c:632
GLint dx
Definition: linetemp.h:97
#define MultiByteToWideChar
Definition: compat.h:100
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
INT NTAPI NtUserToUnicodeEx(UINT wVirtKey, UINT wScanCode, PBYTE lpKeyState, LPWSTR pwszBuff, int cchBuff, UINT wFlags, HKL dwhkl)
#define SM_CYDRAG
Definition: winuser.h:1019
const char * PCSTR
Definition: typedefs.h:51
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1182
UINT WINAPI MapVirtualKeyA(UINT uCode, UINT uMapType)
Definition: input.c:337
GLfloat GLfloat p
Definition: glext.h:8902
BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
Definition: input.c:227
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HKL WINAPI LoadKeyboardLayoutA(LPCSTR pszKLID, UINT Flags)
Definition: input.c:245
UINT WINAPI MapVirtualKeyW(UINT uCode, UINT uMapType)
Definition: input.c:371
int WINAPI ToAsciiEx(UINT uVirtKey, UINT uScanCode, CONST BYTE *lpKeyState, LPWORD lpChar, UINT uFlags, HKL dwhkl)
Definition: input.c:443
BYTE * PBYTE
Definition: pedump.c:66
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define CP_OEMCP
Definition: winnls.h:228
#define HeapFree(x, y, z)
Definition: compat.h:394
#define CONST
Definition: pedump.c:81
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
BOOL NTAPI NtUserDragDetect(HWND hWnd, POINT pt)
Definition: message.c:1993
VOID WINAPI keybd_event(BYTE bVk, BYTE bScan, DWORD dwFlags, ULONG_PTR dwExtraInfo)
Definition: input.c:554
SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState(int vKey)
Definition: input.c:110
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
DWORD NTAPI NtUserGetKeyNameText(LONG lParam, LPWSTR lpString, int nSize)
Definition: keyboard.c:1416
UINT WINAPI GetOEMCP(VOID)
Definition: nls.c:2184