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