1 /* 2 * Copyright (C) the Wine project 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17 */ 18 19 #ifndef __DINPUT_INCLUDED__ 20 #define __DINPUT_INCLUDED__ 21 22 #define COM_NO_WINDOWS_H 23 #include <objbase.h> 24 #include <_mingw_dxhelper.h> 25 26 #ifndef DIRECTINPUT_VERSION 27 #define DIRECTINPUT_VERSION 0x0800 28 #endif 29 30 /* Classes */ 31 DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 32 DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 33 34 DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 35 DEFINE_GUID(CLSID_DirectInputDevice8, 0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 36 37 /* Interfaces */ 38 DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 39 DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 40 DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 41 DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 42 DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); 43 DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); 44 DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00); 45 DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00); 46 DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 47 DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 48 DEFINE_GUID(IID_IDirectInputDevice2A, 0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 49 DEFINE_GUID(IID_IDirectInputDevice2W, 0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 50 DEFINE_GUID(IID_IDirectInputDevice7A, 0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); 51 DEFINE_GUID(IID_IDirectInputDevice7W, 0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); 52 DEFINE_GUID(IID_IDirectInputDevice8A, 0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79); 53 DEFINE_GUID(IID_IDirectInputDevice8W, 0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79); 54 DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 55 56 /* Predefined object types */ 57 DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 58 DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 59 DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 60 DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 61 DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 62 DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 63 DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 64 DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 65 DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 66 DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 67 DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 68 69 /* Predefined product GUIDs */ 70 DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 71 DEFINE_GUID(GUID_SysKeyboard, 0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 72 DEFINE_GUID(GUID_Joystick, 0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 73 DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 74 DEFINE_GUID(GUID_SysMouseEm2, 0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 75 DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 76 DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); 77 78 /* predefined forcefeedback effects */ 79 DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 80 DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 81 DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 82 DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 83 DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 84 DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 85 DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 86 DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 87 DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 88 DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 89 DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 90 DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); 91 92 typedef struct IDirectInputA *LPDIRECTINPUTA; 93 typedef struct IDirectInputW *LPDIRECTINPUTW; 94 typedef struct IDirectInput2A *LPDIRECTINPUT2A; 95 typedef struct IDirectInput2W *LPDIRECTINPUT2W; 96 typedef struct IDirectInput7A *LPDIRECTINPUT7A; 97 typedef struct IDirectInput7W *LPDIRECTINPUT7W; 98 #if DIRECTINPUT_VERSION >= 0x0800 99 typedef struct IDirectInput8A *LPDIRECTINPUT8A; 100 typedef struct IDirectInput8W *LPDIRECTINPUT8W; 101 #endif /* DI8 */ 102 typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA; 103 typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW; 104 #if DIRECTINPUT_VERSION >= 0x0500 105 typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A; 106 typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W; 107 #endif /* DI5 */ 108 #if DIRECTINPUT_VERSION >= 0x0700 109 typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A; 110 typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W; 111 #endif /* DI7 */ 112 #if DIRECTINPUT_VERSION >= 0x0800 113 typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A; 114 typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W; 115 #endif /* DI8 */ 116 #if DIRECTINPUT_VERSION >= 0x0500 117 typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT; 118 #endif /* DI5 */ 119 typedef struct SysKeyboardA *LPSYSKEYBOARDA; 120 typedef struct SysMouseA *LPSYSMOUSEA; 121 122 #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput) 123 #define IDirectInput WINELIB_NAME_AW(IDirectInput) 124 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT) 125 #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2) 126 #define IDirectInput2 WINELIB_NAME_AW(IDirectInput2) 127 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2) 128 #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7) 129 #define IDirectInput7 WINELIB_NAME_AW(IDirectInput7) 130 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7) 131 #if DIRECTINPUT_VERSION >= 0x0800 132 #define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8) 133 #define IDirectInput8 WINELIB_NAME_AW(IDirectInput8) 134 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT8) 135 #endif /* DI8 */ 136 #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice) 137 #define IDirectInputDevice WINELIB_NAME_AW(IDirectInputDevice) 138 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE) 139 #if DIRECTINPUT_VERSION >= 0x0500 140 #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2) 141 #define IDirectInputDevice2 WINELIB_NAME_AW(IDirectInputDevice2) 142 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2) 143 #endif /* DI5 */ 144 #if DIRECTINPUT_VERSION >= 0x0700 145 #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7) 146 #define IDirectInputDevice7 WINELIB_NAME_AW(IDirectInputDevice7) 147 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7) 148 #endif /* DI7 */ 149 #if DIRECTINPUT_VERSION >= 0x0800 150 #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8) 151 #define IDirectInputDevice8 WINELIB_NAME_AW(IDirectInputDevice8) 152 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8) 153 #endif /* DI8 */ 154 155 #define DI_OK S_OK 156 #define DI_NOTATTACHED S_FALSE 157 #define DI_BUFFEROVERFLOW S_FALSE 158 #define DI_PROPNOEFFECT S_FALSE 159 #define DI_NOEFFECT S_FALSE 160 #define DI_POLLEDDEVICE ((HRESULT)0x00000002L) 161 #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L) 162 #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L) 163 #define DI_TRUNCATED ((HRESULT)0x00000008L) 164 #define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000BL) 165 #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL) 166 167 #define DIERR_OLDDIRECTINPUTVERSION \ 168 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION) 169 #define DIERR_BETADIRECTINPUTVERSION \ 170 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP) 171 #define DIERR_BADDRIVERVER \ 172 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL) 173 #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG 174 #define DIERR_NOTFOUND \ 175 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND) 176 #define DIERR_OBJECTNOTFOUND \ 177 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND) 178 #define DIERR_INVALIDPARAM E_INVALIDARG 179 #define DIERR_NOINTERFACE E_NOINTERFACE 180 #define DIERR_GENERIC E_FAIL 181 #define DIERR_OUTOFMEMORY E_OUTOFMEMORY 182 #define DIERR_UNSUPPORTED E_NOTIMPL 183 #define DIERR_NOTINITIALIZED \ 184 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY) 185 #define DIERR_ALREADYINITIALIZED \ 186 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED) 187 #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION 188 #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED 189 #define DIERR_INPUTLOST \ 190 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT) 191 #define DIERR_ACQUIRED \ 192 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY) 193 #define DIERR_NOTACQUIRED \ 194 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS) 195 #define DIERR_READONLY E_ACCESSDENIED 196 #define DIERR_HANDLEEXISTS E_ACCESSDENIED 197 #ifndef E_PENDING 198 #define E_PENDING 0x8000000AL 199 #endif 200 #define DIERR_INSUFFICIENTPRIVS 0x80040200L 201 #define DIERR_DEVICEFULL 0x80040201L 202 #define DIERR_MOREDATA 0x80040202L 203 #define DIERR_NOTDOWNLOADED 0x80040203L 204 #define DIERR_HASEFFECTS 0x80040204L 205 #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L 206 #define DIERR_INCOMPLETEEFFECT 0x80040206L 207 #define DIERR_NOTBUFFERED 0x80040207L 208 #define DIERR_EFFECTPLAYING 0x80040208L 209 #define DIERR_UNPLUGGED 0x80040209L 210 #define DIERR_REPORTFULL 0x8004020AL 211 #define DIERR_MAPFILEFAIL 0x8004020BL 212 213 #define DIENUM_STOP 0 214 #define DIENUM_CONTINUE 1 215 216 #define DIEDFL_ALLDEVICES 0x00000000 217 #define DIEDFL_ATTACHEDONLY 0x00000001 218 #define DIEDFL_FORCEFEEDBACK 0x00000100 219 #define DIEDFL_INCLUDEALIASES 0x00010000 220 #define DIEDFL_INCLUDEPHANTOMS 0x00020000 221 #define DIEDFL_INCLUDEHIDDEN 0x00040000 222 223 #define DIDEVTYPE_DEVICE 1 224 #define DIDEVTYPE_MOUSE 2 225 #define DIDEVTYPE_KEYBOARD 3 226 #define DIDEVTYPE_JOYSTICK 4 227 #define DIDEVTYPE_HID 0x00010000 228 229 #define DI8DEVCLASS_ALL 0 230 #define DI8DEVCLASS_DEVICE 1 231 #define DI8DEVCLASS_POINTER 2 232 #define DI8DEVCLASS_KEYBOARD 3 233 #define DI8DEVCLASS_GAMECTRL 4 234 235 #define DI8DEVTYPE_DEVICE 0x11 236 #define DI8DEVTYPE_MOUSE 0x12 237 #define DI8DEVTYPE_KEYBOARD 0x13 238 #define DI8DEVTYPE_JOYSTICK 0x14 239 #define DI8DEVTYPE_GAMEPAD 0x15 240 #define DI8DEVTYPE_DRIVING 0x16 241 #define DI8DEVTYPE_FLIGHT 0x17 242 #define DI8DEVTYPE_1STPERSON 0x18 243 #define DI8DEVTYPE_DEVICECTRL 0x19 244 #define DI8DEVTYPE_SCREENPOINTER 0x1A 245 #define DI8DEVTYPE_REMOTE 0x1B 246 #define DI8DEVTYPE_SUPPLEMENTAL 0x1C 247 248 #define DIDEVTYPEMOUSE_UNKNOWN 1 249 #define DIDEVTYPEMOUSE_TRADITIONAL 2 250 #define DIDEVTYPEMOUSE_FINGERSTICK 3 251 #define DIDEVTYPEMOUSE_TOUCHPAD 4 252 #define DIDEVTYPEMOUSE_TRACKBALL 5 253 254 #define DIDEVTYPEKEYBOARD_UNKNOWN 0 255 #define DIDEVTYPEKEYBOARD_PCXT 1 256 #define DIDEVTYPEKEYBOARD_OLIVETTI 2 257 #define DIDEVTYPEKEYBOARD_PCAT 3 258 #define DIDEVTYPEKEYBOARD_PCENH 4 259 #define DIDEVTYPEKEYBOARD_NOKIA1050 5 260 #define DIDEVTYPEKEYBOARD_NOKIA9140 6 261 #define DIDEVTYPEKEYBOARD_NEC98 7 262 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8 263 #define DIDEVTYPEKEYBOARD_NEC98106 9 264 #define DIDEVTYPEKEYBOARD_JAPAN106 10 265 #define DIDEVTYPEKEYBOARD_JAPANAX 11 266 #define DIDEVTYPEKEYBOARD_J3100 12 267 268 #define DIDEVTYPEJOYSTICK_UNKNOWN 1 269 #define DIDEVTYPEJOYSTICK_TRADITIONAL 2 270 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3 271 #define DIDEVTYPEJOYSTICK_GAMEPAD 4 272 #define DIDEVTYPEJOYSTICK_RUDDER 5 273 #define DIDEVTYPEJOYSTICK_WHEEL 6 274 #define DIDEVTYPEJOYSTICK_HEADTRACKER 7 275 276 #define DI8DEVTYPEMOUSE_UNKNOWN 1 277 #define DI8DEVTYPEMOUSE_TRADITIONAL 2 278 #define DI8DEVTYPEMOUSE_FINGERSTICK 3 279 #define DI8DEVTYPEMOUSE_TOUCHPAD 4 280 #define DI8DEVTYPEMOUSE_TRACKBALL 5 281 #define DI8DEVTYPEMOUSE_ABSOLUTE 6 282 283 #define DI8DEVTYPEKEYBOARD_UNKNOWN 0 284 #define DI8DEVTYPEKEYBOARD_PCXT 1 285 #define DI8DEVTYPEKEYBOARD_OLIVETTI 2 286 #define DI8DEVTYPEKEYBOARD_PCAT 3 287 #define DI8DEVTYPEKEYBOARD_PCENH 4 288 #define DI8DEVTYPEKEYBOARD_NOKIA1050 5 289 #define DI8DEVTYPEKEYBOARD_NOKIA9140 6 290 #define DI8DEVTYPEKEYBOARD_NEC98 7 291 #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8 292 #define DI8DEVTYPEKEYBOARD_NEC98106 9 293 #define DI8DEVTYPEKEYBOARD_JAPAN106 10 294 #define DI8DEVTYPEKEYBOARD_JAPANAX 11 295 #define DI8DEVTYPEKEYBOARD_J3100 12 296 297 #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1 298 299 #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE 300 #define DI8DEVTYPEJOYSTICK_STANDARD 2 301 302 #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE 303 #define DI8DEVTYPEGAMEPAD_STANDARD 2 304 #define DI8DEVTYPEGAMEPAD_TILT 3 305 306 #define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE 307 #define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2 308 #define DI8DEVTYPEDRIVING_DUALPEDALS 3 309 #define DI8DEVTYPEDRIVING_THREEPEDALS 4 310 #define DI8DEVTYPEDRIVING_HANDHELD 5 311 312 #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE 313 #define DI8DEVTYPEFLIGHT_STICK 2 314 #define DI8DEVTYPEFLIGHT_YOKE 3 315 #define DI8DEVTYPEFLIGHT_RC 4 316 317 #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE 318 #define DI8DEVTYPE1STPERSON_UNKNOWN 2 319 #define DI8DEVTYPE1STPERSON_SIXDOF 3 320 #define DI8DEVTYPE1STPERSON_SHOOTER 4 321 322 #define DI8DEVTYPESCREENPTR_UNKNOWN 2 323 #define DI8DEVTYPESCREENPTR_LIGHTGUN 3 324 #define DI8DEVTYPESCREENPTR_LIGHTPEN 4 325 #define DI8DEVTYPESCREENPTR_TOUCH 5 326 327 #define DI8DEVTYPEREMOTE_UNKNOWN 2 328 329 #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2 330 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3 331 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4 332 333 #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2 334 #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3 335 #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4 336 #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5 337 #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6 338 #define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7 339 #define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8 340 #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9 341 #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10 342 #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11 343 #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12 344 #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13 345 346 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType) 347 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType) 348 349 typedef struct DIDEVICEOBJECTINSTANCE_DX3A { 350 DWORD dwSize; 351 GUID guidType; 352 DWORD dwOfs; 353 DWORD dwType; 354 DWORD dwFlags; 355 CHAR tszName[MAX_PATH]; 356 } DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A; 357 typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A; 358 typedef struct DIDEVICEOBJECTINSTANCE_DX3W { 359 DWORD dwSize; 360 GUID guidType; 361 DWORD dwOfs; 362 DWORD dwType; 363 DWORD dwFlags; 364 WCHAR tszName[MAX_PATH]; 365 } DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W; 366 typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W; 367 368 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3) 369 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3) 370 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3) 371 372 typedef struct DIDEVICEOBJECTINSTANCEA { 373 DWORD dwSize; 374 GUID guidType; 375 DWORD dwOfs; 376 DWORD dwType; 377 DWORD dwFlags; 378 CHAR tszName[MAX_PATH]; 379 #if(DIRECTINPUT_VERSION >= 0x0500) 380 DWORD dwFFMaxForce; 381 DWORD dwFFForceResolution; 382 WORD wCollectionNumber; 383 WORD wDesignatorIndex; 384 WORD wUsagePage; 385 WORD wUsage; 386 DWORD dwDimension; 387 WORD wExponent; 388 WORD wReserved; 389 #endif /* DIRECTINPUT_VERSION >= 0x0500 */ 390 } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA; 391 typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA; 392 393 typedef struct DIDEVICEOBJECTINSTANCEW { 394 DWORD dwSize; 395 GUID guidType; 396 DWORD dwOfs; 397 DWORD dwType; 398 DWORD dwFlags; 399 WCHAR tszName[MAX_PATH]; 400 #if(DIRECTINPUT_VERSION >= 0x0500) 401 DWORD dwFFMaxForce; 402 DWORD dwFFForceResolution; 403 WORD wCollectionNumber; 404 WORD wDesignatorIndex; 405 WORD wUsagePage; 406 WORD wUsage; 407 DWORD dwDimension; 408 WORD wExponent; 409 WORD wReserved; 410 #endif /* DIRECTINPUT_VERSION >= 0x0500 */ 411 } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW; 412 typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW; 413 414 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE) 415 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE) 416 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE) 417 418 typedef struct DIDEVICEINSTANCE_DX3A { 419 DWORD dwSize; 420 GUID guidInstance; 421 GUID guidProduct; 422 DWORD dwDevType; 423 CHAR tszInstanceName[MAX_PATH]; 424 CHAR tszProductName[MAX_PATH]; 425 } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A; 426 typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A; 427 typedef struct DIDEVICEINSTANCE_DX3W { 428 DWORD dwSize; 429 GUID guidInstance; 430 GUID guidProduct; 431 DWORD dwDevType; 432 WCHAR tszInstanceName[MAX_PATH]; 433 WCHAR tszProductName[MAX_PATH]; 434 } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W; 435 typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W; 436 437 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3) 438 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3) 439 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3) 440 441 typedef struct DIDEVICEINSTANCEA { 442 DWORD dwSize; 443 GUID guidInstance; 444 GUID guidProduct; 445 DWORD dwDevType; 446 CHAR tszInstanceName[MAX_PATH]; 447 CHAR tszProductName[MAX_PATH]; 448 #if(DIRECTINPUT_VERSION >= 0x0500) 449 GUID guidFFDriver; 450 WORD wUsagePage; 451 WORD wUsage; 452 #endif /* DIRECTINPUT_VERSION >= 0x0500 */ 453 } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA; 454 typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA; 455 456 typedef struct DIDEVICEINSTANCEW { 457 DWORD dwSize; 458 GUID guidInstance; 459 GUID guidProduct; 460 DWORD dwDevType; 461 WCHAR tszInstanceName[MAX_PATH]; 462 WCHAR tszProductName[MAX_PATH]; 463 #if(DIRECTINPUT_VERSION >= 0x0500) 464 GUID guidFFDriver; 465 WORD wUsagePage; 466 WORD wUsage; 467 #endif /* DIRECTINPUT_VERSION >= 0x0500 */ 468 } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW; 469 typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW; 470 471 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE) 472 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE) 473 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE) 474 475 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID); 476 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID); 477 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK) 478 479 #define DIEDBS_MAPPEDPRI1 0x00000001 480 #define DIEDBS_MAPPEDPRI2 0x00000002 481 #define DIEDBS_RECENTDEVICE 0x00000010 482 #define DIEDBS_NEWDEVICE 0x00000020 483 484 #define DIEDBSFL_ATTACHEDONLY 0x00000000 485 #define DIEDBSFL_THISUSER 0x00000010 486 #define DIEDBSFL_FORCEFEEDBACK DIEDFL_FORCEFEEDBACK 487 #define DIEDBSFL_AVAILABLEDEVICES 0x00001000 488 #define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000 489 #define DIEDBSFL_NONGAMINGDEVICES 0x00004000 490 #define DIEDBSFL_VALID 0x00007110 491 492 #if DIRECTINPUT_VERSION >= 0x0800 493 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID); 494 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID); 495 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB) 496 #endif 497 498 typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID); 499 500 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID); 501 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID); 502 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK) 503 504 #if DIRECTINPUT_VERSION >= 0x0500 505 typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID); 506 #endif 507 508 #define DIK_ESCAPE 0x01 509 #define DIK_1 0x02 510 #define DIK_2 0x03 511 #define DIK_3 0x04 512 #define DIK_4 0x05 513 #define DIK_5 0x06 514 #define DIK_6 0x07 515 #define DIK_7 0x08 516 #define DIK_8 0x09 517 #define DIK_9 0x0A 518 #define DIK_0 0x0B 519 #define DIK_MINUS 0x0C /* - on main keyboard */ 520 #define DIK_EQUALS 0x0D 521 #define DIK_BACK 0x0E /* backspace */ 522 #define DIK_TAB 0x0F 523 #define DIK_Q 0x10 524 #define DIK_W 0x11 525 #define DIK_E 0x12 526 #define DIK_R 0x13 527 #define DIK_T 0x14 528 #define DIK_Y 0x15 529 #define DIK_U 0x16 530 #define DIK_I 0x17 531 #define DIK_O 0x18 532 #define DIK_P 0x19 533 #define DIK_LBRACKET 0x1A 534 #define DIK_RBRACKET 0x1B 535 #define DIK_RETURN 0x1C /* Enter on main keyboard */ 536 #define DIK_LCONTROL 0x1D 537 #define DIK_A 0x1E 538 #define DIK_S 0x1F 539 #define DIK_D 0x20 540 #define DIK_F 0x21 541 #define DIK_G 0x22 542 #define DIK_H 0x23 543 #define DIK_J 0x24 544 #define DIK_K 0x25 545 #define DIK_L 0x26 546 #define DIK_SEMICOLON 0x27 547 #define DIK_APOSTROPHE 0x28 548 #define DIK_GRAVE 0x29 /* accent grave */ 549 #define DIK_LSHIFT 0x2A 550 #define DIK_BACKSLASH 0x2B 551 #define DIK_Z 0x2C 552 #define DIK_X 0x2D 553 #define DIK_C 0x2E 554 #define DIK_V 0x2F 555 #define DIK_B 0x30 556 #define DIK_N 0x31 557 #define DIK_M 0x32 558 #define DIK_COMMA 0x33 559 #define DIK_PERIOD 0x34 /* . on main keyboard */ 560 #define DIK_SLASH 0x35 /* / on main keyboard */ 561 #define DIK_RSHIFT 0x36 562 #define DIK_MULTIPLY 0x37 /* * on numeric keypad */ 563 #define DIK_LMENU 0x38 /* left Alt */ 564 #define DIK_SPACE 0x39 565 #define DIK_CAPITAL 0x3A 566 #define DIK_F1 0x3B 567 #define DIK_F2 0x3C 568 #define DIK_F3 0x3D 569 #define DIK_F4 0x3E 570 #define DIK_F5 0x3F 571 #define DIK_F6 0x40 572 #define DIK_F7 0x41 573 #define DIK_F8 0x42 574 #define DIK_F9 0x43 575 #define DIK_F10 0x44 576 #define DIK_NUMLOCK 0x45 577 #define DIK_SCROLL 0x46 /* Scroll Lock */ 578 #define DIK_NUMPAD7 0x47 579 #define DIK_NUMPAD8 0x48 580 #define DIK_NUMPAD9 0x49 581 #define DIK_SUBTRACT 0x4A /* - on numeric keypad */ 582 #define DIK_NUMPAD4 0x4B 583 #define DIK_NUMPAD5 0x4C 584 #define DIK_NUMPAD6 0x4D 585 #define DIK_ADD 0x4E /* + on numeric keypad */ 586 #define DIK_NUMPAD1 0x4F 587 #define DIK_NUMPAD2 0x50 588 #define DIK_NUMPAD3 0x51 589 #define DIK_NUMPAD0 0x52 590 #define DIK_DECIMAL 0x53 /* . on numeric keypad */ 591 #define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ 592 #define DIK_F11 0x57 593 #define DIK_F12 0x58 594 #define DIK_F13 0x64 /* (NEC PC98) */ 595 #define DIK_F14 0x65 /* (NEC PC98) */ 596 #define DIK_F15 0x66 /* (NEC PC98) */ 597 #define DIK_KANA 0x70 /* (Japanese keyboard) */ 598 #define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ 599 #define DIK_CONVERT 0x79 /* (Japanese keyboard) */ 600 #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ 601 #define DIK_YEN 0x7D /* (Japanese keyboard) */ 602 #define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ 603 #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ 604 #define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */ 605 #define DIK_AT 0x91 /* (NEC PC98) */ 606 #define DIK_COLON 0x92 /* (NEC PC98) */ 607 #define DIK_UNDERLINE 0x93 /* (NEC PC98) */ 608 #define DIK_KANJI 0x94 /* (Japanese keyboard) */ 609 #define DIK_STOP 0x95 /* (NEC PC98) */ 610 #define DIK_AX 0x96 /* (Japan AX) */ 611 #define DIK_UNLABELED 0x97 /* (J3100) */ 612 #define DIK_NEXTTRACK 0x99 /* Next Track */ 613 #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ 614 #define DIK_RCONTROL 0x9D 615 #define DIK_MUTE 0xA0 /* Mute */ 616 #define DIK_CALCULATOR 0xA1 /* Calculator */ 617 #define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ 618 #define DIK_MEDIASTOP 0xA4 /* Media Stop */ 619 #define DIK_VOLUMEDOWN 0xAE /* Volume - */ 620 #define DIK_VOLUMEUP 0xB0 /* Volume + */ 621 #define DIK_WEBHOME 0xB2 /* Web home */ 622 #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ 623 #define DIK_DIVIDE 0xB5 /* / on numeric keypad */ 624 #define DIK_SYSRQ 0xB7 625 #define DIK_RMENU 0xB8 /* right Alt */ 626 #define DIK_PAUSE 0xC5 /* Pause */ 627 #define DIK_HOME 0xC7 /* Home on arrow keypad */ 628 #define DIK_UP 0xC8 /* UpArrow on arrow keypad */ 629 #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ 630 #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ 631 #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ 632 #define DIK_END 0xCF /* End on arrow keypad */ 633 #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ 634 #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ 635 #define DIK_INSERT 0xD2 /* Insert on arrow keypad */ 636 #define DIK_DELETE 0xD3 /* Delete on arrow keypad */ 637 #define DIK_LWIN 0xDB /* Left Windows key */ 638 #define DIK_RWIN 0xDC /* Right Windows key */ 639 #define DIK_APPS 0xDD /* AppMenu key */ 640 #define DIK_POWER 0xDE 641 #define DIK_SLEEP 0xDF 642 #define DIK_WAKE 0xE3 /* System Wake */ 643 #define DIK_WEBSEARCH 0xE5 /* Web Search */ 644 #define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ 645 #define DIK_WEBREFRESH 0xE7 /* Web Refresh */ 646 #define DIK_WEBSTOP 0xE8 /* Web Stop */ 647 #define DIK_WEBFORWARD 0xE9 /* Web Forward */ 648 #define DIK_WEBBACK 0xEA /* Web Back */ 649 #define DIK_MYCOMPUTER 0xEB /* My Computer */ 650 #define DIK_MAIL 0xEC /* Mail */ 651 #define DIK_MEDIASELECT 0xED /* Media Select */ 652 653 #define DIK_BACKSPACE DIK_BACK /* backspace */ 654 #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ 655 #define DIK_LALT DIK_LMENU /* left Alt */ 656 #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ 657 #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ 658 #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ 659 #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ 660 #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ 661 #define DIK_RALT DIK_RMENU /* right Alt */ 662 #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ 663 #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ 664 #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ 665 #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ 666 #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ 667 #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ 668 669 #define DIDFT_ALL 0x00000000 670 #define DIDFT_RELAXIS 0x00000001 671 #define DIDFT_ABSAXIS 0x00000002 672 #define DIDFT_AXIS 0x00000003 673 #define DIDFT_PSHBUTTON 0x00000004 674 #define DIDFT_TGLBUTTON 0x00000008 675 #define DIDFT_BUTTON 0x0000000C 676 #define DIDFT_POV 0x00000010 677 #define DIDFT_COLLECTION 0x00000040 678 #define DIDFT_NODATA 0x00000080 679 #define DIDFT_ANYINSTANCE 0x00FFFF00 680 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE 681 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8) 682 #define DIDFT_GETTYPE(n) LOBYTE(n) 683 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8) 684 #define DIDFT_FFACTUATOR 0x01000000 685 #define DIDFT_FFEFFECTTRIGGER 0x02000000 686 #if DIRECTINPUT_VERSION >= 0x050a 687 #define DIDFT_OUTPUT 0x10000000 688 #define DIDFT_VENDORDEFINED 0x04000000 689 #define DIDFT_ALIAS 0x08000000 690 #endif /* DI5a */ 691 #ifndef DIDFT_OPTIONAL 692 #define DIDFT_OPTIONAL 0x80000000 693 #endif 694 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8) 695 #define DIDFT_NOCOLLECTION 0x00FFFF00 696 697 #define DIDF_ABSAXIS 0x00000001 698 #define DIDF_RELAXIS 0x00000002 699 700 #define DIGDD_PEEK 0x00000001 701 702 #define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0) 703 704 typedef struct DIDEVICEOBJECTDATA_DX3 { 705 DWORD dwOfs; 706 DWORD dwData; 707 DWORD dwTimeStamp; 708 DWORD dwSequence; 709 } DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3; 710 typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3; 711 712 typedef struct DIDEVICEOBJECTDATA { 713 DWORD dwOfs; 714 DWORD dwData; 715 DWORD dwTimeStamp; 716 DWORD dwSequence; 717 #if(DIRECTINPUT_VERSION >= 0x0800) 718 UINT_PTR uAppData; 719 #endif /* DIRECTINPUT_VERSION >= 0x0800 */ 720 } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA; 721 typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA; 722 723 typedef struct _DIOBJECTDATAFORMAT { 724 const GUID *pguid; 725 DWORD dwOfs; 726 DWORD dwType; 727 DWORD dwFlags; 728 } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT; 729 typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT; 730 731 typedef struct _DIDATAFORMAT { 732 DWORD dwSize; 733 DWORD dwObjSize; 734 DWORD dwFlags; 735 DWORD dwDataSize; 736 DWORD dwNumObjs; 737 LPDIOBJECTDATAFORMAT rgodf; 738 } DIDATAFORMAT, *LPDIDATAFORMAT; 739 typedef const DIDATAFORMAT *LPCDIDATAFORMAT; 740 741 #if DIRECTINPUT_VERSION >= 0x0500 742 #define DIDOI_FFACTUATOR 0x00000001 743 #define DIDOI_FFEFFECTTRIGGER 0x00000002 744 #define DIDOI_POLLED 0x00008000 745 #define DIDOI_ASPECTPOSITION 0x00000100 746 #define DIDOI_ASPECTVELOCITY 0x00000200 747 #define DIDOI_ASPECTACCEL 0x00000300 748 #define DIDOI_ASPECTFORCE 0x00000400 749 #define DIDOI_ASPECTMASK 0x00000F00 750 #endif /* DI5 */ 751 #if DIRECTINPUT_VERSION >= 0x050a 752 #define DIDOI_GUIDISUSAGE 0x00010000 753 #endif /* DI5a */ 754 755 typedef struct DIPROPHEADER { 756 DWORD dwSize; 757 DWORD dwHeaderSize; 758 DWORD dwObj; 759 DWORD dwHow; 760 } DIPROPHEADER,*LPDIPROPHEADER; 761 typedef const DIPROPHEADER *LPCDIPROPHEADER; 762 763 #define DIPH_DEVICE 0 764 #define DIPH_BYOFFSET 1 765 #define DIPH_BYID 2 766 #if DIRECTINPUT_VERSION >= 0x050a 767 #define DIPH_BYUSAGE 3 768 769 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage) 770 #endif /* DI5a */ 771 772 typedef struct DIPROPDWORD { 773 DIPROPHEADER diph; 774 DWORD dwData; 775 } DIPROPDWORD, *LPDIPROPDWORD; 776 typedef const DIPROPDWORD *LPCDIPROPDWORD; 777 778 typedef struct DIPROPRANGE { 779 DIPROPHEADER diph; 780 LONG lMin; 781 LONG lMax; 782 } DIPROPRANGE, *LPDIPROPRANGE; 783 typedef const DIPROPRANGE *LPCDIPROPRANGE; 784 785 #define DIPROPRANGE_NOMIN ((LONG)0x80000000) 786 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF) 787 788 #if DIRECTINPUT_VERSION >= 0x050a 789 typedef struct DIPROPCAL { 790 DIPROPHEADER diph; 791 LONG lMin; 792 LONG lCenter; 793 LONG lMax; 794 } DIPROPCAL, *LPDIPROPCAL; 795 typedef const DIPROPCAL *LPCDIPROPCAL; 796 797 typedef struct DIPROPCALPOV { 798 DIPROPHEADER diph; 799 LONG lMin[5]; 800 LONG lMax[5]; 801 } DIPROPCALPOV, *LPDIPROPCALPOV; 802 typedef const DIPROPCALPOV *LPCDIPROPCALPOV; 803 804 typedef struct DIPROPGUIDANDPATH { 805 DIPROPHEADER diph; 806 GUID guidClass; 807 WCHAR wszPath[MAX_PATH]; 808 } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH; 809 typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH; 810 811 typedef struct DIPROPSTRING { 812 DIPROPHEADER diph; 813 WCHAR wsz[MAX_PATH]; 814 } DIPROPSTRING, *LPDIPROPSTRING; 815 typedef const DIPROPSTRING *LPCDIPROPSTRING; 816 #endif /* DI5a */ 817 818 #if DIRECTINPUT_VERSION >= 0x0800 819 typedef struct DIPROPPOINTER { 820 DIPROPHEADER diph; 821 UINT_PTR uData; 822 } DIPROPPOINTER, *LPDIPROPPOINTER; 823 typedef const DIPROPPOINTER *LPCDIPROPPOINTER; 824 #endif /* DI8 */ 825 826 /* special property GUIDs */ 827 #ifdef __cplusplus 828 #define MAKEDIPROP(prop) (*(const GUID *)(prop)) 829 #else 830 #define MAKEDIPROP(prop) ((REFGUID)(prop)) 831 #endif 832 #define DIPROP_BUFFERSIZE MAKEDIPROP(1) 833 #define DIPROP_AXISMODE MAKEDIPROP(2) 834 835 #define DIPROPAXISMODE_ABS 0 836 #define DIPROPAXISMODE_REL 1 837 838 #define DIPROP_GRANULARITY MAKEDIPROP(3) 839 #define DIPROP_RANGE MAKEDIPROP(4) 840 #define DIPROP_DEADZONE MAKEDIPROP(5) 841 #define DIPROP_SATURATION MAKEDIPROP(6) 842 #define DIPROP_FFGAIN MAKEDIPROP(7) 843 #define DIPROP_FFLOAD MAKEDIPROP(8) 844 #define DIPROP_AUTOCENTER MAKEDIPROP(9) 845 846 #define DIPROPAUTOCENTER_OFF 0 847 #define DIPROPAUTOCENTER_ON 1 848 849 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10) 850 851 #define DIPROPCALIBRATIONMODE_COOKED 0 852 #define DIPROPCALIBRATIONMODE_RAW 1 853 854 #if DIRECTINPUT_VERSION >= 0x050a 855 #define DIPROP_CALIBRATION MAKEDIPROP(11) 856 #define DIPROP_GUIDANDPATH MAKEDIPROP(12) 857 #define DIPROP_INSTANCENAME MAKEDIPROP(13) 858 #define DIPROP_PRODUCTNAME MAKEDIPROP(14) 859 #endif 860 861 #if DIRECTINPUT_VERSION >= 0x5B2 862 #define DIPROP_JOYSTICKID MAKEDIPROP(15) 863 #define DIPROP_GETPORTDISPLAYNAME MAKEDIPROP(16) 864 #endif 865 866 #if DIRECTINPUT_VERSION >= 0x0700 867 #define DIPROP_PHYSICALRANGE MAKEDIPROP(18) 868 #define DIPROP_LOGICALRANGE MAKEDIPROP(19) 869 #endif 870 871 #if(DIRECTINPUT_VERSION >= 0x0800) 872 #define DIPROP_KEYNAME MAKEDIPROP(20) 873 #define DIPROP_CPOINTS MAKEDIPROP(21) 874 #define DIPROP_APPDATA MAKEDIPROP(22) 875 #define DIPROP_SCANCODE MAKEDIPROP(23) 876 #define DIPROP_VIDPID MAKEDIPROP(24) 877 #define DIPROP_USERNAME MAKEDIPROP(25) 878 #define DIPROP_TYPENAME MAKEDIPROP(26) 879 880 #define MAXCPOINTSNUM 8 881 882 typedef struct _CPOINT { 883 LONG lP; 884 DWORD dwLog; 885 } CPOINT, *PCPOINT; 886 887 typedef struct DIPROPCPOINTS { 888 DIPROPHEADER diph; 889 DWORD dwCPointsNum; 890 CPOINT cp[MAXCPOINTSNUM]; 891 } DIPROPCPOINTS, *LPDIPROPCPOINTS; 892 typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS; 893 #endif /* DI8 */ 894 895 896 typedef struct DIDEVCAPS_DX3 { 897 DWORD dwSize; 898 DWORD dwFlags; 899 DWORD dwDevType; 900 DWORD dwAxes; 901 DWORD dwButtons; 902 DWORD dwPOVs; 903 } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3; 904 905 typedef struct DIDEVCAPS { 906 DWORD dwSize; 907 DWORD dwFlags; 908 DWORD dwDevType; 909 DWORD dwAxes; 910 DWORD dwButtons; 911 DWORD dwPOVs; 912 #if(DIRECTINPUT_VERSION >= 0x0500) 913 DWORD dwFFSamplePeriod; 914 DWORD dwFFMinTimeResolution; 915 DWORD dwFirmwareRevision; 916 DWORD dwHardwareRevision; 917 DWORD dwFFDriverVersion; 918 #endif /* DIRECTINPUT_VERSION >= 0x0500 */ 919 } DIDEVCAPS,*LPDIDEVCAPS; 920 921 #define DIDC_ATTACHED 0x00000001 922 #define DIDC_POLLEDDEVICE 0x00000002 923 #define DIDC_EMULATED 0x00000004 924 #define DIDC_POLLEDDATAFORMAT 0x00000008 925 #define DIDC_FORCEFEEDBACK 0x00000100 926 #define DIDC_FFATTACK 0x00000200 927 #define DIDC_FFFADE 0x00000400 928 #define DIDC_SATURATION 0x00000800 929 #define DIDC_POSNEGCOEFFICIENTS 0x00001000 930 #define DIDC_POSNEGSATURATION 0x00002000 931 #define DIDC_DEADBAND 0x00004000 932 #define DIDC_STARTDELAY 0x00008000 933 #define DIDC_ALIAS 0x00010000 934 #define DIDC_PHANTOM 0x00020000 935 #define DIDC_HIDDEN 0x00040000 936 937 938 /* SetCooperativeLevel dwFlags */ 939 #define DISCL_EXCLUSIVE 0x00000001 940 #define DISCL_NONEXCLUSIVE 0x00000002 941 #define DISCL_FOREGROUND 0x00000004 942 #define DISCL_BACKGROUND 0x00000008 943 #define DISCL_NOWINKEY 0x00000010 944 945 #if (DIRECTINPUT_VERSION >= 0x0500) 946 /* Device FF flags */ 947 #define DISFFC_RESET 0x00000001 948 #define DISFFC_STOPALL 0x00000002 949 #define DISFFC_PAUSE 0x00000004 950 #define DISFFC_CONTINUE 0x00000008 951 #define DISFFC_SETACTUATORSON 0x00000010 952 #define DISFFC_SETACTUATORSOFF 0x00000020 953 954 #define DIGFFS_EMPTY 0x00000001 955 #define DIGFFS_STOPPED 0x00000002 956 #define DIGFFS_PAUSED 0x00000004 957 #define DIGFFS_ACTUATORSON 0x00000010 958 #define DIGFFS_ACTUATORSOFF 0x00000020 959 #define DIGFFS_POWERON 0x00000040 960 #define DIGFFS_POWEROFF 0x00000080 961 #define DIGFFS_SAFETYSWITCHON 0x00000100 962 #define DIGFFS_SAFETYSWITCHOFF 0x00000200 963 #define DIGFFS_USERFFSWITCHON 0x00000400 964 #define DIGFFS_USERFFSWITCHOFF 0x00000800 965 #define DIGFFS_DEVICELOST 0x80000000 966 967 /* Effect flags */ 968 #define DIEFT_ALL 0x00000000 969 970 #define DIEFT_CONSTANTFORCE 0x00000001 971 #define DIEFT_RAMPFORCE 0x00000002 972 #define DIEFT_PERIODIC 0x00000003 973 #define DIEFT_CONDITION 0x00000004 974 #define DIEFT_CUSTOMFORCE 0x00000005 975 #define DIEFT_HARDWARE 0x000000FF 976 #define DIEFT_FFATTACK 0x00000200 977 #define DIEFT_FFFADE 0x00000400 978 #define DIEFT_SATURATION 0x00000800 979 #define DIEFT_POSNEGCOEFFICIENTS 0x00001000 980 #define DIEFT_POSNEGSATURATION 0x00002000 981 #define DIEFT_DEADBAND 0x00004000 982 #define DIEFT_STARTDELAY 0x00008000 983 #define DIEFT_GETTYPE(n) LOBYTE(n) 984 985 #define DIEFF_OBJECTIDS 0x00000001 986 #define DIEFF_OBJECTOFFSETS 0x00000002 987 #define DIEFF_CARTESIAN 0x00000010 988 #define DIEFF_POLAR 0x00000020 989 #define DIEFF_SPHERICAL 0x00000040 990 991 #define DIEP_DURATION 0x00000001 992 #define DIEP_SAMPLEPERIOD 0x00000002 993 #define DIEP_GAIN 0x00000004 994 #define DIEP_TRIGGERBUTTON 0x00000008 995 #define DIEP_TRIGGERREPEATINTERVAL 0x00000010 996 #define DIEP_AXES 0x00000020 997 #define DIEP_DIRECTION 0x00000040 998 #define DIEP_ENVELOPE 0x00000080 999 #define DIEP_TYPESPECIFICPARAMS 0x00000100 1000 #if(DIRECTINPUT_VERSION >= 0x0600) 1001 #define DIEP_STARTDELAY 0x00000200 1002 #define DIEP_ALLPARAMS_DX5 0x000001FF 1003 #define DIEP_ALLPARAMS 0x000003FF 1004 #else 1005 #define DIEP_ALLPARAMS 0x000001FF 1006 #endif /* DIRECTINPUT_VERSION >= 0x0600 */ 1007 #define DIEP_START 0x20000000 1008 #define DIEP_NORESTART 0x40000000 1009 #define DIEP_NODOWNLOAD 0x80000000 1010 #define DIEB_NOTRIGGER 0xFFFFFFFF 1011 1012 #define DIES_SOLO 0x00000001 1013 #define DIES_NODOWNLOAD 0x80000000 1014 1015 #define DIEGES_PLAYING 0x00000001 1016 #define DIEGES_EMULATED 0x00000002 1017 1018 #define DI_DEGREES 100 1019 #define DI_FFNOMINALMAX 10000 1020 #define DI_SECONDS 1000000 1021 1022 typedef struct DICONSTANTFORCE { 1023 LONG lMagnitude; 1024 } DICONSTANTFORCE, *LPDICONSTANTFORCE; 1025 typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE; 1026 1027 typedef struct DIRAMPFORCE { 1028 LONG lStart; 1029 LONG lEnd; 1030 } DIRAMPFORCE, *LPDIRAMPFORCE; 1031 typedef const DIRAMPFORCE *LPCDIRAMPFORCE; 1032 1033 typedef struct DIPERIODIC { 1034 DWORD dwMagnitude; 1035 LONG lOffset; 1036 DWORD dwPhase; 1037 DWORD dwPeriod; 1038 } DIPERIODIC, *LPDIPERIODIC; 1039 typedef const DIPERIODIC *LPCDIPERIODIC; 1040 1041 typedef struct DICONDITION { 1042 LONG lOffset; 1043 LONG lPositiveCoefficient; 1044 LONG lNegativeCoefficient; 1045 DWORD dwPositiveSaturation; 1046 DWORD dwNegativeSaturation; 1047 LONG lDeadBand; 1048 } DICONDITION, *LPDICONDITION; 1049 typedef const DICONDITION *LPCDICONDITION; 1050 1051 typedef struct DICUSTOMFORCE { 1052 DWORD cChannels; 1053 DWORD dwSamplePeriod; 1054 DWORD cSamples; 1055 LPLONG rglForceData; 1056 } DICUSTOMFORCE, *LPDICUSTOMFORCE; 1057 typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE; 1058 1059 typedef struct DIENVELOPE { 1060 DWORD dwSize; 1061 DWORD dwAttackLevel; 1062 DWORD dwAttackTime; 1063 DWORD dwFadeLevel; 1064 DWORD dwFadeTime; 1065 } DIENVELOPE, *LPDIENVELOPE; 1066 typedef const DIENVELOPE *LPCDIENVELOPE; 1067 1068 typedef struct DIEFFECT_DX5 { 1069 DWORD dwSize; 1070 DWORD dwFlags; 1071 DWORD dwDuration; 1072 DWORD dwSamplePeriod; 1073 DWORD dwGain; 1074 DWORD dwTriggerButton; 1075 DWORD dwTriggerRepeatInterval; 1076 DWORD cAxes; 1077 LPDWORD rgdwAxes; 1078 LPLONG rglDirection; 1079 LPDIENVELOPE lpEnvelope; 1080 DWORD cbTypeSpecificParams; 1081 LPVOID lpvTypeSpecificParams; 1082 } DIEFFECT_DX5, *LPDIEFFECT_DX5; 1083 typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5; 1084 1085 typedef struct DIEFFECT { 1086 DWORD dwSize; 1087 DWORD dwFlags; 1088 DWORD dwDuration; 1089 DWORD dwSamplePeriod; 1090 DWORD dwGain; 1091 DWORD dwTriggerButton; 1092 DWORD dwTriggerRepeatInterval; 1093 DWORD cAxes; 1094 LPDWORD rgdwAxes; 1095 LPLONG rglDirection; 1096 LPDIENVELOPE lpEnvelope; 1097 DWORD cbTypeSpecificParams; 1098 LPVOID lpvTypeSpecificParams; 1099 #if(DIRECTINPUT_VERSION >= 0x0600) 1100 DWORD dwStartDelay; 1101 #endif /* DIRECTINPUT_VERSION >= 0x0600 */ 1102 } DIEFFECT, *LPDIEFFECT; 1103 typedef const DIEFFECT *LPCDIEFFECT; 1104 typedef DIEFFECT DIEFFECT_DX6; 1105 typedef LPDIEFFECT LPDIEFFECT_DX6; 1106 1107 typedef struct DIEFFECTINFOA { 1108 DWORD dwSize; 1109 GUID guid; 1110 DWORD dwEffType; 1111 DWORD dwStaticParams; 1112 DWORD dwDynamicParams; 1113 CHAR tszName[MAX_PATH]; 1114 } DIEFFECTINFOA, *LPDIEFFECTINFOA; 1115 typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA; 1116 1117 typedef struct DIEFFECTINFOW { 1118 DWORD dwSize; 1119 GUID guid; 1120 DWORD dwEffType; 1121 DWORD dwStaticParams; 1122 DWORD dwDynamicParams; 1123 WCHAR tszName[MAX_PATH]; 1124 } DIEFFECTINFOW, *LPDIEFFECTINFOW; 1125 typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW; 1126 1127 DECL_WINELIB_TYPE_AW(DIEFFECTINFO) 1128 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO) 1129 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO) 1130 1131 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID); 1132 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID); 1133 1134 typedef struct DIEFFESCAPE { 1135 DWORD dwSize; 1136 DWORD dwCommand; 1137 LPVOID lpvInBuffer; 1138 DWORD cbInBuffer; 1139 LPVOID lpvOutBuffer; 1140 DWORD cbOutBuffer; 1141 } DIEFFESCAPE, *LPDIEFFESCAPE; 1142 1143 typedef struct DIJOYSTATE { 1144 LONG lX; 1145 LONG lY; 1146 LONG lZ; 1147 LONG lRx; 1148 LONG lRy; 1149 LONG lRz; 1150 LONG rglSlider[2]; 1151 DWORD rgdwPOV[4]; 1152 BYTE rgbButtons[32]; 1153 } DIJOYSTATE, *LPDIJOYSTATE; 1154 1155 typedef struct DIJOYSTATE2 { 1156 LONG lX; 1157 LONG lY; 1158 LONG lZ; 1159 LONG lRx; 1160 LONG lRy; 1161 LONG lRz; 1162 LONG rglSlider[2]; 1163 DWORD rgdwPOV[4]; 1164 BYTE rgbButtons[128]; 1165 LONG lVX; /* 'v' as in velocity */ 1166 LONG lVY; 1167 LONG lVZ; 1168 LONG lVRx; 1169 LONG lVRy; 1170 LONG lVRz; 1171 LONG rglVSlider[2]; 1172 LONG lAX; /* 'a' as in acceleration */ 1173 LONG lAY; 1174 LONG lAZ; 1175 LONG lARx; 1176 LONG lARy; 1177 LONG lARz; 1178 LONG rglASlider[2]; 1179 LONG lFX; /* 'f' as in force */ 1180 LONG lFY; 1181 LONG lFZ; 1182 LONG lFRx; /* 'fr' as in rotational force aka torque */ 1183 LONG lFRy; 1184 LONG lFRz; 1185 LONG rglFSlider[2]; 1186 } DIJOYSTATE2, *LPDIJOYSTATE2; 1187 1188 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX) 1189 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY) 1190 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ) 1191 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx) 1192 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy) 1193 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz) 1194 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \ 1195 (n) * sizeof(LONG)) 1196 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \ 1197 (n) * sizeof(DWORD)) 1198 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n)) 1199 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0) 1200 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1) 1201 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2) 1202 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3) 1203 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4) 1204 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5) 1205 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6) 1206 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7) 1207 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8) 1208 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9) 1209 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10) 1210 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11) 1211 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12) 1212 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13) 1213 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14) 1214 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15) 1215 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16) 1216 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17) 1217 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18) 1218 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19) 1219 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20) 1220 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21) 1221 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22) 1222 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23) 1223 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24) 1224 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25) 1225 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26) 1226 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27) 1227 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28) 1228 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29) 1229 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30) 1230 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31) 1231 #endif /* DIRECTINPUT_VERSION >= 0x0500 */ 1232 1233 /* DInput 7 structures, types */ 1234 #if(DIRECTINPUT_VERSION >= 0x0700) 1235 typedef struct DIFILEEFFECT { 1236 DWORD dwSize; 1237 GUID GuidEffect; 1238 LPCDIEFFECT lpDiEffect; 1239 CHAR szFriendlyName[MAX_PATH]; 1240 } DIFILEEFFECT, *LPDIFILEEFFECT; 1241 1242 typedef const DIFILEEFFECT *LPCDIFILEEFFECT; 1243 typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID); 1244 #endif /* DIRECTINPUT_VERSION >= 0x0700 */ 1245 1246 /* DInput 8 structures and types */ 1247 #if DIRECTINPUT_VERSION >= 0x0800 1248 typedef struct _DIACTIONA { 1249 UINT_PTR uAppData; 1250 DWORD dwSemantic; 1251 DWORD dwFlags; 1252 __GNU_EXTENSION union { 1253 LPCSTR lptszActionName; 1254 UINT uResIdString; 1255 } DUMMYUNIONNAME; 1256 GUID guidInstance; 1257 DWORD dwObjID; 1258 DWORD dwHow; 1259 } DIACTIONA, *LPDIACTIONA; 1260 typedef const DIACTIONA *LPCDIACTIONA; 1261 1262 typedef struct _DIACTIONW { 1263 UINT_PTR uAppData; 1264 DWORD dwSemantic; 1265 DWORD dwFlags; 1266 __GNU_EXTENSION union { 1267 LPCWSTR lptszActionName; 1268 UINT uResIdString; 1269 } DUMMYUNIONNAME; 1270 GUID guidInstance; 1271 DWORD dwObjID; 1272 DWORD dwHow; 1273 } DIACTIONW, *LPDIACTIONW; 1274 typedef const DIACTIONW *LPCDIACTIONW; 1275 1276 DECL_WINELIB_TYPE_AW(DIACTION) 1277 DECL_WINELIB_TYPE_AW(LPDIACTION) 1278 DECL_WINELIB_TYPE_AW(LPCDIACTION) 1279 1280 #define DIA_FORCEFEEDBACK 0x00000001 1281 #define DIA_APPMAPPED 0x00000002 1282 #define DIA_APPNOMAP 0x00000004 1283 #define DIA_NORANGE 0x00000008 1284 #define DIA_APPFIXED 0x00000010 1285 1286 #define DIAH_UNMAPPED 0x00000000 1287 #define DIAH_USERCONFIG 0x00000001 1288 #define DIAH_APPREQUESTED 0x00000002 1289 #define DIAH_HWAPP 0x00000004 1290 #define DIAH_HWDEFAULT 0x00000008 1291 #define DIAH_DEFAULT 0x00000020 1292 #define DIAH_ERROR 0x80000000 1293 1294 typedef struct _DIACTIONFORMATA { 1295 DWORD dwSize; 1296 DWORD dwActionSize; 1297 DWORD dwDataSize; 1298 DWORD dwNumActions; 1299 LPDIACTIONA rgoAction; 1300 GUID guidActionMap; 1301 DWORD dwGenre; 1302 DWORD dwBufferSize; 1303 LONG lAxisMin; 1304 LONG lAxisMax; 1305 HINSTANCE hInstString; 1306 FILETIME ftTimeStamp; 1307 DWORD dwCRC; 1308 CHAR tszActionMap[MAX_PATH]; 1309 } DIACTIONFORMATA, *LPDIACTIONFORMATA; 1310 typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA; 1311 1312 typedef struct _DIACTIONFORMATW { 1313 DWORD dwSize; 1314 DWORD dwActionSize; 1315 DWORD dwDataSize; 1316 DWORD dwNumActions; 1317 LPDIACTIONW rgoAction; 1318 GUID guidActionMap; 1319 DWORD dwGenre; 1320 DWORD dwBufferSize; 1321 LONG lAxisMin; 1322 LONG lAxisMax; 1323 HINSTANCE hInstString; 1324 FILETIME ftTimeStamp; 1325 DWORD dwCRC; 1326 WCHAR tszActionMap[MAX_PATH]; 1327 } DIACTIONFORMATW, *LPDIACTIONFORMATW; 1328 typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW; 1329 1330 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT) 1331 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT) 1332 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT) 1333 1334 #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF 1335 #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF 1336 #define DIAFTS_UNUSEDDEVICELOW 0x00000000 1337 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000 1338 1339 #define DIDBAM_DEFAULT 0x00000000 1340 #define DIDBAM_PRESERVE 0x00000001 1341 #define DIDBAM_INITIALIZE 0x00000002 1342 #define DIDBAM_HWDEFAULTS 0x00000004 1343 1344 #define DIDSAM_DEFAULT 0x00000000 1345 #define DIDSAM_NOUSER 0x00000001 1346 #define DIDSAM_FORCESAVE 0x00000002 1347 1348 #define DICD_DEFAULT 0x00000000 1349 #define DICD_EDIT 0x00000001 1350 1351 #ifndef D3DCOLOR_DEFINED 1352 typedef DWORD D3DCOLOR; 1353 #define D3DCOLOR_DEFINED 1354 #endif 1355 1356 typedef struct _DICOLORSET { 1357 DWORD dwSize; 1358 D3DCOLOR cTextFore; 1359 D3DCOLOR cTextHighlight; 1360 D3DCOLOR cCalloutLine; 1361 D3DCOLOR cCalloutHighlight; 1362 D3DCOLOR cBorder; 1363 D3DCOLOR cControlFill; 1364 D3DCOLOR cHighlightFill; 1365 D3DCOLOR cAreaFill; 1366 } DICOLORSET, *LPDICOLORSET; 1367 typedef const DICOLORSET *LPCDICOLORSET; 1368 1369 typedef struct _DICONFIGUREDEVICESPARAMSA { 1370 DWORD dwSize; 1371 DWORD dwcUsers; 1372 LPSTR lptszUserNames; 1373 DWORD dwcFormats; 1374 LPDIACTIONFORMATA lprgFormats; 1375 HWND hwnd; 1376 DICOLORSET dics; 1377 LPUNKNOWN lpUnkDDSTarget; 1378 } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA; 1379 typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA; 1380 1381 typedef struct _DICONFIGUREDEVICESPARAMSW { 1382 DWORD dwSize; 1383 DWORD dwcUsers; 1384 LPWSTR lptszUserNames; 1385 DWORD dwcFormats; 1386 LPDIACTIONFORMATW lprgFormats; 1387 HWND hwnd; 1388 DICOLORSET dics; 1389 LPUNKNOWN lpUnkDDSTarget; 1390 } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW; 1391 typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW; 1392 1393 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS) 1394 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS) 1395 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS) 1396 1397 #define DIDIFT_CONFIGURATION 0x00000001 1398 #define DIDIFT_OVERLAY 0x00000002 1399 1400 #define DIDAL_CENTERED 0x00000000 1401 #define DIDAL_LEFTALIGNED 0x00000001 1402 #define DIDAL_RIGHTALIGNED 0x00000002 1403 #define DIDAL_MIDDLE 0x00000000 1404 #define DIDAL_TOPALIGNED 0x00000004 1405 #define DIDAL_BOTTOMALIGNED 0x00000008 1406 1407 typedef struct _DIDEVICEIMAGEINFOA { 1408 CHAR tszImagePath[MAX_PATH]; 1409 DWORD dwFlags; 1410 DWORD dwViewID; 1411 RECT rcOverlay; 1412 DWORD dwObjID; 1413 DWORD dwcValidPts; 1414 POINT rgptCalloutLine[5]; 1415 RECT rcCalloutRect; 1416 DWORD dwTextAlign; 1417 } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA; 1418 typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA; 1419 1420 typedef struct _DIDEVICEIMAGEINFOW { 1421 WCHAR tszImagePath[MAX_PATH]; 1422 DWORD dwFlags; 1423 DWORD dwViewID; 1424 RECT rcOverlay; 1425 DWORD dwObjID; 1426 DWORD dwcValidPts; 1427 POINT rgptCalloutLine[5]; 1428 RECT rcCalloutRect; 1429 DWORD dwTextAlign; 1430 } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW; 1431 typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW; 1432 1433 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO) 1434 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO) 1435 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO) 1436 1437 typedef struct _DIDEVICEIMAGEINFOHEADERA { 1438 DWORD dwSize; 1439 DWORD dwSizeImageInfo; 1440 DWORD dwcViews; 1441 DWORD dwcButtons; 1442 DWORD dwcAxes; 1443 DWORD dwcPOVs; 1444 DWORD dwBufferSize; 1445 DWORD dwBufferUsed; 1446 LPDIDEVICEIMAGEINFOA lprgImageInfoArray; 1447 } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA; 1448 typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA; 1449 1450 typedef struct _DIDEVICEIMAGEINFOHEADERW { 1451 DWORD dwSize; 1452 DWORD dwSizeImageInfo; 1453 DWORD dwcViews; 1454 DWORD dwcButtons; 1455 DWORD dwcAxes; 1456 DWORD dwcPOVs; 1457 DWORD dwBufferSize; 1458 DWORD dwBufferUsed; 1459 LPDIDEVICEIMAGEINFOW lprgImageInfoArray; 1460 } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW; 1461 typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW; 1462 1463 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER) 1464 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER) 1465 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER) 1466 1467 #endif /* DI8 */ 1468 1469 1470 /***************************************************************************** 1471 * IDirectInputEffect interface 1472 */ 1473 #if (DIRECTINPUT_VERSION >= 0x0500) 1474 #undef INTERFACE 1475 #define INTERFACE IDirectInputEffect 1476 DECLARE_INTERFACE_(IDirectInputEffect,IUnknown) 1477 { 1478 /*** IUnknown methods ***/ 1479 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1480 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1481 STDMETHOD_(ULONG,Release)(THIS) PURE; 1482 /*** IDirectInputEffect methods ***/ 1483 STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE; 1484 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE; 1485 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE; 1486 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE; 1487 STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE; 1488 STDMETHOD(Stop)(THIS) PURE; 1489 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE; 1490 STDMETHOD(Download)(THIS) PURE; 1491 STDMETHOD(Unload)(THIS) PURE; 1492 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; 1493 }; 1494 1495 #if !defined(__cplusplus) || defined(CINTERFACE) 1496 /*** IUnknown methods ***/ 1497 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 1498 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p) 1499 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p) 1500 /*** IDirectInputEffect methods ***/ 1501 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) 1502 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a) 1503 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b) 1504 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b) 1505 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b) 1506 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p) 1507 #define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a) 1508 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p) 1509 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p) 1510 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a) 1511 #else 1512 /*** IUnknown methods ***/ 1513 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 1514 #define IDirectInputEffect_AddRef(p) (p)->AddRef() 1515 #define IDirectInputEffect_Release(p) (p)->Release() 1516 /*** IDirectInputEffect methods ***/ 1517 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c) 1518 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a) 1519 #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b) 1520 #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b) 1521 #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b) 1522 #define IDirectInputEffect_Stop(p) (p)->Stop() 1523 #define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a) 1524 #define IDirectInputEffect_Download(p) (p)->Download() 1525 #define IDirectInputEffect_Unload(p) (p)->Unload() 1526 #define IDirectInputEffect_Escape(p,a) (p)->Escape(a) 1527 #endif 1528 1529 #endif /* DI5 */ 1530 1531 1532 /***************************************************************************** 1533 * IDirectInputDeviceA interface 1534 */ 1535 #undef INTERFACE 1536 #define INTERFACE IDirectInputDeviceA 1537 DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown) 1538 { 1539 /*** IUnknown methods ***/ 1540 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1541 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1542 STDMETHOD_(ULONG,Release)(THIS) PURE; 1543 /*** IDirectInputDeviceA methods ***/ 1544 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1545 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1546 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1547 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1548 STDMETHOD(Acquire)(THIS) PURE; 1549 STDMETHOD(Unacquire)(THIS) PURE; 1550 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1551 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1552 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1553 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1554 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1555 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1556 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; 1557 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1558 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1559 }; 1560 1561 /***************************************************************************** 1562 * IDirectInputDeviceW interface 1563 */ 1564 #undef INTERFACE 1565 #define INTERFACE IDirectInputDeviceW 1566 DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown) 1567 { 1568 /*** IUnknown methods ***/ 1569 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1570 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1571 STDMETHOD_(ULONG,Release)(THIS) PURE; 1572 /*** IDirectInputDeviceW methods ***/ 1573 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1574 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1575 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1576 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1577 STDMETHOD(Acquire)(THIS) PURE; 1578 STDMETHOD(Unacquire)(THIS) PURE; 1579 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1580 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1581 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1582 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1583 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1584 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1585 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; 1586 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1587 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1588 }; 1589 1590 #if !defined(__cplusplus) || defined(CINTERFACE) 1591 /*** IUnknown methods ***/ 1592 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 1593 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p) 1594 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p) 1595 /*** IDirectInputDevice methods ***/ 1596 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) 1597 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) 1598 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) 1599 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) 1600 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p) 1601 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p) 1602 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) 1603 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) 1604 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) 1605 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) 1606 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) 1607 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) 1608 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) 1609 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 1610 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) 1611 #else 1612 /*** IUnknown methods ***/ 1613 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 1614 #define IDirectInputDevice_AddRef(p) (p)->AddRef() 1615 #define IDirectInputDevice_Release(p) (p)->Release() 1616 /*** IDirectInputDevice methods ***/ 1617 #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a) 1618 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) 1619 #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b) 1620 #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b) 1621 #define IDirectInputDevice_Acquire(p) (p)->Acquire() 1622 #define IDirectInputDevice_Unacquire(p) (p)->Unacquire() 1623 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) 1624 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) 1625 #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a) 1626 #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a) 1627 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) 1628 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) 1629 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) 1630 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 1631 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c) 1632 #endif 1633 1634 1635 #if (DIRECTINPUT_VERSION >= 0x0500) 1636 /***************************************************************************** 1637 * IDirectInputDevice2A interface 1638 */ 1639 #undef INTERFACE 1640 #define INTERFACE IDirectInputDevice2A 1641 DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA) 1642 { 1643 /*** IUnknown methods ***/ 1644 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1645 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1646 STDMETHOD_(ULONG,Release)(THIS) PURE; 1647 /*** IDirectInputDeviceA methods ***/ 1648 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1649 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1650 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1651 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1652 STDMETHOD(Acquire)(THIS) PURE; 1653 STDMETHOD(Unacquire)(THIS) PURE; 1654 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1655 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1656 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1657 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1658 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1659 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1660 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; 1661 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1662 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1663 /*** IDirectInputDevice2A methods ***/ 1664 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; 1665 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; 1666 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; 1667 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; 1668 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; 1669 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; 1670 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; 1671 STDMETHOD(Poll)(THIS) PURE; 1672 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE; 1673 }; 1674 1675 /***************************************************************************** 1676 * IDirectInputDevice2W interface 1677 */ 1678 #undef INTERFACE 1679 #define INTERFACE IDirectInputDevice2W 1680 DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW) 1681 { 1682 /*** IUnknown methods ***/ 1683 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1684 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1685 STDMETHOD_(ULONG,Release)(THIS) PURE; 1686 /*** IDirectInputDeviceW methods ***/ 1687 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1688 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1689 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1690 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1691 STDMETHOD(Acquire)(THIS) PURE; 1692 STDMETHOD(Unacquire)(THIS) PURE; 1693 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1694 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1695 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1696 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1697 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1698 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1699 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; 1700 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1701 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1702 /*** IDirectInputDevice2W methods ***/ 1703 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; 1704 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; 1705 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE; 1706 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; 1707 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; 1708 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; 1709 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; 1710 STDMETHOD(Poll)(THIS) PURE; 1711 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE; 1712 }; 1713 1714 #if !defined(__cplusplus) || defined(CINTERFACE) 1715 /*** IUnknown methods ***/ 1716 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 1717 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p) 1718 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p) 1719 /*** IDirectInputDevice methods ***/ 1720 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) 1721 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) 1722 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) 1723 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) 1724 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p) 1725 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p) 1726 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) 1727 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) 1728 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) 1729 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) 1730 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) 1731 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) 1732 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) 1733 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 1734 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) 1735 /*** IDirectInputDevice2 methods ***/ 1736 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d) 1737 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c) 1738 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b) 1739 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a) 1740 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a) 1741 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c) 1742 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a) 1743 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p) 1744 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d) 1745 #else 1746 /*** IUnknown methods ***/ 1747 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 1748 #define IDirectInputDevice2_AddRef(p) (p)->AddRef() 1749 #define IDirectInputDevice2_Release(p) (p)->Release() 1750 /*** IDirectInputDevice methods ***/ 1751 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a) 1752 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) 1753 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b) 1754 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b) 1755 #define IDirectInputDevice2_Acquire(p) (p)->Acquire() 1756 #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire() 1757 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) 1758 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) 1759 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a) 1760 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a) 1761 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) 1762 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) 1763 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) 1764 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 1765 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c) 1766 /*** IDirectInputDevice2 methods ***/ 1767 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d) 1768 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c) 1769 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b) 1770 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a) 1771 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a) 1772 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c) 1773 #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a) 1774 #define IDirectInputDevice2_Poll(p) (p)->Poll() 1775 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d) 1776 #endif 1777 #endif /* DI5 */ 1778 1779 #if DIRECTINPUT_VERSION >= 0x0700 1780 /***************************************************************************** 1781 * IDirectInputDevice7A interface 1782 */ 1783 #undef INTERFACE 1784 #define INTERFACE IDirectInputDevice7A 1785 DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A) 1786 { 1787 /*** IUnknown methods ***/ 1788 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1789 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1790 STDMETHOD_(ULONG,Release)(THIS) PURE; 1791 /*** IDirectInputDeviceA methods ***/ 1792 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1793 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1794 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1795 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1796 STDMETHOD(Acquire)(THIS) PURE; 1797 STDMETHOD(Unacquire)(THIS) PURE; 1798 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1799 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1800 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1801 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1802 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1803 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1804 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; 1805 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1806 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1807 /*** IDirectInputDevice2A methods ***/ 1808 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; 1809 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; 1810 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; 1811 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; 1812 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; 1813 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; 1814 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; 1815 STDMETHOD(Poll)(THIS) PURE; 1816 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE; 1817 /*** IDirectInputDevice7A methods ***/ 1818 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; 1819 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE; 1820 }; 1821 1822 /***************************************************************************** 1823 * IDirectInputDevice7W interface 1824 */ 1825 #undef INTERFACE 1826 #define INTERFACE IDirectInputDevice7W 1827 DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W) 1828 { 1829 /*** IUnknown methods ***/ 1830 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1831 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1832 STDMETHOD_(ULONG,Release)(THIS) PURE; 1833 /*** IDirectInputDeviceW methods ***/ 1834 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1835 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1836 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1837 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1838 STDMETHOD(Acquire)(THIS) PURE; 1839 STDMETHOD(Unacquire)(THIS) PURE; 1840 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1841 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1842 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1843 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1844 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1845 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1846 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; 1847 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1848 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1849 /*** IDirectInputDevice2W methods ***/ 1850 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; 1851 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; 1852 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE; 1853 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; 1854 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; 1855 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; 1856 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; 1857 STDMETHOD(Poll)(THIS) PURE; 1858 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE; 1859 /*** IDirectInputDevice7W methods ***/ 1860 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; 1861 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE; 1862 }; 1863 1864 #if !defined(__cplusplus) || defined(CINTERFACE) 1865 /*** IUnknown methods ***/ 1866 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 1867 #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p) 1868 #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p) 1869 /*** IDirectInputDevice methods ***/ 1870 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) 1871 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) 1872 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) 1873 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) 1874 #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p) 1875 #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p) 1876 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) 1877 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) 1878 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) 1879 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) 1880 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) 1881 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) 1882 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) 1883 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 1884 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) 1885 /*** IDirectInputDevice2 methods ***/ 1886 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d) 1887 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c) 1888 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b) 1889 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a) 1890 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a) 1891 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c) 1892 #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a) 1893 #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p) 1894 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d) 1895 /*** IDirectInputDevice7 methods ***/ 1896 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d) 1897 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d) 1898 #else 1899 /*** IUnknown methods ***/ 1900 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 1901 #define IDirectInputDevice7_AddRef(p) (p)->AddRef() 1902 #define IDirectInputDevice7_Release(p) (p)->Release() 1903 /*** IDirectInputDevice methods ***/ 1904 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a) 1905 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) 1906 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b) 1907 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b) 1908 #define IDirectInputDevice7_Acquire(p) (p)->Acquire() 1909 #define IDirectInputDevice7_Unacquire(p) (p)->Unacquire() 1910 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) 1911 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) 1912 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a) 1913 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a) 1914 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) 1915 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) 1916 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) 1917 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 1918 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c) 1919 /*** IDirectInputDevice2 methods ***/ 1920 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d) 1921 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c) 1922 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b) 1923 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a) 1924 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a) 1925 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c) 1926 #define IDirectInputDevice7_Escape(p,a) (p)->Escape(a) 1927 #define IDirectInputDevice7_Poll(p) (p)->Poll() 1928 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d) 1929 /*** IDirectInputDevice7 methods ***/ 1930 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d) 1931 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d) 1932 #endif 1933 1934 #endif /* DI7 */ 1935 1936 #if DIRECTINPUT_VERSION >= 0x0800 1937 /***************************************************************************** 1938 * IDirectInputDevice8A interface 1939 */ 1940 #undef INTERFACE 1941 #define INTERFACE IDirectInputDevice8A 1942 DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A) 1943 { 1944 /*** IUnknown methods ***/ 1945 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1946 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1947 STDMETHOD_(ULONG,Release)(THIS) PURE; 1948 /*** IDirectInputDeviceA methods ***/ 1949 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1950 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1951 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1952 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1953 STDMETHOD(Acquire)(THIS) PURE; 1954 STDMETHOD(Unacquire)(THIS) PURE; 1955 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 1956 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 1957 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 1958 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 1959 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 1960 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; 1961 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; 1962 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 1963 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 1964 /*** IDirectInputDevice2A methods ***/ 1965 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; 1966 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; 1967 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; 1968 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; 1969 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; 1970 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; 1971 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; 1972 STDMETHOD(Poll)(THIS) PURE; 1973 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE; 1974 /*** IDirectInputDevice7A methods ***/ 1975 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; 1976 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE; 1977 /*** IDirectInputDevice8A methods ***/ 1978 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; 1979 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; 1980 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE; 1981 }; 1982 1983 /***************************************************************************** 1984 * IDirectInputDevice8W interface 1985 */ 1986 #undef INTERFACE 1987 #define INTERFACE IDirectInputDevice8W 1988 DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W) 1989 { 1990 /*** IUnknown methods ***/ 1991 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 1992 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 1993 STDMETHOD_(ULONG,Release)(THIS) PURE; 1994 /*** IDirectInputDeviceW methods ***/ 1995 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; 1996 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 1997 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; 1998 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; 1999 STDMETHOD(Acquire)(THIS) PURE; 2000 STDMETHOD(Unacquire)(THIS) PURE; 2001 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; 2002 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; 2003 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; 2004 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; 2005 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; 2006 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; 2007 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; 2008 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2009 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE; 2010 /*** IDirectInputDevice2W methods ***/ 2011 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; 2012 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; 2013 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE; 2014 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; 2015 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; 2016 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; 2017 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; 2018 STDMETHOD(Poll)(THIS) PURE; 2019 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE; 2020 /*** IDirectInputDevice7W methods ***/ 2021 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; 2022 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE; 2023 /*** IDirectInputDevice8W methods ***/ 2024 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; 2025 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; 2026 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE; 2027 }; 2028 2029 #if !defined(__cplusplus) || defined(CINTERFACE) 2030 /*** IUnknown methods ***/ 2031 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2032 #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p) 2033 #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p) 2034 /*** IDirectInputDevice methods ***/ 2035 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) 2036 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) 2037 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) 2038 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) 2039 #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p) 2040 #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p) 2041 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) 2042 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) 2043 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) 2044 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) 2045 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) 2046 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) 2047 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) 2048 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 2049 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) 2050 /*** IDirectInputDevice2 methods ***/ 2051 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d) 2052 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c) 2053 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b) 2054 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a) 2055 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a) 2056 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c) 2057 #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a) 2058 #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p) 2059 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d) 2060 /*** IDirectInputDevice7 methods ***/ 2061 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d) 2062 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d) 2063 /*** IDirectInputDevice8 methods ***/ 2064 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c) 2065 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c) 2066 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a) 2067 #else 2068 /*** IUnknown methods ***/ 2069 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 2070 #define IDirectInputDevice8_AddRef(p) (p)->AddRef() 2071 #define IDirectInputDevice8_Release(p) (p)->Release() 2072 /*** IDirectInputDevice methods ***/ 2073 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a) 2074 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) 2075 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b) 2076 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b) 2077 #define IDirectInputDevice8_Acquire(p) (p)->Acquire() 2078 #define IDirectInputDevice8_Unacquire(p) (p)->Unacquire() 2079 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) 2080 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) 2081 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a) 2082 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a) 2083 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) 2084 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) 2085 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) 2086 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 2087 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c) 2088 /*** IDirectInputDevice2 methods ***/ 2089 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d) 2090 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c) 2091 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b) 2092 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a) 2093 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a) 2094 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c) 2095 #define IDirectInputDevice8_Escape(p,a) (p)->Escape(a) 2096 #define IDirectInputDevice8_Poll(p) (p)->Poll() 2097 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d) 2098 /*** IDirectInputDevice7 methods ***/ 2099 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d) 2100 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d) 2101 /*** IDirectInputDevice8 methods ***/ 2102 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c) 2103 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c) 2104 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a) 2105 #endif 2106 2107 #endif /* DI8 */ 2108 2109 /* "Standard" Mouse report... */ 2110 typedef struct DIMOUSESTATE { 2111 LONG lX; 2112 LONG lY; 2113 LONG lZ; 2114 BYTE rgbButtons[4]; 2115 } DIMOUSESTATE; 2116 2117 #if DIRECTINPUT_VERSION >= 0x0700 2118 /* "Standard" Mouse report for DInput 7... */ 2119 typedef struct DIMOUSESTATE2 { 2120 LONG lX; 2121 LONG lY; 2122 LONG lZ; 2123 BYTE rgbButtons[8]; 2124 } DIMOUSESTATE2; 2125 #endif /* DI7 */ 2126 2127 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX) 2128 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY) 2129 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ) 2130 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0) 2131 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1) 2132 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2) 2133 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3) 2134 #if DIRECTINPUT_VERSION >= 0x0700 2135 #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4) 2136 #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5) 2137 #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6) 2138 #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7) 2139 #endif /* DI7 */ 2140 2141 #ifdef __cplusplus 2142 extern "C" { 2143 #endif 2144 extern const DIDATAFORMAT c_dfDIMouse; 2145 #if DIRECTINPUT_VERSION >= 0x0700 2146 extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */ 2147 #endif /* DI7 */ 2148 extern const DIDATAFORMAT c_dfDIKeyboard; 2149 #if DIRECTINPUT_VERSION >= 0x0500 2150 extern const DIDATAFORMAT c_dfDIJoystick; 2151 extern const DIDATAFORMAT c_dfDIJoystick2; 2152 #endif /* DI5 */ 2153 #ifdef __cplusplus 2154 }; 2155 #endif 2156 2157 /***************************************************************************** 2158 * IDirectInputA interface 2159 */ 2160 #undef INTERFACE 2161 #define INTERFACE IDirectInputA 2162 DECLARE_INTERFACE_(IDirectInputA,IUnknown) 2163 { 2164 /*** IUnknown methods ***/ 2165 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2166 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2167 STDMETHOD_(ULONG,Release)(THIS) PURE; 2168 /*** IDirectInputA methods ***/ 2169 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2170 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2171 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2172 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2173 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2174 }; 2175 2176 /***************************************************************************** 2177 * IDirectInputW interface 2178 */ 2179 #undef INTERFACE 2180 #define INTERFACE IDirectInputW 2181 DECLARE_INTERFACE_(IDirectInputW,IUnknown) 2182 { 2183 /*** IUnknown methods ***/ 2184 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2185 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2186 STDMETHOD_(ULONG,Release)(THIS) PURE; 2187 /*** IDirectInputW methods ***/ 2188 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2189 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2190 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2191 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2192 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2193 }; 2194 2195 #if !defined(__cplusplus) || defined(CINTERFACE) 2196 /*** IUnknown methods ***/ 2197 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2198 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p) 2199 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p) 2200 /*** IDirectInput methods ***/ 2201 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) 2202 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) 2203 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) 2204 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 2205 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) 2206 #else 2207 /*** IUnknown methods ***/ 2208 #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 2209 #define IDirectInput_AddRef(p) (p)->AddRef() 2210 #define IDirectInput_Release(p) (p)->Release() 2211 /*** IDirectInput methods ***/ 2212 #define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) 2213 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) 2214 #define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) 2215 #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 2216 #define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b) 2217 #endif 2218 2219 /***************************************************************************** 2220 * IDirectInput2A interface 2221 */ 2222 #undef INTERFACE 2223 #define INTERFACE IDirectInput2A 2224 DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA) 2225 { 2226 /*** IUnknown methods ***/ 2227 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2228 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2229 STDMETHOD_(ULONG,Release)(THIS) PURE; 2230 /*** IDirectInputA methods ***/ 2231 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2232 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2233 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2234 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2235 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2236 /*** IDirectInput2A methods ***/ 2237 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; 2238 }; 2239 2240 /***************************************************************************** 2241 * IDirectInput2W interface 2242 */ 2243 #undef INTERFACE 2244 #define INTERFACE IDirectInput2W 2245 DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW) 2246 { 2247 /*** IUnknown methods ***/ 2248 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2249 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2250 STDMETHOD_(ULONG,Release)(THIS) PURE; 2251 /*** IDirectInputW methods ***/ 2252 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2253 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2254 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2255 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2256 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2257 /*** IDirectInput2W methods ***/ 2258 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE; 2259 }; 2260 2261 #if !defined(__cplusplus) || defined(CINTERFACE) 2262 /*** IUnknown methods ***/ 2263 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2264 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p) 2265 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p) 2266 /*** IDirectInput methods ***/ 2267 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) 2268 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) 2269 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) 2270 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 2271 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) 2272 /*** IDirectInput2 methods ***/ 2273 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c) 2274 #else 2275 /*** IUnknown methods ***/ 2276 #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 2277 #define IDirectInput2_AddRef(p) (p)->AddRef() 2278 #define IDirectInput2_Release(p) (p)->Release() 2279 /*** IDirectInput methods ***/ 2280 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) 2281 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) 2282 #define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) 2283 #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 2284 #define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b) 2285 /*** IDirectInput2 methods ***/ 2286 #define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c) 2287 #endif 2288 2289 /***************************************************************************** 2290 * IDirectInput7A interface 2291 */ 2292 #undef INTERFACE 2293 #define INTERFACE IDirectInput7A 2294 DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A) 2295 { 2296 /*** IUnknown methods ***/ 2297 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2298 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2299 STDMETHOD_(ULONG,Release)(THIS) PURE; 2300 /*** IDirectInputA methods ***/ 2301 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2302 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2303 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2304 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2305 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2306 /*** IDirectInput2A methods ***/ 2307 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; 2308 /*** IDirectInput7A methods ***/ 2309 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE; 2310 }; 2311 2312 /***************************************************************************** 2313 * IDirectInput7W interface 2314 */ 2315 #undef INTERFACE 2316 #define INTERFACE IDirectInput7W 2317 DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W) 2318 { 2319 /*** IUnknown methods ***/ 2320 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2321 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2322 STDMETHOD_(ULONG,Release)(THIS) PURE; 2323 /*** IDirectInputW methods ***/ 2324 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2325 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2326 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2327 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2328 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2329 /*** IDirectInput2W methods ***/ 2330 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE; 2331 /*** IDirectInput7W methods ***/ 2332 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE; 2333 }; 2334 2335 #if !defined(__cplusplus) || defined(CINTERFACE) 2336 /*** IUnknown methods ***/ 2337 #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2338 #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p) 2339 #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p) 2340 /*** IDirectInput methods ***/ 2341 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) 2342 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) 2343 #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) 2344 #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 2345 #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) 2346 /*** IDirectInput2 methods ***/ 2347 #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c) 2348 /*** IDirectInput7 methods ***/ 2349 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d) 2350 #else 2351 /*** IUnknown methods ***/ 2352 #define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 2353 #define IDirectInput7_AddRef(p) (p)->AddRef() 2354 #define IDirectInput7_Release(p) (p)->Release() 2355 /*** IDirectInput methods ***/ 2356 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) 2357 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) 2358 #define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) 2359 #define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 2360 #define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b) 2361 /*** IDirectInput2 methods ***/ 2362 #define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c) 2363 /*** IDirectInput7 methods ***/ 2364 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d) 2365 #endif 2366 2367 2368 #if DIRECTINPUT_VERSION >= 0x0800 2369 /***************************************************************************** 2370 * IDirectInput8A interface 2371 */ 2372 #undef INTERFACE 2373 #define INTERFACE IDirectInput8A 2374 DECLARE_INTERFACE_(IDirectInput8A,IUnknown) 2375 { 2376 /*** IUnknown methods ***/ 2377 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2378 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2379 STDMETHOD_(ULONG,Release)(THIS) PURE; 2380 /*** IDirectInput8A methods ***/ 2381 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2382 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2383 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2384 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2385 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2386 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; 2387 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2388 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE; 2389 }; 2390 2391 /***************************************************************************** 2392 * IDirectInput8W interface 2393 */ 2394 #undef INTERFACE 2395 #define INTERFACE IDirectInput8W 2396 DECLARE_INTERFACE_(IDirectInput8W,IUnknown) 2397 { 2398 /*** IUnknown methods ***/ 2399 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 2400 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2401 STDMETHOD_(ULONG,Release)(THIS) PURE; 2402 /*** IDirectInput8W methods ***/ 2403 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; 2404 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2405 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; 2406 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; 2407 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; 2408 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE; 2409 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; 2410 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE; 2411 }; 2412 #undef INTERFACE 2413 2414 #if !defined(__cplusplus) || defined(CINTERFACE) 2415 /*** IUnknown methods ***/ 2416 #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2417 #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p) 2418 #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p) 2419 /*** IDirectInput8 methods ***/ 2420 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) 2421 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) 2422 #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) 2423 #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) 2424 #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) 2425 #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c) 2426 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e) 2427 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d) 2428 #else 2429 /*** IUnknown methods ***/ 2430 #define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) 2431 #define IDirectInput8_AddRef(p) (p)->AddRef() 2432 #define IDirectInput8_Release(p) (p)->Release() 2433 /*** IDirectInput8 methods ***/ 2434 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) 2435 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) 2436 #define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) 2437 #define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) 2438 #define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b) 2439 #define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c) 2440 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e) 2441 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d) 2442 #endif 2443 2444 #endif /* DI8 */ 2445 2446 /* Export functions */ 2447 2448 #ifdef __cplusplus 2449 extern "C" { 2450 #endif 2451 2452 #if DIRECTINPUT_VERSION >= 0x0800 2453 HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN); 2454 #else /* DI < 8 */ 2455 HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN); 2456 HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN); 2457 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate) 2458 2459 HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN); 2460 #endif /* DI8 */ 2461 2462 #ifdef __cplusplus 2463 }; 2464 #endif 2465 2466 #endif /* __DINPUT_INCLUDED__ */ 2467