ReactOS 0.4.15-dev-8096-ga0eec98
keyboard.c
Go to the documentation of this file.
1/* DirectInput Keyboard device
2 *
3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998,1999 Lionel Ulmer
5 * Copyright 2000-2001 TransGaming Technologies Inc.
6 * Copyright 2005 Raphael Junqueira
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#include "config.h"
24#include "wine/port.h"
25
26#include <stdarg.h>
27#include <string.h>
28#include "windef.h"
29#include "winbase.h"
30#include "winuser.h"
31#include "winerror.h"
32#include "dinput.h"
33
34#include "dinput_private.h"
35#include "device_private.h"
36#include "wine/debug.h"
37#include "wine/unicode.h"
38
40
41#define WINE_DINPUT_KEYBOARD_MAX_KEYS 256
42
43static const IDirectInputDevice8AVtbl SysKeyboardAvt;
44static const IDirectInputDevice8WVtbl SysKeyboardWvt;
45
48{
52};
53
54static inline SysKeyboardImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface)
55{
57}
58static inline SysKeyboardImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W *iface)
59{
61}
62static inline IDirectInputDevice8A *IDirectInputDevice8A_from_impl(SysKeyboardImpl *This)
63{
64 return &This->base.IDirectInputDevice8A_iface;
65}
66static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysKeyboardImpl *This)
67{
68 return &This->base.IDirectInputDevice8W_iface;
69}
70
71static BYTE map_dik_code(DWORD scanCode, DWORD vkCode, DWORD subType)
72{
73 if (!scanCode)
74 scanCode = MapVirtualKeyW(vkCode, MAPVK_VK_TO_VSC);
75
76 if (subType == DIDEVTYPEKEYBOARD_JAPAN106)
77 {
78 switch (scanCode)
79 {
80 case 0x0d: /* ^ */
81 scanCode = DIK_CIRCUMFLEX;
82 break;
83 case 0x1a: /* @ */
84 scanCode = DIK_AT;
85 break;
86 case 0x1b: /* [ */
87 scanCode = DIK_LBRACKET;
88 break;
89 case 0x28: /* : */
90 scanCode = DIK_COLON;
91 break;
92 case 0x29: /* Hankaku/Zenkaku */
93 scanCode = DIK_KANJI;
94 break;
95 case 0x2b: /* ] */
96 scanCode = DIK_RBRACKET;
97 break;
98 case 0x73: /* \ */
99 scanCode = DIK_BACKSLASH;
100 break;
101 }
102 }
103 return scanCode;
104}
105
107{
109 int dik_code, ret = This->base.dwCoopLevel & DISCL_EXCLUSIVE;
111 BYTE new_diks;
112
113 if (wparam != WM_KEYDOWN && wparam != WM_KEYUP &&
115 return 0;
116
117 TRACE("(%p) wp %08lx, lp %08lx, vk %02x, scan %02x\n",
118 iface, wparam, lparam, hook->vkCode, hook->scanCode);
119
120 switch (hook->vkCode)
121 {
122 /* R-Shift is special - it is an extended key with separate scan code */
123 case VK_RSHIFT : dik_code = DIK_RSHIFT; break;
124 case VK_PAUSE : dik_code = DIK_PAUSE; break;
125 case VK_NUMLOCK : dik_code = DIK_NUMLOCK; break;
126 case VK_SUBTRACT: dik_code = DIK_SUBTRACT; break;
127 default:
128 dik_code = map_dik_code(hook->scanCode & 0xff, hook->vkCode, This->subtype);
129 if (hook->flags & LLKHF_EXTENDED) dik_code |= 0x80;
130 }
131 new_diks = hook->flags & LLKHF_UP ? 0 : 0x80;
132
133 /* returns now if key event already known */
134 if (new_diks == This->DInputKeyState[dik_code])
135 return ret;
136
137 This->DInputKeyState[dik_code] = new_diks;
138 TRACE(" setting %02X to %02X\n", dik_code, This->DInputKeyState[dik_code]);
139
140 EnterCriticalSection(&This->base.crit);
142 new_diks, GetCurrentTime(), This->base.dinput->evsequence++);
143 LeaveCriticalSection(&This->base.crit);
144
145 return ret;
146}
147
149{
150 DWORD kbd_type, kbd_subtype, dev_subtype;
151 kbd_type = GetKeyboardType(0);
152 kbd_subtype = GetKeyboardType(1);
153
154 if (kbd_type == 4 || (kbd_type == 7 && kbd_subtype == 0))
155 dev_subtype = DIDEVTYPEKEYBOARD_PCENH;
156 else if (kbd_type == 7 && kbd_subtype == 2)
157 dev_subtype = DIDEVTYPEKEYBOARD_JAPAN106;
158 else {
159 FIXME("Unknown keyboard type=%u, subtype=%u\n", kbd_type, kbd_subtype);
160 dev_subtype = DIDEVTYPEKEYBOARD_PCENH;
161 }
162 return dev_subtype;
163}
164
168
169 dwSize = lpddi->dwSize;
170
171 TRACE("%d %p\n", dwSize, lpddi);
172
173 memset(lpddi, 0, dwSize);
174 memset(&ddi, 0, sizeof(ddi));
175
176 ddi.dwSize = dwSize;
177 ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */
178 ddi.guidProduct = GUID_SysKeyboard;
179 if (version >= 0x0800)
180 ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (subtype << 8);
181 else
182 ddi.dwDevType = DIDEVTYPE_KEYBOARD | (subtype << 8);
183 strcpy(ddi.tszInstanceName, "Keyboard");
184 strcpy(ddi.tszProductName, "Wine Keyboard");
185
186 memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
187}
188
192
193 dwSize = lpddi->dwSize;
194
195 TRACE("%d %p\n", dwSize, lpddi);
196
197 memset(lpddi, 0, dwSize);
198 memset(&ddi, 0, sizeof(ddi));
199
200 ddi.dwSize = dwSize;
201 ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */
202 ddi.guidProduct = GUID_SysKeyboard;
203 if (version >= 0x0800)
204 ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (subtype << 8);
205 else
206 ddi.dwDevType = DIDEVTYPE_KEYBOARD | (subtype << 8);
207 MultiByteToWideChar(CP_ACP, 0, "Keyboard", -1, ddi.tszInstanceName, MAX_PATH);
208 MultiByteToWideChar(CP_ACP, 0, "Wine Keyboard", -1, ddi.tszProductName, MAX_PATH);
209
210 memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
211}
212
214{
215 if (id != 0)
216 return E_FAIL;
217
219 return S_FALSE;
220
221 if ((dwDevType == 0) ||
222 ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) ||
223 (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) {
224 TRACE("Enumerating the Keyboard device\n");
225
227
228 return S_OK;
229 }
230
231 return S_FALSE;
232}
233
235{
236 if (id != 0)
237 return E_FAIL;
238
240 return S_FALSE;
241
242 if ((dwDevType == 0) ||
243 ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) ||
244 (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) {
245 TRACE("Enumerating the Keyboard device\n");
246
248
249 return S_OK;
250 }
251
252 return S_FALSE;
253}
254
256{
257 SysKeyboardImpl* newDevice;
258 LPDIDATAFORMAT df = NULL;
259 int i, idx = 0;
260
262 newDevice->base.IDirectInputDevice8A_iface.lpVtbl = &SysKeyboardAvt;
263 newDevice->base.IDirectInputDevice8W_iface.lpVtbl = &SysKeyboardWvt;
264 newDevice->base.ref = 1;
265 memcpy(&newDevice->base.guid, rguid, sizeof(*rguid));
266 newDevice->base.dinput = dinput;
267 newDevice->base.event_proc = KeyboardCallback;
268 InitializeCriticalSection(&newDevice->base.crit);
269 newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit");
270 newDevice->subtype = get_keyboard_subtype();
271
272 /* Create copy of default data format */
273 if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed;
275 if (!(df->rgodf = HeapAlloc(GetProcessHeap(), 0, df->dwNumObjs * df->dwObjSize))) goto failed;
276
277 for (i = 0; i < df->dwNumObjs; i++)
278 {
279 char buf[MAX_PATH];
280 BYTE dik_code;
281
282 if (!GetKeyNameTextA(((i & 0x7f) << 16) | ((i & 0x80) << 17), buf, sizeof(buf)))
283 continue;
284
285 dik_code = map_dik_code(i, 0, newDevice->subtype);
286 memcpy(&df->rgodf[idx], &c_dfDIKeyboard.rgodf[dik_code], df->dwObjSize);
288 }
289 df->dwNumObjs = idx;
290
291 newDevice->base.data_format.wine_df = df;
292 IDirectInput_AddRef(&newDevice->base.dinput->IDirectInput7A_iface);
293
295 list_add_tail(&dinput->devices_list, &newDevice->base.entry);
297
298 return newDevice;
299
300failed:
301 if (df) HeapFree(GetProcessHeap(), 0, df->rgodf);
302 HeapFree(GetProcessHeap(), 0, df);
303 HeapFree(GetProcessHeap(), 0, newDevice);
304 return NULL;
305}
306
307
309{
310 TRACE("%p %s %s %p %i\n", dinput, debugstr_guid(rguid), debugstr_guid(riid), pdev, unicode);
311 *pdev = NULL;
312
313 if (IsEqualGUID(&GUID_SysKeyboard, rguid)) /* Wine Keyboard */
314 {
316
317 if (riid == NULL)
318 ;/* nothing */
319 else if (IsEqualGUID(&IID_IDirectInputDeviceA, riid) ||
320 IsEqualGUID(&IID_IDirectInputDevice2A, riid) ||
321 IsEqualGUID(&IID_IDirectInputDevice7A, riid) ||
322 IsEqualGUID(&IID_IDirectInputDevice8A, riid))
323 {
324 unicode = 0;
325 }
326 else if (IsEqualGUID(&IID_IDirectInputDeviceW, riid) ||
327 IsEqualGUID(&IID_IDirectInputDevice2W, riid) ||
328 IsEqualGUID(&IID_IDirectInputDevice7W, riid) ||
329 IsEqualGUID(&IID_IDirectInputDevice8W, riid))
330 {
331 unicode = 1;
332 }
333 else
334 {
335 WARN("no interface\n");
336 return DIERR_NOINTERFACE;
337 }
338
339 This = alloc_device(rguid, dinput);
340 TRACE("Created a Keyboard device (%p)\n", This);
341
342 if (!This) return DIERR_OUTOFMEMORY;
343
344 if (unicode)
345 *pdev = &This->base.IDirectInputDevice8W_iface;
346 else
347 *pdev = &This->base.IDirectInputDevice8A_iface;
348
349 return DI_OK;
350 }
351
352 return DIERR_DEVICENOTREG;
353}
354
356 "Wine keyboard driver",
360};
361
363{
365 TRACE("(%p)->(%d,%p)\n", This, len, ptr);
366
367 if (!This->base.acquired) return DIERR_NOTACQUIRED;
368
369 if (len != This->base.data_format.user_df->dwDataSize )
370 return DIERR_INVALIDPARAM;
371
373
374 EnterCriticalSection(&This->base.crit);
375
376 if (TRACE_ON(dinput)) {
377 int i;
378 for (i = 0; i < WINE_DINPUT_KEYBOARD_MAX_KEYS; i++) {
379 if (This->DInputKeyState[i] != 0x00)
380 TRACE(" - %02X: %02x\n", i, This->DInputKeyState[i]);
381 }
382 }
383
384 fill_DataFormat(ptr, len, This->DInputKeyState, &This->base.data_format);
385 LeaveCriticalSection(&This->base.crit);
386
387 return DI_OK;
388}
389
391{
394}
395
396/******************************************************************************
397 * GetCapabilities : get the device capabilities
398 */
400{
402 DIDEVCAPS devcaps;
403
404 TRACE("(this=%p,%p)\n",This,lpDIDevCaps);
405
406 if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) {
407 WARN("invalid parameter\n");
408 return DIERR_INVALIDPARAM;
409 }
410
411 devcaps.dwSize = lpDIDevCaps->dwSize;
413 if (This->base.dinput->dwVersion >= 0x0800)
414 devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (This->subtype << 8);
415 else
416 devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (This->subtype << 8);
417 devcaps.dwAxes = 0;
418 devcaps.dwButtons = This->base.data_format.wine_df->dwNumObjs;
419 devcaps.dwPOVs = 0;
420 devcaps.dwFFSamplePeriod = 0;
421 devcaps.dwFFMinTimeResolution = 0;
422 devcaps.dwFirmwareRevision = 100;
423 devcaps.dwHardwareRevision = 100;
424 devcaps.dwFFDriverVersion = 0;
425
426 memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize);
427
428 return DI_OK;
429}
430
432{
435}
436
437static DWORD map_dik_to_scan(DWORD dik_code, DWORD subtype)
438{
439 if (dik_code == DIK_PAUSE || dik_code == DIK_NUMLOCK) dik_code ^= 0x80;
440 if (subtype == DIDEVTYPEKEYBOARD_JAPAN106)
441 {
442 switch (dik_code)
443 {
444 case DIK_CIRCUMFLEX:
445 dik_code = 0x0d;
446 break;
447 case DIK_AT:
448 dik_code = 0x1a;
449 break;
450 case DIK_LBRACKET:
451 dik_code = 0x1b;
452 break;
453 case DIK_COLON:
454 dik_code = 0x28;
455 break;
456 case DIK_KANJI:
457 dik_code = 0x29;
458 break;
459 case DIK_RBRACKET:
460 dik_code = 0x2b;
461 break;
462 case DIK_BACKSLASH:
463 dik_code = 0x73;
464 break;
465 }
466 }
467
468 return dik_code;
469}
470
471/******************************************************************************
472 * GetObjectInfo : get information about a device object such as a button
473 * or axis
474 */
475static HRESULT WINAPI
479 DWORD dwObj,
480 DWORD dwHow)
481{
483 HRESULT res;
484 LONG scan;
485
486 res = IDirectInputDevice2AImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
487 if (res != DI_OK) return res;
488
489 scan = map_dik_to_scan(DIDFT_GETINSTANCE(pdidoi->dwType), This->subtype);
490 if (!GetKeyNameTextA((scan & 0x80) << 17 | (scan & 0x7f) << 16,
491 pdidoi->tszName, sizeof(pdidoi->tszName)))
493
494 _dump_OBJECTINSTANCEA(pdidoi);
495 return res;
496}
497
500 DWORD dwObj,
501 DWORD dwHow)
502{
504 HRESULT res;
505 LONG scan;
506
507 res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
508 if (res != DI_OK) return res;
509
510 scan = map_dik_to_scan(DIDFT_GETINSTANCE(pdidoi->dwType), This->subtype);
511 if (!GetKeyNameTextW((scan & 0x80) << 17 | (scan & 0x7f) << 16,
512 pdidoi->tszName, ARRAY_SIZE(pdidoi->tszName)))
514
515 _dump_OBJECTINSTANCEW(pdidoi);
516 return res;
517}
518
519/******************************************************************************
520 * GetDeviceInfo : get information about a device's identity
521 */
525{
527 TRACE("(this=%p,%p)\n", This, pdidi);
528
529 fill_keyboard_dideviceinstanceA(pdidi, This->base.dinput->dwVersion, This->subtype);
530
531 return DI_OK;
532}
533
535{
537 TRACE("(this=%p,%p)\n", This, pdidi);
538
539 if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEW)) {
540 WARN(" dinput3 not supported yet...\n");
541 return DI_OK;
542 }
543
544 fill_keyboard_dideviceinstanceW(pdidi, This->base.dinput->dwVersion, This->subtype);
545
546 return DI_OK;
547}
548
549/******************************************************************************
550 * GetProperty : Retrieves information about the input device.
551 */
553 REFGUID rguid, LPDIPROPHEADER pdiph)
554{
556
557 TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(rguid), pdiph);
558 _dump_DIPROPHEADER(pdiph);
559
560 if (!IS_DIPROP(rguid)) return DI_OK;
561
562 switch (LOWORD(rguid))
563 {
565 {
566 HRESULT hr;
567 LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
569
570 if (pdiph->dwSize != sizeof(DIPROPSTRING))
571 return DIERR_INVALIDPARAM;
572
573 didoi.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW);
574
575 hr = SysKeyboardWImpl_GetObjectInfo(iface, &didoi, ps->diph.dwObj, ps->diph.dwHow);
576 if (hr == DI_OK)
577 memcpy(ps->wsz, didoi.tszName, sizeof(ps->wsz));
578 return hr;
579 }
580 case (DWORD_PTR) DIPROP_RANGE:
581 return DIERR_UNSUPPORTED;
582 default:
584 }
585 return DI_OK;
586}
587
589 REFGUID rguid, LPDIPROPHEADER pdiph)
590{
593}
594
596{
598 HRESULT res;
599
600 TRACE("(%p)\n", This);
601
603 if (res == DI_OK)
604 {
605 TRACE("clearing keystate\n");
606 memset(This->DInputKeyState, 0, sizeof(This->DInputKeyState));
607 }
608
609 return res;
610}
611
613{
616}
617
619 LPDIACTIONFORMATW lpdiaf,
620 LPCWSTR lpszUserName,
622{
624 FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", This, lpdiaf, debugstr_w(lpszUserName), dwFlags);
625
626 return _build_action_map(iface, lpdiaf, lpszUserName, dwFlags, DIKEYBOARD_MASK, &c_dfDIKeyboard);
627}
628
630 LPDIACTIONFORMATA lpdiaf,
631 LPCSTR lpszUserName,
633{
635 DIACTIONFORMATW diafW;
636 HRESULT hr;
637 WCHAR *lpszUserNameW = NULL;
638 int username_size;
639
640 diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiaf->dwNumActions);
641 _copy_diactionformatAtoW(&diafW, lpdiaf);
642
643 if (lpszUserName != NULL)
644 {
645 username_size = MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, NULL, 0);
646 lpszUserNameW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*username_size);
647 MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, lpszUserNameW, username_size);
648 }
649
650 hr = SysKeyboardWImpl_BuildActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
651
652 _copy_diactionformatWtoA(lpdiaf, &diafW);
653 HeapFree(GetProcessHeap(), 0, diafW.rgoAction);
654 HeapFree(GetProcessHeap(), 0, lpszUserNameW);
655
656 return hr;
657}
658
660 LPDIACTIONFORMATW lpdiaf,
661 LPCWSTR lpszUserName,
663{
665 FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", This, lpdiaf, debugstr_w(lpszUserName), dwFlags);
666
667 return _set_action_map(iface, lpdiaf, lpszUserName, dwFlags, &c_dfDIKeyboard);
668}
669
671 LPDIACTIONFORMATA lpdiaf,
672 LPCSTR lpszUserName,
674{
676 DIACTIONFORMATW diafW;
677 HRESULT hr;
678 WCHAR *lpszUserNameW = NULL;
679 int username_size;
680
681 diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiaf->dwNumActions);
682 _copy_diactionformatAtoW(&diafW, lpdiaf);
683
684 if (lpszUserName != NULL)
685 {
686 username_size = MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, NULL, 0);
687 lpszUserNameW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*username_size);
688 MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, lpszUserNameW, username_size);
689 }
690
691 hr = SysKeyboardWImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
692
693 lpdiaf->dwCRC = diafW.dwCRC;
694
695 HeapFree(GetProcessHeap(), 0, diafW.rgoAction);
696 HeapFree(GetProcessHeap(), 0, lpszUserNameW);
697
698 return hr;
699}
700
701static const IDirectInputDevice8AVtbl SysKeyboardAvt =
702{
735};
736
737static const IDirectInputDevice8WVtbl SysKeyboardWvt =
738{
771};
@ lparam
Definition: SystemMenu.c:31
@ hook
Definition: SystemMenu.c:35
@ wparam
Definition: SystemMenu.c:30
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:33
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
#define FIXME(fmt,...)
Definition: debug.h:114
#define WARN(fmt,...)
Definition: debug.h:115
const DIDATAFORMAT c_dfDIKeyboard
Definition: data_formats.c:561
#define E_FAIL
Definition: ddrawi.h:102
#define DIPROP_KEYNAME
Definition: dinput.h:914
#define DIK_CIRCUMFLEX
Definition: dinput.h:563
#define DIPROP_RANGE
Definition: dinput.h:892
#define DIDEVTYPEKEYBOARD_JAPAN106
Definition: dinput.h:238
#define DI8DEVCLASS_KEYBOARD
Definition: dinput.h:206
#define DIK_KANJI
Definition: dinput.h:567
#define DIK_RBRACKET
Definition: dinput.h:496
#define DIDEVTYPE_KEYBOARD
Definition: dinput.h:199
#define DIERR_INVALIDPARAM
Definition: dinput.h:152
#define DIERR_NOINTERFACE
Definition: dinput.h:153
struct IDirectInputDevice8A * LPDIRECTINPUTDEVICE8A
Definition: dinput.h:105
struct DIPROPSTRING * LPDIPROPSTRING
#define DIDC_ATTACHED
Definition: dinput.h:945
#define DIK_BACKSLASH
Definition: dinput.h:512
#define IDirectInput_AddRef(p)
Definition: dinput.h:2293
#define DIERR_OBJECTNOTFOUND
Definition: dinput.h:150
#define DIERR_NOTACQUIRED
Definition: dinput.h:167
#define DIERR_UNSUPPORTED
Definition: dinput.h:156
#define DIERR_DEVICENOTREG
Definition: dinput.h:147
#define DIDFT_PSHBUTTON
Definition: dinput.h:754
#define DIK_COLON
Definition: dinput.h:565
#define DIDC_EMULATED
Definition: dinput.h:947
#define DIK_PAUSE
Definition: dinput.h:577
#define DIERR_OUTOFMEMORY
Definition: dinput.h:155
#define DI_OK
Definition: dinput.h:128
#define DIK_RSHIFT
Definition: dinput.h:523
#define DIK_SUBTRACT
Definition: dinput.h:543
#define DIDEVTYPEKEYBOARD_PCENH
Definition: dinput.h:232
#define DIEDFL_FORCEFEEDBACK
Definition: dinput.h:192
#define DIDFT_GETINSTANCE(n)
Definition: dinput.h:764
#define DIDFT_MAKEINSTANCE(n)
Definition: dinput.h:762
#define DIK_LBRACKET
Definition: dinput.h:495
#define DIK_AT
Definition: dinput.h:564
struct IDirectInputDevice8W * LPDIRECTINPUTDEVICE8W
Definition: dinput.h:106
#define DISCL_EXCLUSIVE
Definition: dinput.h:963
#define DI8DEVTYPE_KEYBOARD
Definition: dinput.h:211
#define DIK_NUMLOCK
Definition: dinput.h:538
void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from)
Definition: dinput_main.c:366
void check_dinput_events(void)
Definition: dinput_main.c:1900
void _copy_diactionformatAtoW(LPDIACTIONFORMATW to, LPDIACTIONFORMATA from)
Definition: dinput_main.c:339
#define IS_DIPROP(x)
#define DIKEYBOARD_MASK
#define NULL
Definition: types.h:112
HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader)
Definition: device.c:1941
HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(LPDIRECTINPUTDEVICE8A iface, LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID lpvRef, DWORD dwFlags)
Definition: device.c:1743
HRESULT WINAPI IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader)
Definition: device.c:1950
HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(LPDIRECTINPUTDEVICE8A iface, LPCDIDATAFORMAT df)
Definition: device.c:1156
HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects(LPDIRECTINPUTDEVICE8W iface, LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID lpvRef, DWORD dwFlags)
Definition: device.c:1755
HRESULT WINAPI IDirectInputDevice2WImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
Definition: device.c:1076
HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(LPDIRECTINPUTDEVICE8A iface, LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID lpvRef, DWORD dwFlags)
Definition: device.c:1322
HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(LPDIRECTINPUTDEVICE8A iface, HWND hwnd, DWORD dwflags)
Definition: device.c:1203
void _dump_DIPROPHEADER(LPCDIPROPHEADER diph)
Definition: device.c:176
HRESULT WINAPI IDirectInputDevice2WImpl_SetDataFormat(LPDIRECTINPUTDEVICE8W iface, LPCDIDATAFORMAT df)
Definition: device.c:1135
HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow)
Definition: device.c:1544
HRESULT WINAPI IDirectInputDevice2WImpl_SendForceFeedbackCommand(LPDIRECTINPUTDEVICE8W iface, DWORD dwFlags)
Definition: device.c:1800
HRESULT WINAPI IDirectInputDevice2WImpl_SendDeviceData(LPDIRECTINPUTDEVICE8W iface, DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags)
Definition: device.c:1857
HRESULT WINAPI IDirectInputDevice2WImpl_SetEventNotification(LPDIRECTINPUTDEVICE8W iface, HANDLE event)
Definition: device.c:1212
HRESULT WINAPI IDirectInputDevice2WImpl_GetDeviceData(LPDIRECTINPUTDEVICE8W iface, DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags)
Definition: device.c:1629
HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(LPDIRECTINPUTDEVICE8A iface, HWND hwndOwner, DWORD dwFlags)
Definition: device.c:1700
HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(LPDIRECTINPUTDEVICE8A iface, LPDWORD pdwOut)
Definition: device.c:1794
ULONG WINAPI IDirectInputDevice2WImpl_AddRef(LPDIRECTINPUTDEVICE8W iface)
Definition: device.c:1308
HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface, LPCSTR lpszFileName, LPDIENUMEFFECTSINFILECALLBACK pec, LPVOID pvRef, DWORD dwFlags)
Definition: device.c:1876
ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface)
Definition: device.c:1231
void queue_event(LPDIRECTINPUTDEVICE8A iface, int inst_id, DWORD data, DWORD time, DWORD seq)
Definition: device.c:1025
HRESULT WINAPI IDirectInputDevice2AImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
Definition: device.c:1125
HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface, DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags)
Definition: device.c:1685
HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdef, LPUNKNOWN pUnkOuter)
Definition: device.c:1736
HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(LPDIRECTINPUTDEVICE8A iface, LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID lpvRef, DWORD dwFlags)
Definition: device.c:1821
HRESULT WINAPI IDirectInputDevice2WImpl_GetForceFeedbackState(LPDIRECTINPUTDEVICE8W iface, LPDWORD pdwOut)
Definition: device.c:1787
ULONG WINAPI IDirectInputDevice2AImpl_AddRef(LPDIRECTINPUTDEVICE8A iface)
Definition: device.c:1316
HRESULT WINAPI IDirectInputDevice2WImpl_SetCooperativeLevel(LPDIRECTINPUTDEVICE8W iface, HWND hwnd, DWORD dwflags)
Definition: device.c:1167
HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(LPDIRECTINPUTDEVICE8W iface, LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID lpvRef, DWORD dwFlags)
Definition: device.c:1352
HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df)
Definition: device.c:866
ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface)
Definition: device.c:1267
HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPDIPROPHEADER pdiph)
Definition: device.c:1440
HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(LPDIRECTINPUTDEVICE8A iface, REFIID riid, LPVOID *ppobj)
Definition: device.c:1302
HRESULT WINAPI IDirectInputDevice2AImpl_Escape(LPDIRECTINPUTDEVICE8A iface, LPDIEFFESCAPE lpDIEEsc)
Definition: device.c:1835
HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(LPDIRECTINPUTDEVICE8A iface, DWORD dwFlags)
Definition: device.c:1807
HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(LPDIRECTINPUTDEVICE8A iface, HANDLE event)
Definition: device.c:1224
HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPCDIPROPHEADER pdiph)
Definition: device.c:1537
HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface, LPCSTR lpszFileName, DWORD dwEntries, LPDIFILEEFFECT rgDiFileEft, DWORD dwFlags)
Definition: device.c:1900
HRESULT WINAPI IDirectInputDevice2WImpl_Initialize(LPDIRECTINPUTDEVICE8W iface, HINSTANCE hinst, DWORD dwVersion, REFGUID rguid)
Definition: device.c:1706
HRESULT WINAPI IDirectInputDevice2WImpl_QueryInterface(LPDIRECTINPUTDEVICE8W iface, REFIID riid, LPVOID *ppobj)
Definition: device.c:1273
HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df)
Definition: device.c:791
HRESULT WINAPI IDirectInputDevice2WImpl_CreateEffect(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdef, LPUNKNOWN pUnkOuter)
Definition: device.c:1725
HRESULT WINAPI IDirectInputDevice2AImpl_Poll(LPDIRECTINPUTDEVICE8A iface)
Definition: device.c:1851
HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(LPDIRECTINPUTDEVICE8A iface, HINSTANCE hinst, DWORD dwVersion, REFGUID rguid)
Definition: device.c:1714
void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df)
Definition: device.c:326
HRESULT WINAPI IDirectInputDevice2WImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
Definition: device.c:1108
HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPCDIPROPHEADER pdiph)
Definition: device.c:1450
HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(LPDIRECTINPUTDEVICE8A iface, DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags)
Definition: device.c:1867
HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(LPDIRECTINPUTDEVICE8A iface, LPDIEFFECTINFOA lpdei, REFGUID rguid)
Definition: device.c:1767
void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi)
Definition: device.c:186
HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo(LPDIRECTINPUTDEVICE8W iface, LPDIEFFECTINFOW lpdei, REFGUID rguid)
Definition: device.c:1777
HRESULT WINAPI IDirectInputDevice2WImpl_EnumCreatedEffectObjects(LPDIRECTINPUTDEVICE8W iface, LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID lpvRef, DWORD dwFlags)
Definition: device.c:1813
HRESULT WINAPI IDirectInputDevice2WImpl_RunControlPanel(LPDIRECTINPUTDEVICE8W iface, HWND hwndOwner, DWORD dwFlags)
Definition: device.c:1692
HRESULT WINAPI IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface, LPCWSTR lpszFileName, LPDIENUMEFFECTSINFILECALLBACK pec, LPVOID pvRef, DWORD dwFlags)
Definition: device.c:1888
void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi)
Definition: device.c:191
HRESULT WINAPI IDirectInputDevice2WImpl_Poll(LPDIRECTINPUTDEVICE8W iface)
Definition: device.c:1841
HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow)
Definition: device.c:1576
HRESULT WINAPI IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface, LPCWSTR lpszFileName, DWORD dwEntries, LPDIFILEEFFECT rgDiFileEft, DWORD dwFlags)
Definition: device.c:1912
HRESULT WINAPI IDirectInputDevice2WImpl_Escape(LPDIRECTINPUTDEVICE8W iface, LPDIEFFESCAPE lpDIEEsc)
Definition: device.c:1828
static HRESULT WINAPI SysKeyboardWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface, DWORD len, LPVOID ptr)
Definition: keyboard.c:362
static DWORD map_dik_to_scan(DWORD dik_code, DWORD subtype)
Definition: keyboard.c:437
static IDirectInputDevice8W * IDirectInputDevice8W_from_impl(SysKeyboardImpl *This)
Definition: keyboard.c:66
static BYTE map_dik_code(DWORD scanCode, DWORD vkCode, DWORD subType)
Definition: keyboard.c:71
static HRESULT WINAPI SysKeyboardAImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow)
Definition: keyboard.c:476
static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW pdidi)
Definition: keyboard.c:534
static HRESULT WINAPI SysKeyboardWImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPDIPROPHEADER pdiph)
Definition: keyboard.c:552
static HRESULT WINAPI SysKeyboardWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
Definition: keyboard.c:595
static SysKeyboardImpl * impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface)
Definition: keyboard.c:54
#define WINE_DINPUT_KEYBOARD_MAX_KEYS
Definition: keyboard.c:41
static HRESULT keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
Definition: keyboard.c:213
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEINSTANCEA pdidi)
Definition: keyboard.c:522
static HRESULT keyboarddev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPVOID *pdev, int unicode)
Definition: keyboard.c:308
static SysKeyboardImpl * impl_from_IDirectInputDevice8W(IDirectInputDevice8W *iface)
Definition: keyboard.c:58
static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow)
Definition: keyboard.c:498
static HRESULT WINAPI SysKeyboardAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags)
Definition: keyboard.c:670
const struct dinput_device keyboard_device
Definition: keyboard.c:355
static HRESULT WINAPI SysKeyboardWImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface, LPDIDEVCAPS lpDIDevCaps)
Definition: keyboard.c:399
static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, DWORD subtype)
Definition: keyboard.c:165
static HRESULT WINAPI SysKeyboardAImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface, LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags)
Definition: keyboard.c:629
static const IDirectInputDevice8AVtbl SysKeyboardAvt
Definition: keyboard.c:43
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(LPDIRECTINPUTDEVICE8A iface, DWORD len, LPVOID ptr)
Definition: keyboard.c:390
static HRESULT WINAPI SysKeyboardWImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags)
Definition: keyboard.c:659
static DWORD get_keyboard_subtype(void)
Definition: keyboard.c:148
static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPDIPROPHEADER pdiph)
Definition: keyboard.c:588
static const IDirectInputDevice8WVtbl SysKeyboardWvt
Definition: keyboard.c:44
static int KeyboardCallback(LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam)
Definition: keyboard.c:106
static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version, DWORD subtype)
Definition: keyboard.c:189
static IDirectInputDevice8A * IDirectInputDevice8A_from_impl(SysKeyboardImpl *This)
Definition: keyboard.c:62
static HRESULT WINAPI SysKeyboardWImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags)
Definition: keyboard.c:618
static SysKeyboardImpl * alloc_device(REFGUID rguid, IDirectInputImpl *dinput)
Definition: keyboard.c:255
static HRESULT keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id)
Definition: keyboard.c:234
static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
Definition: keyboard.c:612
static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(LPDIRECTINPUTDEVICE8A iface, LPDIDEVCAPS lpDIDevCaps)
Definition: keyboard.c:431
unsigned int idx
Definition: utils.c:41
#define GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define TRACE_ON(x)
Definition: compat.h:75
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define MultiByteToWideChar
Definition: compat.h:110
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static const WCHAR version[]
Definition: asmname.c:66
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static PVOID ptr
Definition: dispmode.c:27
#define LOWORD(l)
Definition: pedump.c:82
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define memset(x, y, z)
Definition: compat.h:39
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwHardwareRevision
Definition: dinput.h:941
DWORD dwAxes
Definition: dinput.h:935
DWORD dwFFSamplePeriod
Definition: dinput.h:938
DWORD dwButtons
Definition: dinput.h:936
DWORD dwPOVs
Definition: dinput.h:937
DWORD dwSize
Definition: dinput.h:932
DWORD dwFlags
Definition: dinput.h:933
DWORD dwFFDriverVersion
Definition: dinput.h:942
DWORD dwFirmwareRevision
Definition: dinput.h:940
DWORD dwDevType
Definition: dinput.h:934
DWORD dwFFMinTimeResolution
Definition: dinput.h:939
GUID guidProduct
Definition: dinput.h:414
GUID guidInstance
Definition: dinput.h:413
CHAR tszInstanceName[MAX_PATH]
Definition: dinput.h:416
CHAR tszProductName[MAX_PATH]
Definition: dinput.h:417
DWORD dwDevType
Definition: dinput.h:415
DWORD dwDevType
Definition: dinput.h:428
WCHAR tszProductName[MAX_PATH]
Definition: dinput.h:430
GUID guidProduct
Definition: dinput.h:427
WCHAR tszInstanceName[MAX_PATH]
Definition: dinput.h:429
GUID guidInstance
Definition: dinput.h:426
CHAR tszName[MAX_PATH]
Definition: dinput.h:352
WCHAR tszName[MAX_PATH]
Definition: dinput.h:371
DWORD dwObj
Definition: dinput.h:830
DWORD dwSize
Definition: dinput.h:828
DWORD dwHow
Definition: dinput.h:831
DIPROPHEADER diph
Definition: dinput.h:874
WCHAR wsz[MAX_PATH]
Definition: dinput.h:875
IDirectInputDevice8A IDirectInputDevice8A_iface
IDirectInputImpl * dinput
IDirectInputDevice8W IDirectInputDevice8W_iface
struct list devices_list
CRITICAL_SECTION crit
DWORD subtype
Definition: keyboard.c:51
struct IDirectInputDeviceImpl base
Definition: keyboard.c:49
BYTE DInputKeyState[WINE_DINPUT_KEYBOARD_MAX_KEYS]
Definition: keyboard.c:50
DWORD dwNumActions
Definition: dinput.h:1311
LPDIACTIONW rgoAction
Definition: dinput.h:1330
LPDIOBJECTDATAFORMAT rgodf
Definition: dinput.h:813
DWORD dwSize
Definition: dinput.h:808
DWORD dwObjSize
Definition: dinput.h:809
DWORD dwNumObjs
Definition: dinput.h:812
Definition: scsiwmi.h:51
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define DWORD_PTR
Definition: treelist.c:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
int ret
#define GetCurrentTime
Definition: winbase.h:2108
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define WM_KEYUP
Definition: winuser.h:1716
#define LLKHF_EXTENDED
Definition: winuser.h:2645
int WINAPI GetKeyNameTextA(_In_ LONG lParam, _Out_writes_(cchSize) LPSTR lpString, _In_ int cchSize)
#define VK_RSHIFT
Definition: winuser.h:2283
#define VK_PAUSE
Definition: winuser.h:2205
UINT WINAPI MapVirtualKeyW(_In_ UINT, _In_ UINT)
int WINAPI GetKeyNameTextW(_In_ LONG lParam, _Out_writes_(cchSize) LPWSTR lpString, _In_ int cchSize)
#define LLKHF_UP
Definition: winuser.h:2648
#define WM_SYSKEYUP
Definition: winuser.h:1720
#define VK_NUMLOCK
Definition: winuser.h:2279
int WINAPI GetKeyboardType(_In_ int)
#define MAPVK_VK_TO_VSC
Definition: winuser.h:2355
#define WM_KEYDOWN
Definition: winuser.h:1715
#define WM_SYSKEYDOWN
Definition: winuser.h:1719
#define VK_SUBTRACT
Definition: winuser.h:2252
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193