- started infrastructure for proper multi-target support (active
[wine/dibdrv.git] / include / dinput.h
blob1ec6bfe86b8980ea3e963b6b1f9102f61e0dbce8
1 /*
2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_DINPUT_H
20 #define __WINE_DINPUT_H
22 #include <objbase.h>
24 #ifndef DIRECTINPUT_VERSION
25 #define DIRECTINPUT_VERSION 0x0800
26 #endif
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);
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);
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);
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);
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);
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);
90 typedef struct IDirectInputA IDirectInputA,*LPDIRECTINPUTA;
91 typedef struct IDirectInputW IDirectInputW,*LPDIRECTINPUTW;
92 typedef struct IDirectInput2A IDirectInput2A,*LPDIRECTINPUT2A;
93 typedef struct IDirectInput2W IDirectInput2W,*LPDIRECTINPUT2W;
94 typedef struct IDirectInput7A IDirectInput7A,*LPDIRECTINPUT7A;
95 typedef struct IDirectInput7W IDirectInput7W,*LPDIRECTINPUT7W;
96 typedef struct IDirectInput8A IDirectInput8A,*LPDIRECTINPUT8A;
97 typedef struct IDirectInput8W IDirectInput8W,*LPDIRECTINPUT8W;
98 typedef struct IDirectInputDeviceA IDirectInputDeviceA,*LPDIRECTINPUTDEVICEA;
99 typedef struct IDirectInputDeviceW IDirectInputDeviceW,*LPDIRECTINPUTDEVICEW;
100 typedef struct IDirectInputDevice2A IDirectInputDevice2A,*LPDIRECTINPUTDEVICE2A;
101 typedef struct IDirectInputDevice2W IDirectInputDevice2W,*LPDIRECTINPUTDEVICE2W;
102 typedef struct IDirectInputDevice7A IDirectInputDevice7A,*LPDIRECTINPUTDEVICE7A;
103 typedef struct IDirectInputDevice7W IDirectInputDevice7W,*LPDIRECTINPUTDEVICE7W;
104 typedef struct IDirectInputDevice8A IDirectInputDevice8A,*LPDIRECTINPUTDEVICE8A;
105 typedef struct IDirectInputDevice8W IDirectInputDevice8W,*LPDIRECTINPUTDEVICE8W;
106 typedef struct IDirectInputEffect IDirectInputEffect,*LPDIRECTINPUTEFFECT;
107 typedef struct SysKeyboardA SysKeyboardA,*LPSYSKEYBOARDA;
108 typedef struct SysMouseA SysMouseA,*LPSYSMOUSEA;
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)
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)
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
181 #define DIENUM_STOP 0
182 #define DIENUM_CONTINUE 1
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
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
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
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
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
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
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
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
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
265 #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
267 #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
268 #define DI8DEVTYPEJOYSTICK_STANDARD 2
270 #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
271 #define DI8DEVTYPEGAMEPAD_STANDARD 2
272 #define DI8DEVTYPEGAMEPAD_TILT 3
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
280 #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
281 #define DI8DEVTYPEFLIGHT_STICK 2
282 #define DI8DEVTYPEFLIGHT_YOKE 3
283 #define DI8DEVTYPEFLIGHT_RC 4
285 #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
286 #define DI8DEVTYPE1STPERSON_UNKNOWN 2
287 #define DI8DEVTYPE1STPERSON_SIXDOF 3
288 #define DI8DEVTYPE1STPERSON_SHOOTER 4
290 #define DI8DEVTYPESCREENPTR_UNKNOWN 2
291 #define DI8DEVTYPESCREENPTR_LIGHTGUN 3
292 #define DI8DEVTYPESCREENPTR_LIGHTPEN 4
293 #define DI8DEVTYPESCREENPTR_TOUCH 5
295 #define DI8DEVTYPEREMOTE_UNKNOWN 2
297 #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
298 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
299 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
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
314 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
315 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
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;
336 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)
337 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)
338 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)
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 DWORD dwFFMaxForce;
348 DWORD dwFFForceResolution;
349 WORD wCollectionNumber;
350 WORD wDesignatorIndex;
351 WORD wUsagePage;
352 WORD wUsage;
353 DWORD dwDimension;
354 WORD wExponent;
355 WORD wReserved;
356 } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
357 typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
359 typedef struct DIDEVICEOBJECTINSTANCEW {
360 DWORD dwSize;
361 GUID guidType;
362 DWORD dwOfs;
363 DWORD dwType;
364 DWORD dwFlags;
365 WCHAR tszName[MAX_PATH];
366 DWORD dwFFMaxForce;
367 DWORD dwFFForceResolution;
368 WORD wCollectionNumber;
369 WORD wDesignatorIndex;
370 WORD wUsagePage;
371 WORD wUsage;
372 DWORD dwDimension;
373 WORD wExponent;
374 WORD wReserved;
375 } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
376 typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
378 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
379 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
380 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
382 typedef struct DIDEVICEINSTANCE_DX3A {
383 DWORD dwSize;
384 GUID guidInstance;
385 GUID guidProduct;
386 DWORD dwDevType;
387 CHAR tszInstanceName[MAX_PATH];
388 CHAR tszProductName[MAX_PATH];
389 } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
390 typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
391 typedef struct DIDEVICEINSTANCE_DX3W {
392 DWORD dwSize;
393 GUID guidInstance;
394 GUID guidProduct;
395 DWORD dwDevType;
396 WCHAR tszInstanceName[MAX_PATH];
397 WCHAR tszProductName[MAX_PATH];
398 } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
399 typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
401 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)
402 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)
403 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)
405 typedef struct DIDEVICEINSTANCEA {
406 DWORD dwSize;
407 GUID guidInstance;
408 GUID guidProduct;
409 DWORD dwDevType;
410 CHAR tszInstanceName[MAX_PATH];
411 CHAR tszProductName[MAX_PATH];
412 GUID guidFFDriver;
413 WORD wUsagePage;
414 WORD wUsage;
415 } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
416 typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
418 typedef struct DIDEVICEINSTANCEW {
419 DWORD dwSize;
420 GUID guidInstance;
421 GUID guidProduct;
422 DWORD dwDevType;
423 WCHAR tszInstanceName[MAX_PATH];
424 WCHAR tszProductName[MAX_PATH];
425 GUID guidFFDriver;
426 WORD wUsagePage;
427 WORD wUsage;
428 } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
429 typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
431 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
432 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
433 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
435 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
436 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
437 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
439 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
440 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
441 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
443 typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
445 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
446 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
447 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
449 typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
451 #define DIK_ESCAPE 0x01
452 #define DIK_1 0x02
453 #define DIK_2 0x03
454 #define DIK_3 0x04
455 #define DIK_4 0x05
456 #define DIK_5 0x06
457 #define DIK_6 0x07
458 #define DIK_7 0x08
459 #define DIK_8 0x09
460 #define DIK_9 0x0A
461 #define DIK_0 0x0B
462 #define DIK_MINUS 0x0C /* - on main keyboard */
463 #define DIK_EQUALS 0x0D
464 #define DIK_BACK 0x0E /* backspace */
465 #define DIK_TAB 0x0F
466 #define DIK_Q 0x10
467 #define DIK_W 0x11
468 #define DIK_E 0x12
469 #define DIK_R 0x13
470 #define DIK_T 0x14
471 #define DIK_Y 0x15
472 #define DIK_U 0x16
473 #define DIK_I 0x17
474 #define DIK_O 0x18
475 #define DIK_P 0x19
476 #define DIK_LBRACKET 0x1A
477 #define DIK_RBRACKET 0x1B
478 #define DIK_RETURN 0x1C /* Enter on main keyboard */
479 #define DIK_LCONTROL 0x1D
480 #define DIK_A 0x1E
481 #define DIK_S 0x1F
482 #define DIK_D 0x20
483 #define DIK_F 0x21
484 #define DIK_G 0x22
485 #define DIK_H 0x23
486 #define DIK_J 0x24
487 #define DIK_K 0x25
488 #define DIK_L 0x26
489 #define DIK_SEMICOLON 0x27
490 #define DIK_APOSTROPHE 0x28
491 #define DIK_GRAVE 0x29 /* accent grave */
492 #define DIK_LSHIFT 0x2A
493 #define DIK_BACKSLASH 0x2B
494 #define DIK_Z 0x2C
495 #define DIK_X 0x2D
496 #define DIK_C 0x2E
497 #define DIK_V 0x2F
498 #define DIK_B 0x30
499 #define DIK_N 0x31
500 #define DIK_M 0x32
501 #define DIK_COMMA 0x33
502 #define DIK_PERIOD 0x34 /* . on main keyboard */
503 #define DIK_SLASH 0x35 /* / on main keyboard */
504 #define DIK_RSHIFT 0x36
505 #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
506 #define DIK_LMENU 0x38 /* left Alt */
507 #define DIK_SPACE 0x39
508 #define DIK_CAPITAL 0x3A
509 #define DIK_F1 0x3B
510 #define DIK_F2 0x3C
511 #define DIK_F3 0x3D
512 #define DIK_F4 0x3E
513 #define DIK_F5 0x3F
514 #define DIK_F6 0x40
515 #define DIK_F7 0x41
516 #define DIK_F8 0x42
517 #define DIK_F9 0x43
518 #define DIK_F10 0x44
519 #define DIK_NUMLOCK 0x45
520 #define DIK_SCROLL 0x46 /* Scroll Lock */
521 #define DIK_NUMPAD7 0x47
522 #define DIK_NUMPAD8 0x48
523 #define DIK_NUMPAD9 0x49
524 #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
525 #define DIK_NUMPAD4 0x4B
526 #define DIK_NUMPAD5 0x4C
527 #define DIK_NUMPAD6 0x4D
528 #define DIK_ADD 0x4E /* + on numeric keypad */
529 #define DIK_NUMPAD1 0x4F
530 #define DIK_NUMPAD2 0x50
531 #define DIK_NUMPAD3 0x51
532 #define DIK_NUMPAD0 0x52
533 #define DIK_DECIMAL 0x53 /* . on numeric keypad */
534 #define DIK_F11 0x57
535 #define DIK_F12 0x58
536 #define DIK_F13 0x64 /* (NEC PC98) */
537 #define DIK_F14 0x65 /* (NEC PC98) */
538 #define DIK_F15 0x66 /* (NEC PC98) */
539 #define DIK_KANA 0x70 /* (Japanese keyboard) */
540 #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
541 #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
542 #define DIK_YEN 0x7D /* (Japanese keyboard) */
543 #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
544 #define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
545 #define DIK_AT 0x91 /* (NEC PC98) */
546 #define DIK_COLON 0x92 /* (NEC PC98) */
547 #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
548 #define DIK_KANJI 0x94 /* (Japanese keyboard) */
549 #define DIK_STOP 0x95 /* (NEC PC98) */
550 #define DIK_AX 0x96 /* (Japan AX) */
551 #define DIK_UNLABELED 0x97 /* (J3100) */
552 #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
553 #define DIK_RCONTROL 0x9D
554 #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
555 #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
556 #define DIK_SYSRQ 0xB7
557 #define DIK_RMENU 0xB8 /* right Alt */
558 #define DIK_PAUSE 0xC5 /* Pause */
559 #define DIK_HOME 0xC7 /* Home on arrow keypad */
560 #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
561 #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
562 #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
563 #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
564 #define DIK_END 0xCF /* End on arrow keypad */
565 #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
566 #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
567 #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
568 #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
569 #define DIK_LWIN 0xDB /* Left Windows key */
570 #define DIK_RWIN 0xDC /* Right Windows key */
571 #define DIK_APPS 0xDD /* AppMenu key */
572 #define DIK_POWER 0xDE
573 #define DIK_SLEEP 0xDF
574 #define DIK_BACKSPACE DIK_BACK /* backspace */
575 #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
576 #define DIK_LALT DIK_LMENU /* left Alt */
577 #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
578 #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
579 #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
580 #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
581 #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
582 #define DIK_RALT DIK_RMENU /* right Alt */
583 #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
584 #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
585 #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
586 #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
587 #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
588 #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
590 #define DIDFT_ALL 0x00000000
591 #define DIDFT_RELAXIS 0x00000001
592 #define DIDFT_ABSAXIS 0x00000002
593 #define DIDFT_AXIS 0x00000003
594 #define DIDFT_PSHBUTTON 0x00000004
595 #define DIDFT_TGLBUTTON 0x00000008
596 #define DIDFT_BUTTON 0x0000000C
597 #define DIDFT_POV 0x00000010
598 #define DIDFT_COLLECTION 0x00000040
599 #define DIDFT_NODATA 0x00000080
600 #define DIDFT_ANYINSTANCE 0x00FFFF00
601 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
602 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
603 #define DIDFT_GETTYPE(n) LOBYTE(n)
604 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
605 #define DIDFT_FFACTUATOR 0x01000000
606 #define DIDFT_FFEFFECTTRIGGER 0x02000000
607 #define DIDFT_OUTPUT 0x10000000
608 #define DIDFT_VENDORDEFINED 0x04000000
609 #define DIDFT_ALIAS 0x08000000
610 #ifndef DIDFT_OPTIONAL
611 #define DIDFT_OPTIONAL 0x80000000
612 #endif
613 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
614 #define DIDFT_NOCOLLECTION 0x00FFFF00
615 #define DIDF_ABSAXIS 0x00000001
616 #define DIDF_RELAXIS 0x00000002
618 #define DIGDD_PEEK 0x00000001
620 typedef struct DIDEVICEOBJECTDATA_DX3 {
621 DWORD dwOfs;
622 DWORD dwData;
623 DWORD dwTimeStamp;
624 DWORD dwSequence;
625 } DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;
626 typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;
628 typedef struct DIDEVICEOBJECTDATA {
629 DWORD dwOfs;
630 DWORD dwData;
631 DWORD dwTimeStamp;
632 DWORD dwSequence;
633 UINT_PTR uAppData;
634 } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
635 typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
637 typedef struct _DIOBJECTDATAFORMAT {
638 const GUID *pguid;
639 DWORD dwOfs;
640 DWORD dwType;
641 DWORD dwFlags;
642 } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
643 typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
645 typedef struct _DIDATAFORMAT {
646 DWORD dwSize;
647 DWORD dwObjSize;
648 DWORD dwFlags;
649 DWORD dwDataSize;
650 DWORD dwNumObjs;
651 LPDIOBJECTDATAFORMAT rgodf;
652 } DIDATAFORMAT, *LPDIDATAFORMAT;
653 typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
655 #define DIDOI_FFACTUATOR 0x00000001
656 #define DIDOI_FFEFFECTTRIGGER 0x00000002
657 #define DIDOI_POLLED 0x00008000
658 #define DIDOI_ASPECTPOSITION 0x00000100
659 #define DIDOI_ASPECTVELOCITY 0x00000200
660 #define DIDOI_ASPECTACCEL 0x00000300
661 #define DIDOI_ASPECTFORCE 0x00000400
662 #define DIDOI_ASPECTMASK 0x00000F00
663 #define DIDOI_GUIDISUSAGE 0x00010000
665 typedef struct DIPROPHEADER {
666 DWORD dwSize;
667 DWORD dwHeaderSize;
668 DWORD dwObj;
669 DWORD dwHow;
670 } DIPROPHEADER,*LPDIPROPHEADER;
671 typedef const DIPROPHEADER *LPCDIPROPHEADER;
673 #define DIPH_DEVICE 0
674 #define DIPH_BYOFFSET 1
675 #define DIPH_BYID 2
676 #define DIPH_BYUSAGE 3
678 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
680 typedef struct DIPROPDWORD {
681 DIPROPHEADER diph;
682 DWORD dwData;
683 } DIPROPDWORD, *LPDIPROPDWORD;
684 typedef const DIPROPDWORD *LPCDIPROPDWORD;
686 typedef struct DIPROPRANGE {
687 DIPROPHEADER diph;
688 LONG lMin;
689 LONG lMax;
690 } DIPROPRANGE, *LPDIPROPRANGE;
691 typedef const DIPROPRANGE *LPCDIPROPRANGE;
693 #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
694 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
696 typedef struct DIPROPCAL {
697 DIPROPHEADER diph;
698 LONG lMin;
699 LONG lCenter;
700 LONG lMax;
701 } DIPROPCAL, *LPDIPROPCAL;
702 typedef const DIPROPCAL *LPCDIPROPCAL;
704 typedef struct DIPROPGUIDANDPATH {
705 DIPROPHEADER diph;
706 GUID guidClass;
707 WCHAR wszPath[MAX_PATH];
708 } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
709 typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
711 /* special property GUIDs */
712 #ifdef __cplusplus
713 #define MAKEDIPROP(prop) (*(const GUID *)(prop))
714 #else
715 #define MAKEDIPROP(prop) ((REFGUID)(prop))
716 #endif
717 #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
718 #define DIPROP_AXISMODE MAKEDIPROP(2)
720 #define DIPROPAXISMODE_ABS 0
721 #define DIPROPAXISMODE_REL 1
723 #define DIPROP_GRANULARITY MAKEDIPROP(3)
724 #define DIPROP_RANGE MAKEDIPROP(4)
725 #define DIPROP_DEADZONE MAKEDIPROP(5)
726 #define DIPROP_SATURATION MAKEDIPROP(6)
727 #define DIPROP_FFGAIN MAKEDIPROP(7)
728 #define DIPROP_FFLOAD MAKEDIPROP(8)
729 #define DIPROP_AUTOCENTER MAKEDIPROP(9)
731 #define DIPROPAUTOCENTER_OFF 0
732 #define DIPROPAUTOCENTER_ON 1
734 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
736 #define DIPROPCALIBRATIONMODE_COOKED 0
737 #define DIPROPCALIBRATIONMODE_RAW 1
739 #define DIPROP_CALIBRATION MAKEDIPROP(11)
740 #define DIPROP_GUIDANDPATH MAKEDIPROP(12)
742 typedef struct DIDEVCAPS_DX3 {
743 DWORD dwSize;
744 DWORD dwFlags;
745 DWORD dwDevType;
746 DWORD dwAxes;
747 DWORD dwButtons;
748 DWORD dwPOVs;
749 } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
751 typedef struct DIDEVCAPS {
752 DWORD dwSize;
753 DWORD dwFlags;
754 DWORD dwDevType;
755 DWORD dwAxes;
756 DWORD dwButtons;
757 DWORD dwPOVs;
758 DWORD dwFFSamplePeriod;
759 DWORD dwFFMinTimeResolution;
760 DWORD dwFirmwareRevision;
761 DWORD dwHardwareRevision;
762 DWORD dwFFDriverVersion;
763 } DIDEVCAPS,*LPDIDEVCAPS;
765 #define DIDC_ATTACHED 0x00000001
766 #define DIDC_POLLEDDEVICE 0x00000002
767 #define DIDC_EMULATED 0x00000004
768 #define DIDC_POLLEDDATAFORMAT 0x00000008
769 #define DIDC_FORCEFEEDBACK 0x00000100
770 #define DIDC_FFATTACK 0x00000200
771 #define DIDC_FFFADE 0x00000400
772 #define DIDC_SATURATION 0x00000800
773 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
774 #define DIDC_POSNEGSATURATION 0x00002000
775 #define DIDC_DEADBAND 0x00004000
776 #define DIDC_STARTDELAY 0x00008000
777 #define DIDC_ALIAS 0x00010000
778 #define DIDC_PHANTOM 0x00020000
779 #define DIDC_HIDDEN 0x00040000
782 /* SetCooperativeLevel dwFlags */
783 #define DISCL_EXCLUSIVE 0x00000001
784 #define DISCL_NONEXCLUSIVE 0x00000002
785 #define DISCL_FOREGROUND 0x00000004
786 #define DISCL_BACKGROUND 0x00000008
788 #define DIEFT_ALL 0x00000000
790 #define DIEFT_CONSTANTFORCE 0x00000001
791 #define DIEFT_RAMPFORCE 0x00000002
792 #define DIEFT_PERIODIC 0x00000003
793 #define DIEFT_CONDITION 0x00000004
794 #define DIEFT_CUSTOMFORCE 0x00000005
795 #define DIEFT_HARDWARE 0x000000FF
796 #define DIEFT_FFATTACK 0x00000200
797 #define DIEFT_FFFADE 0x00000400
798 #define DIEFT_SATURATION 0x00000800
799 #define DIEFT_POSNEGCOEFFICIENTS 0x00001000
800 #define DIEFT_POSNEGSATURATION 0x00002000
801 #define DIEFT_DEADBAND 0x00004000
802 #define DIEFT_STARTDELAY 0x00008000
803 #define DIEFT_GETTYPE(n) LOBYTE(n)
805 #define DI_DEGREES 100
806 #define DI_FFNOMINALMAX 10000
807 #define DI_SECONDS 1000000
809 typedef struct DICONSTANTFORCE {
810 LONG lMagnitude;
811 } DICONSTANTFORCE, *LPDICONSTANTFORCE;
812 typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
814 typedef struct DIRAMPFORCE {
815 LONG lStart;
816 LONG lEnd;
817 } DIRAMPFORCE, *LPDIRAMPFORCE;
818 typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
820 typedef struct DIPERIODIC {
821 DWORD dwMagnitude;
822 LONG lOffset;
823 DWORD dwPhase;
824 DWORD dwPeriod;
825 } DIPERIODIC, *LPDIPERIODIC;
826 typedef const DIPERIODIC *LPCDIPERIODIC;
828 typedef struct DICONDITION {
829 LONG lOffset;
830 LONG lPositiveCoefficient;
831 LONG lNegativeCoefficient;
832 DWORD dwPositiveSaturation;
833 DWORD dwNegativeSaturation;
834 LONG lDeadBand;
835 } DICONDITION, *LPDICONDITION;
836 typedef const DICONDITION *LPCDICONDITION;
838 typedef struct DICUSTOMFORCE {
839 DWORD cChannels;
840 DWORD dwSamplePeriod;
841 DWORD cSamples;
842 LPLONG rglForceData;
843 } DICUSTOMFORCE, *LPDICUSTOMFORCE;
844 typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
846 typedef struct DIENVELOPE {
847 DWORD dwSize;
848 DWORD dwAttackLevel;
849 DWORD dwAttackTime;
850 DWORD dwFadeLevel;
851 DWORD dwFadeTime;
852 } DIENVELOPE, *LPDIENVELOPE;
853 typedef const DIENVELOPE *LPCDIENVELOPE;
855 typedef struct DIEFFECT_DX5 {
856 DWORD dwSize;
857 DWORD dwFlags;
858 DWORD dwDuration;
859 DWORD dwSamplePeriod;
860 DWORD dwGain;
861 DWORD dwTriggerButton;
862 DWORD dwTriggerRepeatInterval;
863 DWORD cAxes;
864 LPDWORD rgdwAxes;
865 LPLONG rglDirection;
866 LPDIENVELOPE lpEnvelope;
867 DWORD cbTypeSpecificParams;
868 LPVOID lpvTypeSpecificParams;
869 } DIEFFECT_DX5, *LPDIEFFECT_DX5;
870 typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
872 typedef struct DIEFFECT {
873 DWORD dwSize;
874 DWORD dwFlags;
875 DWORD dwDuration;
876 DWORD dwSamplePeriod;
877 DWORD dwGain;
878 DWORD dwTriggerButton;
879 DWORD dwTriggerRepeatInterval;
880 DWORD cAxes;
881 LPDWORD rgdwAxes;
882 LPLONG rglDirection;
883 LPDIENVELOPE lpEnvelope;
884 DWORD cbTypeSpecificParams;
885 LPVOID lpvTypeSpecificParams;
886 DWORD dwStartDelay;
887 } DIEFFECT, *LPDIEFFECT;
888 typedef const DIEFFECT *LPCDIEFFECT;
889 typedef DIEFFECT DIEFFECT_DX6;
890 typedef LPDIEFFECT LPDIEFFECT_DX6;
892 typedef struct DIEFFECTINFOA {
893 DWORD dwSize;
894 GUID guid;
895 DWORD dwEffType;
896 DWORD dwStaticParams;
897 DWORD dwDynamicParams;
898 CHAR tszName[MAX_PATH];
899 } DIEFFECTINFOA, *LPDIEFFECTINFOA;
900 typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
902 typedef struct DIEFFECTINFOW {
903 DWORD dwSize;
904 GUID guid;
905 DWORD dwEffType;
906 DWORD dwStaticParams;
907 DWORD dwDynamicParams;
908 WCHAR tszName[MAX_PATH];
909 } DIEFFECTINFOW, *LPDIEFFECTINFOW;
910 typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
912 DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
913 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
914 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
916 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
917 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
919 typedef struct DIEFFESCAPE {
920 DWORD dwSize;
921 DWORD dwCommand;
922 LPVOID lpvInBuffer;
923 DWORD cbInBuffer;
924 LPVOID lpvOutBuffer;
925 DWORD cbOutBuffer;
926 } DIEFFESCAPE, *LPDIEFFESCAPE;
928 typedef struct DIJOYSTATE {
929 LONG lX;
930 LONG lY;
931 LONG lZ;
932 LONG lRx;
933 LONG lRy;
934 LONG lRz;
935 LONG rglSlider[2];
936 DWORD rgdwPOV[4];
937 BYTE rgbButtons[32];
938 } DIJOYSTATE, *LPDIJOYSTATE;
940 typedef struct DIJOYSTATE2 {
941 LONG lX;
942 LONG lY;
943 LONG lZ;
944 LONG lRx;
945 LONG lRy;
946 LONG lRz;
947 LONG rglSlider[2];
948 DWORD rgdwPOV[4];
949 BYTE rgbButtons[128];
950 LONG lVX; /* 'v' as in velocity */
951 LONG lVY;
952 LONG lVZ;
953 LONG lVRx;
954 LONG lVRy;
955 LONG lVRz;
956 LONG rglVSlider[2];
957 LONG lAX; /* 'a' as in acceleration */
958 LONG lAY;
959 LONG lAZ;
960 LONG lARx;
961 LONG lARy;
962 LONG lARz;
963 LONG rglASlider[2];
964 LONG lFX; /* 'f' as in force */
965 LONG lFY;
966 LONG lFZ;
967 LONG lFRx; /* 'fr' as in rotational force aka torque */
968 LONG lFRy;
969 LONG lFRz;
970 LONG rglFSlider[2];
971 } DIJOYSTATE2, *LPDIJOYSTATE2;
973 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
974 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
975 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
976 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
977 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
978 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
979 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
980 (n) * sizeof(LONG))
981 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
982 (n) * sizeof(DWORD))
983 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
984 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
985 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
986 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
987 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
988 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
989 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
990 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
991 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
992 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
993 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
994 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
995 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
996 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
997 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
998 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
999 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
1000 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
1001 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
1002 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
1003 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
1004 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
1005 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
1006 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
1007 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
1008 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
1009 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
1010 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
1011 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
1012 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
1013 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
1014 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
1015 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
1017 /* DInput 7 structures, types */
1018 typedef struct DIFILEEFFECT {
1019 DWORD dwSize;
1020 GUID GuidEffect;
1021 LPCDIEFFECT lpDiEffect;
1022 CHAR szFriendlyName[MAX_PATH];
1023 } DIFILEEFFECT, *LPDIFILEEFFECT;
1025 typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
1026 typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
1028 /* DInput 8 structures and types */
1029 typedef struct _DIACTIONA {
1030 UINT_PTR uAppData;
1031 DWORD dwSemantics;
1032 DWORD dwFlags;
1033 union {
1034 LPCSTR lptszActionName;
1035 UINT uResIdString;
1036 } DUMMYUNIONNAME;
1037 GUID guidInstance;
1038 DWORD dwObjID;
1039 DWORD dwHow;
1040 } DIACTIONA, *LPDIACTIONA;
1041 typedef const DIACTIONA *LPCDIACTIONA;
1043 typedef struct _DIACTIONW {
1044 UINT_PTR uAppData;
1045 DWORD dwSemantics;
1046 DWORD dwFlags;
1047 union {
1048 LPCWSTR lptszActionName;
1049 UINT uResIdString;
1050 } DUMMYUNIONNAME;
1051 GUID guidInstance;
1052 DWORD dwObjID;
1053 DWORD dwHow;
1054 } DIACTIONW, *LPDIACTIONW;
1055 typedef const DIACTIONW *LPCDIACTIONW;
1057 DECL_WINELIB_TYPE_AW(DIACTION)
1058 DECL_WINELIB_TYPE_AW(LPDIACTION)
1059 DECL_WINELIB_TYPE_AW(LPCDIACTION)
1061 #define DIA_FORCEFEEDBACK 0x00000001
1062 #define DIA_APPMAPPED 0x00000002
1063 #define DIA_APPNOMAP 0x00000004
1064 #define DIA_NORANGE 0x00000008
1065 #define DIA_APPFIXED 0x00000010
1067 #define DIAH_UNMAPPED 0x00000000
1068 #define DIAH_USERCONFIG 0x00000001
1069 #define DIAH_APPREQUESTED 0x00000002
1070 #define DIAH_HWAPP 0x00000004
1071 #define DIAH_HWDEFAULT 0x00000008
1072 #define DIAH_DEFAULT 0x00000020
1073 #define DIAH_ERROR 0x80000000
1075 typedef struct _DIACTIONFORMATA {
1076 DWORD dwSize;
1077 DWORD dwActionSize;
1078 DWORD dwDataSize;
1079 DWORD dwNumActions;
1080 LPDIACTIONA rgoAction;
1081 GUID guidActionMap;
1082 DWORD dwGenre;
1083 DWORD dwBufferSize;
1084 LONG lAxisMin;
1085 LONG lAxisMax;
1086 HINSTANCE hInstString;
1087 FILETIME ftTimeStamp;
1088 DWORD dwCRC;
1089 CHAR tszActionMap[MAX_PATH];
1090 } DIACTIONFORMATA, *LPDIACTIONFORMATA;
1091 typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
1093 typedef struct _DIACTIONFORMATW {
1094 DWORD dwSize;
1095 DWORD dwActionSize;
1096 DWORD dwDataSize;
1097 DWORD dwNumActions;
1098 LPDIACTIONW rgoAction;
1099 GUID guidActionMap;
1100 DWORD dwGenre;
1101 DWORD dwBufferSize;
1102 LONG lAxisMin;
1103 LONG lAxisMax;
1104 HINSTANCE hInstString;
1105 FILETIME ftTimeStamp;
1106 DWORD dwCRC;
1107 WCHAR tszActionMap[MAX_PATH];
1108 } DIACTIONFORMATW, *LPDIACTIONFORMATW;
1109 typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
1111 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
1112 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
1113 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
1115 #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
1116 #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
1117 #define DIAFTS_UNUSEDDEVICELOW 0x00000000
1118 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
1120 #define DIDBAM_DEFAULT 0x00000000
1121 #define DIDBAM_PRESERVE 0x00000001
1122 #define DIDBAM_INITIALIZE 0x00000002
1123 #define DIDBAM_HWDEFAULTS 0x00000004
1125 #define DIDSAM_DEFAULT 0x00000000
1126 #define DIDSAM_NOUSER 0x00000001
1127 #define DIDSAM_FORCESAVE 0x00000002
1129 #define DICD_DEFAULT 0x00000000
1130 #define DICD_EDIT 0x00000001
1132 #ifndef D3DCOLOR_DEFINED
1133 typedef DWORD D3DCOLOR;
1134 #define D3DCOLOR_DEFINED
1135 #endif
1137 typedef struct _DICOLORSET {
1138 DWORD dwSize;
1139 D3DCOLOR cTextFore;
1140 D3DCOLOR cTextHighlight;
1141 D3DCOLOR cCalloutLine;
1142 D3DCOLOR cCalloutHighlight;
1143 D3DCOLOR cBorder;
1144 D3DCOLOR cControlFill;
1145 D3DCOLOR cHighlightFill;
1146 D3DCOLOR cAreaFill;
1147 } DICOLORSET, *LPDICOLORSET;
1148 typedef const DICOLORSET *LPCDICOLORSET;
1150 typedef struct _DICONFIGUREDEVICESPARAMSA {
1151 DWORD dwSize;
1152 DWORD dwcUsers;
1153 LPSTR lptszUserNames;
1154 DWORD dwcFormats;
1155 LPDIACTIONFORMATA lprgFormats;
1156 HWND hwnd;
1157 DICOLORSET dics;
1158 LPUNKNOWN lpUnkDDSTarget;
1159 } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
1160 typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
1162 typedef struct _DICONFIGUREDEVICESPARAMSW {
1163 DWORD dwSize;
1164 DWORD dwcUsers;
1165 LPWSTR lptszUserNames;
1166 DWORD dwcFormats;
1167 LPDIACTIONFORMATW lprgFormats;
1168 HWND hwnd;
1169 DICOLORSET dics;
1170 LPUNKNOWN lpUnkDDSTarget;
1171 } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
1172 typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
1174 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
1175 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
1176 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
1178 #define DIDIFT_CONFIGURATION 0x00000001
1179 #define DIDIFT_OVERLAY 0x00000002
1181 #define DIDAL_CENTERED 0x00000000
1182 #define DIDAL_LEFTALIGNED 0x00000001
1183 #define DIDAL_RIGHTALIGNED 0x00000002
1184 #define DIDAL_MIDDLE 0x00000000
1185 #define DIDAL_TOPALIGNED 0x00000004
1186 #define DIDAL_BOTTOMALIGNED 0x00000008
1188 typedef struct _DIDEVICEIMAGEINFOA {
1189 CHAR tszImagePath[MAX_PATH];
1190 DWORD dwFlags;
1191 DWORD dwViewID;
1192 RECT rcOverlay;
1193 DWORD dwObjID;
1194 DWORD dwcValidPts;
1195 POINT rgptCalloutLine[5];
1196 RECT rcCalloutRect;
1197 DWORD dwTextAlign;
1198 } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
1199 typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
1201 typedef struct _DIDEVICEIMAGEINFOW {
1202 WCHAR tszImagePath[MAX_PATH];
1203 DWORD dwFlags;
1204 DWORD dwViewID;
1205 RECT rcOverlay;
1206 DWORD dwObjID;
1207 DWORD dwcValidPts;
1208 POINT rgptCalloutLine[5];
1209 RECT rcCalloutRect;
1210 DWORD dwTextAlign;
1211 } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
1212 typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
1214 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
1215 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
1216 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
1218 typedef struct _DIDEVICEIMAGEINFOHEADERA {
1219 DWORD dwSize;
1220 DWORD dwSizeImageInfo;
1221 DWORD dwcViews;
1222 DWORD dwcButtons;
1223 DWORD dwcAxes;
1224 DWORD dwcPOVs;
1225 DWORD dwBufferSize;
1226 DWORD dwBufferUsed;
1227 LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
1228 } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
1229 typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
1231 typedef struct _DIDEVICEIMAGEINFOHEADERW {
1232 DWORD dwSize;
1233 DWORD dwSizeImageInfo;
1234 DWORD dwcViews;
1235 DWORD dwcButtons;
1236 DWORD dwcAxes;
1237 DWORD dwcPOVs;
1238 DWORD dwBufferSize;
1239 DWORD dwBufferUsed;
1240 LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
1241 } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
1242 typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
1244 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
1245 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
1246 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
1249 /*****************************************************************************
1250 * IDirectInputEffect interface
1252 #define INTERFACE IDirectInputEffect
1253 DECLARE_INTERFACE_(IDirectInputEffect,IUnknown)
1255 /*** IUnknown methods ***/
1256 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1257 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1258 STDMETHOD_(ULONG,Release)(THIS) PURE;
1259 /*** IDirectInputEffect methods ***/
1260 STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;
1261 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
1262 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;
1263 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;
1264 STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;
1265 STDMETHOD(Stop)(THIS) PURE;
1266 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
1267 STDMETHOD(Download)(THIS) PURE;
1268 STDMETHOD(Unload)(THIS) PURE;
1269 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1271 #undef INTERFACE
1273 #if !defined(__cplusplus) || defined(CINTERFACE)
1274 /*** IUnknown methods ***/
1275 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1276 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
1277 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
1278 /*** IDirectInputEffect methods ***/
1279 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1280 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
1281 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
1282 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
1283 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
1284 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
1285 #define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->lpVtbl->GetEffectStatus(p,a)
1286 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
1287 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
1288 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1289 #else
1290 /*** IUnknown methods ***/
1291 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1292 #define IDirectInputEffect_AddRef(p) (p)->AddRef()
1293 #define IDirectInputEffect_Release(p) (p)->Release()
1294 /*** IDirectInputEffect methods ***/
1295 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1296 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
1297 #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
1298 #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
1299 #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
1300 #define IDirectInputEffect_Stop(p) (p)->Stop()
1301 #define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->GetEffectStatus(a)
1302 #define IDirectInputEffect_Download(p) (p)->Download()
1303 #define IDirectInputEffect_Unload(p) (p)->Unload()
1304 #define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
1305 #endif
1308 /*****************************************************************************
1309 * IDirectInputDeviceA interface
1311 #define INTERFACE IDirectInputDeviceA
1312 DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)
1314 /*** IUnknown methods ***/
1315 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1316 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1317 STDMETHOD_(ULONG,Release)(THIS) PURE;
1318 /*** IDirectInputDeviceA methods ***/
1319 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1320 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1321 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1322 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1323 STDMETHOD(Acquire)(THIS) PURE;
1324 STDMETHOD(Unacquire)(THIS) PURE;
1325 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1326 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1327 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1328 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1329 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1330 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1331 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1332 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1333 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1335 #undef INTERFACE
1337 /*****************************************************************************
1338 * IDirectInputDeviceW interface
1340 #define INTERFACE IDirectInputDeviceW
1341 DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)
1343 /*** IUnknown methods ***/
1344 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1345 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1346 STDMETHOD_(ULONG,Release)(THIS) PURE;
1347 /*** IDirectInputDeviceW methods ***/
1348 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1349 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1350 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1351 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1352 STDMETHOD(Acquire)(THIS) PURE;
1353 STDMETHOD(Unacquire)(THIS) PURE;
1354 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1355 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1356 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1357 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1358 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1359 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1360 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1361 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1362 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1364 #undef INTERFACE
1366 #if !defined(__cplusplus) || defined(CINTERFACE)
1367 /*** IUnknown methods ***/
1368 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1369 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
1370 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
1371 /*** IDirectInputDevice methods ***/
1372 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1373 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1374 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1375 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1376 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
1377 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1378 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1379 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1380 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1381 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1382 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1383 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1384 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1385 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1386 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1387 #else
1388 /*** IUnknown methods ***/
1389 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1390 #define IDirectInputDevice_AddRef(p) (p)->AddRef()
1391 #define IDirectInputDevice_Release(p) (p)->Release()
1392 /*** IDirectInputDevice methods ***/
1393 #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
1394 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1395 #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
1396 #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
1397 #define IDirectInputDevice_Acquire(p) (p)->Acquire()
1398 #define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
1399 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1400 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1401 #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
1402 #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
1403 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1404 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1405 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1406 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1407 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1408 #endif
1411 /*****************************************************************************
1412 * IDirectInputDevice2A interface
1414 #define INTERFACE IDirectInputDevice2A
1415 DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)
1417 /*** IUnknown methods ***/
1418 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1419 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1420 STDMETHOD_(ULONG,Release)(THIS) PURE;
1421 /*** IDirectInputDeviceA methods ***/
1422 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1423 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1424 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1425 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1426 STDMETHOD(Acquire)(THIS) PURE;
1427 STDMETHOD(Unacquire)(THIS) PURE;
1428 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1429 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1430 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1431 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1432 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1433 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1434 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1435 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1436 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1437 /*** IDirectInputDevice2A methods ***/
1438 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1439 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1440 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
1441 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1442 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1443 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1444 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1445 STDMETHOD(Poll)(THIS) PURE;
1446 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1448 #undef INTERFACE
1450 /*****************************************************************************
1451 * IDirectInputDevice2W interface
1453 #define INTERFACE IDirectInputDevice2W
1454 DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)
1456 /*** IUnknown methods ***/
1457 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1458 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1459 STDMETHOD_(ULONG,Release)(THIS) PURE;
1460 /*** IDirectInputDeviceW methods ***/
1461 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1462 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1463 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1464 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1465 STDMETHOD(Acquire)(THIS) PURE;
1466 STDMETHOD(Unacquire)(THIS) PURE;
1467 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1468 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1469 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1470 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1471 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1472 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1473 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1474 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1475 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1476 /*** IDirectInputDevice2W methods ***/
1477 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1478 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1479 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
1480 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1481 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1482 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1483 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1484 STDMETHOD(Poll)(THIS) PURE;
1485 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1487 #undef INTERFACE
1489 #if !defined(__cplusplus) || defined(CINTERFACE)
1490 /*** IUnknown methods ***/
1491 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1492 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
1493 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
1494 /*** IDirectInputDevice methods ***/
1495 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1496 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1497 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1498 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1499 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
1500 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1501 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1502 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1503 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1504 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1505 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1506 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1507 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1508 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1509 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1510 /*** IDirectInputDevice2 methods ***/
1511 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1512 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1513 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1514 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1515 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1516 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1517 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1518 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
1519 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1520 #else
1521 /*** IUnknown methods ***/
1522 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1523 #define IDirectInputDevice2_AddRef(p) (p)->AddRef()
1524 #define IDirectInputDevice2_Release(p) (p)->Release()
1525 /*** IDirectInputDevice methods ***/
1526 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
1527 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1528 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
1529 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
1530 #define IDirectInputDevice2_Acquire(p) (p)->Acquire()
1531 #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
1532 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1533 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1534 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
1535 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
1536 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1537 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1538 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1539 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1540 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1541 /*** IDirectInputDevice2 methods ***/
1542 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1543 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1544 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1545 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1546 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1547 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1548 #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
1549 #define IDirectInputDevice2_Poll(p) (p)->Poll()
1550 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1551 #endif
1553 /*****************************************************************************
1554 * IDirectInputDevice7A interface
1556 #define INTERFACE IDirectInputDevice7A
1557 DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)
1559 /*** IUnknown methods ***/
1560 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1561 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1562 STDMETHOD_(ULONG,Release)(THIS) PURE;
1563 /*** IDirectInputDeviceA methods ***/
1564 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1565 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1566 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1567 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1568 STDMETHOD(Acquire)(THIS) PURE;
1569 STDMETHOD(Unacquire)(THIS) PURE;
1570 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1571 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1572 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1573 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1574 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1575 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1576 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1577 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1578 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1579 /*** IDirectInputDevice2A methods ***/
1580 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1581 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1582 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
1583 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1584 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1585 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1586 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1587 STDMETHOD(Poll)(THIS) PURE;
1588 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1589 /*** IDirectInputDevice7A methods ***/
1590 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1591 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1593 #undef INTERFACE
1595 /*****************************************************************************
1596 * IDirectInputDevice7W interface
1598 #define INTERFACE IDirectInputDevice7W
1599 DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)
1601 /*** IUnknown methods ***/
1602 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1603 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1604 STDMETHOD_(ULONG,Release)(THIS) PURE;
1605 /*** IDirectInputDeviceW methods ***/
1606 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1607 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1608 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1609 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1610 STDMETHOD(Acquire)(THIS) PURE;
1611 STDMETHOD(Unacquire)(THIS) PURE;
1612 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1613 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1614 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1615 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1616 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1617 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1618 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1619 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1620 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1621 /*** IDirectInputDevice2W methods ***/
1622 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1623 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1624 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
1625 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1626 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1627 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1628 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1629 STDMETHOD(Poll)(THIS) PURE;
1630 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1631 /*** IDirectInputDevice7W methods ***/
1632 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1633 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1635 #undef INTERFACE
1637 #if !defined(__cplusplus) || defined(CINTERFACE)
1638 /*** IUnknown methods ***/
1639 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1640 #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
1641 #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
1642 /*** IDirectInputDevice methods ***/
1643 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1644 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1645 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1646 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1647 #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
1648 #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1649 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1650 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1651 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1652 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1653 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1654 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1655 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1656 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1657 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1658 /*** IDirectInputDevice2 methods ***/
1659 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1660 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1661 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1662 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1663 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1664 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1665 #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1666 #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
1667 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1668 /*** IDirectInputDevice7 methods ***/
1669 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1670 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1671 #else
1672 /*** IUnknown methods ***/
1673 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1674 #define IDirectInputDevice7_AddRef(p) (p)->AddRef()
1675 #define IDirectInputDevice7_Release(p) (p)->Release()
1676 /*** IDirectInputDevice methods ***/
1677 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
1678 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1679 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
1680 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
1681 #define IDirectInputDevice7_Acquire(p) (p)->Acquire()
1682 #define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
1683 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1684 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1685 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
1686 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
1687 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1688 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1689 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1690 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1691 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1692 /*** IDirectInputDevice2 methods ***/
1693 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1694 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1695 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1696 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1697 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1698 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1699 #define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
1700 #define IDirectInputDevice7_Poll(p) (p)->Poll()
1701 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1702 /*** IDirectInputDevice7 methods ***/
1703 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
1704 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
1705 #endif
1708 /*****************************************************************************
1709 * IDirectInputDevice8A interface
1711 #define INTERFACE IDirectInputDevice8A
1712 DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)
1714 /*** IUnknown methods ***/
1715 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1716 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1717 STDMETHOD_(ULONG,Release)(THIS) PURE;
1718 /*** IDirectInputDeviceA methods ***/
1719 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1720 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1721 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1722 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1723 STDMETHOD(Acquire)(THIS) PURE;
1724 STDMETHOD(Unacquire)(THIS) PURE;
1725 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1726 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1727 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1728 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1729 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1730 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1731 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1732 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1733 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1734 /*** IDirectInputDevice2A methods ***/
1735 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1736 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1737 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
1738 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1739 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1740 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1741 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1742 STDMETHOD(Poll)(THIS) PURE;
1743 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1744 /*** IDirectInputDevice7A methods ***/
1745 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1746 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1747 /*** IDirectInputDevice8A methods ***/
1748 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
1749 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
1750 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
1752 #undef INTERFACE
1754 /*****************************************************************************
1755 * IDirectInputDevice8W interface
1757 #define INTERFACE IDirectInputDevice8W
1758 DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)
1760 /*** IUnknown methods ***/
1761 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1762 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1763 STDMETHOD_(ULONG,Release)(THIS) PURE;
1764 /*** IDirectInputDeviceW methods ***/
1765 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1766 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1767 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1768 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1769 STDMETHOD(Acquire)(THIS) PURE;
1770 STDMETHOD(Unacquire)(THIS) PURE;
1771 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1772 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1773 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1774 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1775 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1776 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1777 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1778 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1779 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1780 /*** IDirectInputDevice2W methods ***/
1781 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1782 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1783 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
1784 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1785 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1786 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1787 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1788 STDMETHOD(Poll)(THIS) PURE;
1789 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1790 /*** IDirectInputDevice7W methods ***/
1791 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1792 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1793 /*** IDirectInputDevice8W methods ***/
1794 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
1795 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
1796 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
1798 #undef INTERFACE
1800 #if !defined(__cplusplus) || defined(CINTERFACE)
1801 /*** IUnknown methods ***/
1802 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1803 #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
1804 #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
1805 /*** IDirectInputDevice methods ***/
1806 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1807 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1808 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1809 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1810 #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
1811 #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1812 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1813 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1814 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1815 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1816 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1817 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1818 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1819 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1820 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1821 /*** IDirectInputDevice2 methods ***/
1822 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1823 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1824 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1825 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1826 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1827 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1828 #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1829 #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
1830 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1831 /*** IDirectInputDevice7 methods ***/
1832 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1833 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1834 /*** IDirectInputDevice8 methods ***/
1835 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
1836 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
1837 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
1838 #else
1839 /*** IUnknown methods ***/
1840 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1841 #define IDirectInputDevice8_AddRef(p) (p)->AddRef()
1842 #define IDirectInputDevice8_Release(p) (p)->Release()
1843 /*** IDirectInputDevice methods ***/
1844 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
1845 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1846 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
1847 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
1848 #define IDirectInputDevice8_Acquire(p) (p)->Acquire()
1849 #define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
1850 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1851 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1852 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
1853 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
1854 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1855 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1856 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1857 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1858 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1859 /*** IDirectInputDevice2 methods ***/
1860 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1861 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1862 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1863 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1864 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1865 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1866 #define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
1867 #define IDirectInputDevice8_Poll(p) (p)->Poll()
1868 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1869 /*** IDirectInputDevice7 methods ***/
1870 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
1871 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
1872 /*** IDirectInputDevice8 methods ***/
1873 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
1874 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
1875 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
1876 #endif
1878 /* "Standard" Mouse report... */
1879 typedef struct DIMOUSESTATE {
1880 LONG lX;
1881 LONG lY;
1882 LONG lZ;
1883 BYTE rgbButtons[4];
1884 } DIMOUSESTATE;
1886 /* "Standard" Mouse report for DInput 7... */
1887 typedef struct DIMOUSESTATE2 {
1888 LONG lX;
1889 LONG lY;
1890 LONG lZ;
1891 BYTE rgbButtons[8];
1892 } DIMOUSESTATE2;
1894 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
1895 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
1896 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
1897 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1898 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1899 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1900 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1901 #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
1902 #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
1903 #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
1904 #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
1906 #ifdef __cplusplus
1907 extern "C" {
1908 #endif
1909 extern const DIDATAFORMAT c_dfDIMouse;
1910 extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
1911 extern const DIDATAFORMAT c_dfDIKeyboard;
1912 extern const DIDATAFORMAT c_dfDIJoystick;
1913 extern const DIDATAFORMAT c_dfDIJoystick2;
1914 #ifdef __cplusplus
1916 #endif
1918 /*****************************************************************************
1919 * IDirectInputA interface
1921 #define INTERFACE IDirectInputA
1922 DECLARE_INTERFACE_(IDirectInputA,IUnknown)
1924 /*** IUnknown methods ***/
1925 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1926 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1927 STDMETHOD_(ULONG,Release)(THIS) PURE;
1928 /*** IDirectInputA methods ***/
1929 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
1930 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1931 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
1932 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1933 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1935 #undef INTERFACE
1937 /*****************************************************************************
1938 * IDirectInputW interface
1940 #define INTERFACE IDirectInputW
1941 DECLARE_INTERFACE_(IDirectInputW,IUnknown)
1943 /*** IUnknown methods ***/
1944 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1945 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1946 STDMETHOD_(ULONG,Release)(THIS) PURE;
1947 /*** IDirectInputW methods ***/
1948 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
1949 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1950 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
1951 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1952 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1954 #undef INTERFACE
1956 #if !defined(__cplusplus) || defined(CINTERFACE)
1957 /*** IUnknown methods ***/
1958 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1959 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
1960 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
1961 /*** IDirectInput methods ***/
1962 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1963 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1964 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1965 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1966 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1967 #else
1968 /*** IUnknown methods ***/
1969 #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1970 #define IDirectInput_AddRef(p) (p)->AddRef()
1971 #define IDirectInput_Release(p) (p)->Release()
1972 /*** IDirectInput methods ***/
1973 #define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
1974 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
1975 #define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
1976 #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1977 #define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
1978 #endif
1980 /*****************************************************************************
1981 * IDirectInput2A interface
1983 #define INTERFACE IDirectInput2A
1984 DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)
1986 /*** IUnknown methods ***/
1987 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1988 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1989 STDMETHOD_(ULONG,Release)(THIS) PURE;
1990 /*** IDirectInputA methods ***/
1991 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
1992 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1993 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
1994 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1995 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1996 /*** IDirectInput2A methods ***/
1997 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
1999 #undef INTERFACE
2001 /*****************************************************************************
2002 * IDirectInput2W interface
2004 #define INTERFACE IDirectInput2W
2005 DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)
2007 /*** IUnknown methods ***/
2008 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2009 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2010 STDMETHOD_(ULONG,Release)(THIS) PURE;
2011 /*** IDirectInputW methods ***/
2012 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2013 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2014 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2015 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2016 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2017 /*** IDirectInput2W methods ***/
2018 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
2020 #undef INTERFACE
2022 #if !defined(__cplusplus) || defined(CINTERFACE)
2023 /*** IUnknown methods ***/
2024 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2025 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
2026 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
2027 /*** IDirectInput methods ***/
2028 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2029 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2030 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2031 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2032 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2033 /*** IDirectInput2 methods ***/
2034 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
2035 #else
2036 /*** IUnknown methods ***/
2037 #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2038 #define IDirectInput2_AddRef(p) (p)->AddRef()
2039 #define IDirectInput2_Release(p) (p)->Release()
2040 /*** IDirectInput methods ***/
2041 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2042 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2043 #define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2044 #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2045 #define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
2046 /*** IDirectInput2 methods ***/
2047 #define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
2048 #endif
2050 /*****************************************************************************
2051 * IDirectInput7A interface
2053 #define INTERFACE IDirectInput7A
2054 DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)
2056 /*** IUnknown methods ***/
2057 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2058 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2059 STDMETHOD_(ULONG,Release)(THIS) PURE;
2060 /*** IDirectInputA methods ***/
2061 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2062 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2063 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2064 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2065 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2066 /*** IDirectInput2A methods ***/
2067 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
2068 /*** IDirectInput7A methods ***/
2069 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
2071 #undef INTERFACE
2073 /*****************************************************************************
2074 * IDirectInput7W interface
2076 #define INTERFACE IDirectInput7W
2077 DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)
2079 /*** IUnknown methods ***/
2080 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2081 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2082 STDMETHOD_(ULONG,Release)(THIS) PURE;
2083 /*** IDirectInputW methods ***/
2084 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2085 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2086 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2087 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2088 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2089 /*** IDirectInput2W methods ***/
2090 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
2091 /*** IDirectInput7W methods ***/
2092 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
2094 #undef INTERFACE
2096 #if !defined(__cplusplus) || defined(CINTERFACE)
2097 /*** IUnknown methods ***/
2098 #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2099 #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
2100 #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
2101 /*** IDirectInput methods ***/
2102 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2103 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2104 #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2105 #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2106 #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2107 /*** IDirectInput2 methods ***/
2108 #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
2109 /*** IDirectInput7 methods ***/
2110 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
2111 #else
2112 /*** IUnknown methods ***/
2113 #define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2114 #define IDirectInput7_AddRef(p) (p)->AddRef()
2115 #define IDirectInput7_Release(p) (p)->Release()
2116 /*** IDirectInput methods ***/
2117 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2118 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2119 #define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2120 #define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2121 #define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b)
2122 /*** IDirectInput2 methods ***/
2123 #define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
2124 /*** IDirectInput7 methods ***/
2125 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
2126 #endif
2129 /*****************************************************************************
2130 * IDirectInput8A interface
2132 #define INTERFACE IDirectInput8A
2133 DECLARE_INTERFACE_(IDirectInput8A,IUnknown)
2135 /*** IUnknown methods ***/
2136 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2137 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2138 STDMETHOD_(ULONG,Release)(THIS) PURE;
2139 /*** IDirectInput8A methods ***/
2140 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2141 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2142 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2143 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2144 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2145 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
2146 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2147 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
2149 #undef INTERFACE
2151 /*****************************************************************************
2152 * IDirectInput8W interface
2154 #define INTERFACE IDirectInput8W
2155 DECLARE_INTERFACE_(IDirectInput8W,IUnknown)
2157 /*** IUnknown methods ***/
2158 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2159 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2160 STDMETHOD_(ULONG,Release)(THIS) PURE;
2161 /*** IDirectInput8W methods ***/
2162 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2163 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2164 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2165 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2166 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2167 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
2168 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2169 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
2171 #undef INTERFACE
2173 #if !defined(__cplusplus) || defined(CINTERFACE)
2174 /*** IUnknown methods ***/
2175 #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2176 #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
2177 #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
2178 /*** IDirectInput8 methods ***/
2179 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2180 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2181 #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2182 #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2183 #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2184 #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
2185 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
2186 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
2187 #else
2188 /*** IUnknown methods ***/
2189 #define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2190 #define IDirectInput8_AddRef(p) (p)->AddRef()
2191 #define IDirectInput8_Release(p) (p)->Release()
2192 /*** IDirectInput8 methods ***/
2193 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2194 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2195 #define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2196 #define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2197 #define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b)
2198 #define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
2199 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
2200 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
2201 #endif
2204 /* Export functions */
2206 #ifdef __cplusplus
2207 extern "C" {
2208 #endif
2210 HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
2212 HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
2213 HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);
2214 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
2216 HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
2218 #ifdef __cplusplus
2220 #endif
2222 #endif /* __WINE_DINPUT_H */