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