Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenkeyboard.c
Go to the documentation of this file.
00001 /* DirectInput Keyboard device 00002 * 00003 * Copyright 1998 Marcus Meissner 00004 * Copyright 1998,1999 Lionel Ulmer 00005 * Copyright 2000-2001 TransGaming Technologies Inc. 00006 * Copyright 2005 Raphael Junqueira 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00021 */ 00022 00023 #include "config.h" 00024 #include "wine/port.h" 00025 00026 #include <stdarg.h> 00027 #include <string.h> 00028 #include "windef.h" 00029 #include "winbase.h" 00030 #include "winuser.h" 00031 #include "winerror.h" 00032 #include "dinput.h" 00033 00034 #include "dinput_private.h" 00035 #include "device_private.h" 00036 #include "wine/debug.h" 00037 #include "wine/unicode.h" 00038 00039 WINE_DEFAULT_DEBUG_CHANNEL(dinput); 00040 00041 #define WINE_DINPUT_KEYBOARD_MAX_KEYS 256 00042 00043 static const IDirectInputDevice8AVtbl SysKeyboardAvt; 00044 static const IDirectInputDevice8WVtbl SysKeyboardWvt; 00045 00046 typedef struct SysKeyboardImpl SysKeyboardImpl; 00047 struct SysKeyboardImpl 00048 { 00049 struct IDirectInputDevice2AImpl base; 00050 BYTE DInputKeyState[WINE_DINPUT_KEYBOARD_MAX_KEYS]; 00051 }; 00052 00053 static BYTE map_dik_code(DWORD scanCode, DWORD vkCode) 00054 { 00055 static const BYTE asciiCodes[] = 00056 {/*32*/ DIK_SPACE,0,0,0,0,0,0,DIK_APOSTROPHE, 00057 /*40*/ 0,0,0,0,DIK_COMMA,DIK_MINUS,DIK_PERIOD,DIK_SLASH, 00058 /*48*/ DIK_0,DIK_1,DIK_2,DIK_3,DIK_4,DIK_5,DIK_6,DIK_7, 00059 /*56*/ DIK_8,DIK_9,DIK_COLON,DIK_SEMICOLON,0,DIK_EQUALS,0,0, 00060 /*64*/ DIK_AT,DIK_A,DIK_B,DIK_C,DIK_D,DIK_E,DIK_F,DIK_G, 00061 /*72*/ DIK_H,DIK_I,DIK_J,DIK_K,DIK_L,DIK_M,DIK_N,DIK_O, 00062 /*80*/ DIK_P,DIK_Q,DIK_R,DIK_S,DIK_T,DIK_U,DIK_V,DIK_W, 00063 /*88*/ DIK_X,DIK_Y,DIK_Z,DIK_LBRACKET,0,DIK_RBRACKET,DIK_CIRCUMFLEX,DIK_UNDERLINE} /*95*/ ; 00064 00065 BYTE out_code = 0; 00066 WCHAR c = MapVirtualKeyW(vkCode,MAPVK_VK_TO_CHAR); 00067 00068 if (c > 31 && c < 96) 00069 out_code = asciiCodes[c - 32]; 00070 00071 if (out_code == 0) 00072 out_code = scanCode; 00073 00074 return out_code; 00075 } 00076 00077 static void KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam ) 00078 { 00079 SysKeyboardImpl *This = (SysKeyboardImpl *)iface; 00080 int dik_code; 00081 KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam; 00082 BYTE new_diks; 00083 00084 if (wparam != WM_KEYDOWN && wparam != WM_KEYUP && 00085 wparam != WM_SYSKEYDOWN && wparam != WM_SYSKEYUP) 00086 return; 00087 00088 TRACE("(%p) %ld,%ld\n", iface, wparam, lparam); 00089 00090 dik_code = map_dik_code(hook->scanCode & 0xff,hook->vkCode); 00091 /* R-Shift is special - it is an extended key with separate scan code */ 00092 if (hook->flags & LLKHF_EXTENDED && dik_code != 0x36) 00093 dik_code |= 0x80; 00094 00095 new_diks = hook->flags & LLKHF_UP ? 0 : 0x80; 00096 00097 /* returns now if key event already known */ 00098 if (new_diks == This->DInputKeyState[dik_code]) 00099 return; 00100 00101 This->DInputKeyState[dik_code] = new_diks; 00102 TRACE(" setting %02X to %02X\n", dik_code, This->DInputKeyState[dik_code]); 00103 00104 dik_code = id_to_offset(&This->base.data_format, DIDFT_MAKEINSTANCE(dik_code) | DIDFT_PSHBUTTON); 00105 EnterCriticalSection(&This->base.crit); 00106 queue_event((LPDIRECTINPUTDEVICE8A)This, dik_code, new_diks, hook->time, This->base.dinput->evsequence++); 00107 LeaveCriticalSection(&This->base.crit); 00108 } 00109 00110 const GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */ 00111 0x0ab8648a, 0x7735, 0x11d2, {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41} 00112 }; 00113 00114 static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version) { 00115 DWORD dwSize; 00116 DIDEVICEINSTANCEA ddi; 00117 00118 dwSize = lpddi->dwSize; 00119 00120 TRACE("%d %p\n", dwSize, lpddi); 00121 00122 memset(lpddi, 0, dwSize); 00123 memset(&ddi, 0, sizeof(ddi)); 00124 00125 ddi.dwSize = dwSize; 00126 ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */ 00127 ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */ 00128 if (version >= 0x0800) 00129 ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); 00130 else 00131 ddi.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); 00132 strcpy(ddi.tszInstanceName, "Keyboard"); 00133 strcpy(ddi.tszProductName, "Wine Keyboard"); 00134 00135 memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi))); 00136 } 00137 00138 static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version) { 00139 DWORD dwSize; 00140 DIDEVICEINSTANCEW ddi; 00141 00142 dwSize = lpddi->dwSize; 00143 00144 TRACE("%d %p\n", dwSize, lpddi); 00145 00146 memset(lpddi, 0, dwSize); 00147 memset(&ddi, 0, sizeof(ddi)); 00148 00149 ddi.dwSize = dwSize; 00150 ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */ 00151 ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */ 00152 if (version >= 0x0800) 00153 ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); 00154 else 00155 ddi.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); 00156 MultiByteToWideChar(CP_ACP, 0, "Keyboard", -1, ddi.tszInstanceName, MAX_PATH); 00157 MultiByteToWideChar(CP_ACP, 0, "Wine Keyboard", -1, ddi.tszProductName, MAX_PATH); 00158 00159 memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi))); 00160 } 00161 00162 static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) 00163 { 00164 if (id != 0) 00165 return FALSE; 00166 00167 if ((dwDevType == 0) || 00168 ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) || 00169 (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) { 00170 TRACE("Enumerating the Keyboard device\n"); 00171 00172 fill_keyboard_dideviceinstanceA(lpddi, version); 00173 00174 return TRUE; 00175 } 00176 00177 return FALSE; 00178 } 00179 00180 static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) 00181 { 00182 if (id != 0) 00183 return FALSE; 00184 00185 if ((dwDevType == 0) || 00186 ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) || 00187 (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) { 00188 TRACE("Enumerating the Keyboard device\n"); 00189 00190 fill_keyboard_dideviceinstanceW(lpddi, version); 00191 00192 return TRUE; 00193 } 00194 00195 return FALSE; 00196 } 00197 00198 static SysKeyboardImpl *alloc_device(REFGUID rguid, const void *kvt, IDirectInputImpl *dinput) 00199 { 00200 SysKeyboardImpl* newDevice; 00201 LPDIDATAFORMAT df = NULL; 00202 int i, idx = 0; 00203 00204 newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardImpl)); 00205 newDevice->base.lpVtbl = kvt; 00206 newDevice->base.ref = 1; 00207 memcpy(&newDevice->base.guid, rguid, sizeof(*rguid)); 00208 newDevice->base.dinput = dinput; 00209 newDevice->base.event_proc = KeyboardCallback; 00210 InitializeCriticalSection(&newDevice->base.crit); 00211 newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit"); 00212 00213 /* Create copy of default data format */ 00214 if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed; 00215 memcpy(df, &c_dfDIKeyboard, c_dfDIKeyboard.dwSize); 00216 if (!(df->rgodf = HeapAlloc(GetProcessHeap(), 0, df->dwNumObjs * df->dwObjSize))) goto failed; 00217 00218 for (i = 0; i < df->dwNumObjs; i++) 00219 { 00220 char buf[MAX_PATH]; 00221 00222 if (!GetKeyNameTextA(((i & 0x7f) << 16) | ((i & 0x80) << 17), buf, sizeof(buf))) 00223 continue; 00224 00225 memcpy(&df->rgodf[idx], &c_dfDIKeyboard.rgodf[i], df->dwObjSize); 00226 df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON; 00227 } 00228 df->dwNumObjs = idx; 00229 00230 newDevice->base.data_format.wine_df = df; 00231 IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->base.dinput); 00232 return newDevice; 00233 00234 failed: 00235 if (df) HeapFree(GetProcessHeap(), 0, df->rgodf); 00236 HeapFree(GetProcessHeap(), 0, df); 00237 HeapFree(GetProcessHeap(), 0, newDevice); 00238 return NULL; 00239 } 00240 00241 00242 static HRESULT keyboarddev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev) 00243 { 00244 if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */ 00245 (IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */ 00246 if ((riid == NULL) || 00247 IsEqualGUID(&IID_IDirectInputDeviceA,riid) || 00248 IsEqualGUID(&IID_IDirectInputDevice2A,riid) || 00249 IsEqualGUID(&IID_IDirectInputDevice7A,riid) || 00250 IsEqualGUID(&IID_IDirectInputDevice8A,riid)) { 00251 *pdev = (IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput); 00252 TRACE("Creating a Keyboard device (%p)\n", *pdev); 00253 if (!*pdev) return DIERR_OUTOFMEMORY; 00254 return DI_OK; 00255 } else 00256 return DIERR_NOINTERFACE; 00257 } 00258 return DIERR_DEVICENOTREG; 00259 } 00260 00261 static HRESULT keyboarddev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev) 00262 { 00263 if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */ 00264 (IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */ 00265 if ((riid == NULL) || 00266 IsEqualGUID(&IID_IDirectInputDeviceW,riid) || 00267 IsEqualGUID(&IID_IDirectInputDevice2W,riid) || 00268 IsEqualGUID(&IID_IDirectInputDevice7W,riid) || 00269 IsEqualGUID(&IID_IDirectInputDevice8W,riid)) { 00270 *pdev = (IDirectInputDeviceW*) alloc_device(rguid, &SysKeyboardWvt, dinput); 00271 TRACE("Creating a Keyboard device (%p)\n", *pdev); 00272 if (!*pdev) return DIERR_OUTOFMEMORY; 00273 return DI_OK; 00274 } else 00275 return DIERR_NOINTERFACE; 00276 } 00277 return DIERR_DEVICENOTREG; 00278 } 00279 00280 const struct dinput_device keyboard_device = { 00281 "Wine keyboard driver", 00282 keyboarddev_enum_deviceA, 00283 keyboarddev_enum_deviceW, 00284 keyboarddev_create_deviceA, 00285 keyboarddev_create_deviceW 00286 }; 00287 00288 static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState( 00289 LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr 00290 ) 00291 { 00292 SysKeyboardImpl *This = (SysKeyboardImpl *)iface; 00293 TRACE("(%p)->(%d,%p)\n", This, len, ptr); 00294 00295 if (!This->base.acquired) return DIERR_NOTACQUIRED; 00296 00297 if (len != This->base.data_format.user_df->dwDataSize ) 00298 return DIERR_INVALIDPARAM; 00299 00300 EnterCriticalSection(&This->base.crit); 00301 00302 if (TRACE_ON(dinput)) { 00303 int i; 00304 for (i = 0; i < WINE_DINPUT_KEYBOARD_MAX_KEYS; i++) { 00305 if (This->DInputKeyState[i] != 0x00) 00306 TRACE(" - %02X: %02x\n", i, This->DInputKeyState[i]); 00307 } 00308 } 00309 00310 fill_DataFormat(ptr, len, This->DInputKeyState, &This->base.data_format); 00311 LeaveCriticalSection(&This->base.crit); 00312 00313 return DI_OK; 00314 } 00315 00316 /****************************************************************************** 00317 * GetCapabilities : get the device capabilities 00318 */ 00319 static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities( 00320 LPDIRECTINPUTDEVICE8A iface, 00321 LPDIDEVCAPS lpDIDevCaps) 00322 { 00323 SysKeyboardImpl *This = (SysKeyboardImpl *)iface; 00324 DIDEVCAPS devcaps; 00325 00326 TRACE("(this=%p,%p)\n",This,lpDIDevCaps); 00327 00328 if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { 00329 WARN("invalid parameter\n"); 00330 return DIERR_INVALIDPARAM; 00331 } 00332 00333 devcaps.dwSize = lpDIDevCaps->dwSize; 00334 devcaps.dwFlags = DIDC_ATTACHED; 00335 if (This->base.dinput->dwVersion >= 0x0800) 00336 devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); 00337 else 00338 devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); 00339 devcaps.dwAxes = 0; 00340 devcaps.dwButtons = This->base.data_format.wine_df->dwNumObjs; 00341 devcaps.dwPOVs = 0; 00342 devcaps.dwFFSamplePeriod = 0; 00343 devcaps.dwFFMinTimeResolution = 0; 00344 devcaps.dwFirmwareRevision = 100; 00345 devcaps.dwHardwareRevision = 100; 00346 devcaps.dwFFDriverVersion = 0; 00347 00348 memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); 00349 00350 return DI_OK; 00351 } 00352 00353 /****************************************************************************** 00354 * GetObjectInfo : get information about a device object such as a button 00355 * or axis 00356 */ 00357 static HRESULT WINAPI 00358 SysKeyboardAImpl_GetObjectInfo( 00359 LPDIRECTINPUTDEVICE8A iface, 00360 LPDIDEVICEOBJECTINSTANCEA pdidoi, 00361 DWORD dwObj, 00362 DWORD dwHow) 00363 { 00364 HRESULT res; 00365 00366 res = IDirectInputDevice2AImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); 00367 if (res != DI_OK) return res; 00368 00369 if (!GetKeyNameTextA((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 | 00370 (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16, 00371 pdidoi->tszName, sizeof(pdidoi->tszName))) 00372 return DIERR_OBJECTNOTFOUND; 00373 00374 _dump_OBJECTINSTANCEA(pdidoi); 00375 return res; 00376 } 00377 00378 static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, 00379 LPDIDEVICEOBJECTINSTANCEW pdidoi, 00380 DWORD dwObj, 00381 DWORD dwHow) 00382 { 00383 HRESULT res; 00384 00385 res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); 00386 if (res != DI_OK) return res; 00387 00388 if (!GetKeyNameTextW((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 | 00389 (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16, 00390 pdidoi->tszName, 00391 sizeof(pdidoi->tszName)/sizeof(pdidoi->tszName[0]))) 00392 return DIERR_OBJECTNOTFOUND; 00393 00394 _dump_OBJECTINSTANCEW(pdidoi); 00395 return res; 00396 } 00397 00398 /****************************************************************************** 00399 * GetDeviceInfo : get information about a device's identity 00400 */ 00401 static HRESULT WINAPI SysKeyboardAImpl_GetDeviceInfo( 00402 LPDIRECTINPUTDEVICE8A iface, 00403 LPDIDEVICEINSTANCEA pdidi) 00404 { 00405 SysKeyboardImpl *This = (SysKeyboardImpl *)iface; 00406 TRACE("(this=%p,%p)\n", This, pdidi); 00407 00408 if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEA)) { 00409 WARN(" dinput3 not supported yet...\n"); 00410 return DI_OK; 00411 } 00412 00413 fill_keyboard_dideviceinstanceA(pdidi, This->base.dinput->dwVersion); 00414 00415 return DI_OK; 00416 } 00417 00418 static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW pdidi) 00419 { 00420 SysKeyboardImpl *This = (SysKeyboardImpl *)iface; 00421 TRACE("(this=%p,%p)\n", This, pdidi); 00422 00423 if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEW)) { 00424 WARN(" dinput3 not supported yet...\n"); 00425 return DI_OK; 00426 } 00427 00428 fill_keyboard_dideviceinstanceW(pdidi, This->base.dinput->dwVersion); 00429 00430 return DI_OK; 00431 } 00432 00433 /****************************************************************************** 00434 * GetProperty : Retrieves information about the input device. 00435 */ 00436 static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, 00437 REFGUID rguid, LPDIPROPHEADER pdiph) 00438 { 00439 TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph); 00440 _dump_DIPROPHEADER(pdiph); 00441 00442 if (HIWORD(rguid)) return DI_OK; 00443 00444 switch (LOWORD(rguid)) 00445 { 00446 case (DWORD_PTR)DIPROP_KEYNAME: 00447 { 00448 HRESULT hr; 00449 LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph; 00450 DIDEVICEOBJECTINSTANCEW didoi; 00451 00452 if (pdiph->dwSize != sizeof(DIPROPSTRING)) 00453 return DIERR_INVALIDPARAM; 00454 00455 didoi.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW); 00456 00457 hr = SysKeyboardWImpl_GetObjectInfo((LPDIRECTINPUTDEVICE8W)iface , &didoi, 00458 ps->diph.dwObj, ps->diph.dwHow); 00459 if (hr == DI_OK) 00460 memcpy(ps->wsz, didoi.tszName, sizeof(ps->wsz)); 00461 return hr; 00462 } 00463 default: 00464 return IDirectInputDevice2AImpl_GetProperty( iface, rguid, pdiph ); 00465 } 00466 return DI_OK; 00467 } 00468 00469 static const IDirectInputDevice8AVtbl SysKeyboardAvt = 00470 { 00471 IDirectInputDevice2AImpl_QueryInterface, 00472 IDirectInputDevice2AImpl_AddRef, 00473 IDirectInputDevice2AImpl_Release, 00474 SysKeyboardAImpl_GetCapabilities, 00475 IDirectInputDevice2AImpl_EnumObjects, 00476 SysKeyboardAImpl_GetProperty, 00477 IDirectInputDevice2AImpl_SetProperty, 00478 IDirectInputDevice2AImpl_Acquire, 00479 IDirectInputDevice2AImpl_Unacquire, 00480 SysKeyboardAImpl_GetDeviceState, 00481 IDirectInputDevice2AImpl_GetDeviceData, 00482 IDirectInputDevice2AImpl_SetDataFormat, 00483 IDirectInputDevice2AImpl_SetEventNotification, 00484 IDirectInputDevice2AImpl_SetCooperativeLevel, 00485 SysKeyboardAImpl_GetObjectInfo, 00486 SysKeyboardAImpl_GetDeviceInfo, 00487 IDirectInputDevice2AImpl_RunControlPanel, 00488 IDirectInputDevice2AImpl_Initialize, 00489 IDirectInputDevice2AImpl_CreateEffect, 00490 IDirectInputDevice2AImpl_EnumEffects, 00491 IDirectInputDevice2AImpl_GetEffectInfo, 00492 IDirectInputDevice2AImpl_GetForceFeedbackState, 00493 IDirectInputDevice2AImpl_SendForceFeedbackCommand, 00494 IDirectInputDevice2AImpl_EnumCreatedEffectObjects, 00495 IDirectInputDevice2AImpl_Escape, 00496 IDirectInputDevice2AImpl_Poll, 00497 IDirectInputDevice2AImpl_SendDeviceData, 00498 IDirectInputDevice7AImpl_EnumEffectsInFile, 00499 IDirectInputDevice7AImpl_WriteEffectToFile, 00500 IDirectInputDevice8AImpl_BuildActionMap, 00501 IDirectInputDevice8AImpl_SetActionMap, 00502 IDirectInputDevice8AImpl_GetImageInfo 00503 }; 00504 00505 #if !defined(__STRICT_ANSI__) && defined(__GNUC__) 00506 # define XCAST(fun) (typeof(SysKeyboardWvt.fun)) 00507 #else 00508 # define XCAST(fun) (void*) 00509 #endif 00510 00511 static const IDirectInputDevice8WVtbl SysKeyboardWvt = 00512 { 00513 IDirectInputDevice2WImpl_QueryInterface, 00514 XCAST(AddRef)IDirectInputDevice2AImpl_AddRef, 00515 XCAST(Release)IDirectInputDevice2AImpl_Release, 00516 XCAST(GetCapabilities)SysKeyboardAImpl_GetCapabilities, 00517 IDirectInputDevice2WImpl_EnumObjects, 00518 XCAST(GetProperty)SysKeyboardAImpl_GetProperty, 00519 XCAST(SetProperty)IDirectInputDevice2AImpl_SetProperty, 00520 XCAST(Acquire)IDirectInputDevice2AImpl_Acquire, 00521 XCAST(Unacquire)IDirectInputDevice2AImpl_Unacquire, 00522 XCAST(GetDeviceState)SysKeyboardAImpl_GetDeviceState, 00523 XCAST(GetDeviceData)IDirectInputDevice2AImpl_GetDeviceData, 00524 XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat, 00525 XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification, 00526 XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel, 00527 SysKeyboardWImpl_GetObjectInfo, 00528 SysKeyboardWImpl_GetDeviceInfo, 00529 XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel, 00530 XCAST(Initialize)IDirectInputDevice2AImpl_Initialize, 00531 XCAST(CreateEffect)IDirectInputDevice2AImpl_CreateEffect, 00532 IDirectInputDevice2WImpl_EnumEffects, 00533 IDirectInputDevice2WImpl_GetEffectInfo, 00534 XCAST(GetForceFeedbackState)IDirectInputDevice2AImpl_GetForceFeedbackState, 00535 XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand, 00536 XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects, 00537 XCAST(Escape)IDirectInputDevice2AImpl_Escape, 00538 XCAST(Poll)IDirectInputDevice2AImpl_Poll, 00539 XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData, 00540 IDirectInputDevice7WImpl_EnumEffectsInFile, 00541 IDirectInputDevice7WImpl_WriteEffectToFile, 00542 IDirectInputDevice8WImpl_BuildActionMap, 00543 IDirectInputDevice8WImpl_SetActionMap, 00544 IDirectInputDevice8WImpl_GetImageInfo 00545 }; 00546 #undef XCAST Generated on Sat May 26 2012 04:17:46 for ReactOS by
1.7.6.1
|