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
24 #ifndef DIRECTINPUT_VERSION
25 #define DIRECTINPUT_VERSION 0x0800
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);
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);
72 /* predefined forcefeedback effects */
73 DEFINE_GUID(GUID_ConstantForce
, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
74 DEFINE_GUID(GUID_RampForce
, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
75 DEFINE_GUID(GUID_Square
, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
76 DEFINE_GUID(GUID_Sine
, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
77 DEFINE_GUID(GUID_Triangle
, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
78 DEFINE_GUID(GUID_SawtoothUp
, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
79 DEFINE_GUID(GUID_SawtoothDown
, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
80 DEFINE_GUID(GUID_Spring
, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
81 DEFINE_GUID(GUID_Damper
, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
82 DEFINE_GUID(GUID_Inertia
, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
83 DEFINE_GUID(GUID_Friction
, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
84 DEFINE_GUID(GUID_CustomForce
, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
86 typedef struct IDirectInputA IDirectInputA
,*LPDIRECTINPUTA
;
87 typedef struct IDirectInputW IDirectInputW
,*LPDIRECTINPUTW
;
88 typedef struct IDirectInput2A IDirectInput2A
,*LPDIRECTINPUT2A
;
89 typedef struct IDirectInput2W IDirectInput2W
,*LPDIRECTINPUT2W
;
90 typedef struct IDirectInput7A IDirectInput7A
,*LPDIRECTINPUT7A
;
91 typedef struct IDirectInput7W IDirectInput7W
,*LPDIRECTINPUT7W
;
92 typedef struct IDirectInput8A IDirectInput8A
,*LPDIRECTINPUT8A
;
93 typedef struct IDirectInput8W IDirectInput8W
,*LPDIRECTINPUT8W
;
94 typedef struct IDirectInputDeviceA IDirectInputDeviceA
,*LPDIRECTINPUTDEVICEA
;
95 typedef struct IDirectInputDeviceW IDirectInputDeviceW
,*LPDIRECTINPUTDEVICEW
;
96 typedef struct IDirectInputDevice2A IDirectInputDevice2A
,*LPDIRECTINPUTDEVICE2A
;
97 typedef struct IDirectInputDevice2W IDirectInputDevice2W
,*LPDIRECTINPUTDEVICE2W
;
98 typedef struct IDirectInputDevice7A IDirectInputDevice7A
,*LPDIRECTINPUTDEVICE7A
;
99 typedef struct IDirectInputDevice7W IDirectInputDevice7W
,*LPDIRECTINPUTDEVICE7W
;
100 typedef struct IDirectInputDevice8A IDirectInputDevice8A
,*LPDIRECTINPUTDEVICE8A
;
101 typedef struct IDirectInputDevice8W IDirectInputDevice8W
,*LPDIRECTINPUTDEVICE8W
;
102 typedef struct IDirectInputEffect IDirectInputEffect
,*LPDIRECTINPUTEFFECT
;
103 typedef struct SysKeyboardA SysKeyboardA
,*LPSYSKEYBOARDA
;
104 typedef struct SysMouseA SysMouseA
,*LPSYSMOUSEA
;
106 #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
107 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT
)
108 #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
109 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2
)
110 #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
111 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7
)
112 #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
113 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE
)
114 #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
115 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2
)
116 #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
117 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7
)
118 #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
119 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8
)
122 #define DI_NOTATTACHED S_FALSE
123 #define DI_BUFFEROVERFLOW S_FALSE
124 #define DI_PROPNOEFFECT S_FALSE
125 #define DI_NOEFFECT S_FALSE
126 #define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
127 #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
128 #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
129 #define DI_TRUNCATED ((HRESULT)0x00000008L)
130 #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
132 #define DIERR_OLDDIRECTINPUTVERSION \
133 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
134 #define DIERR_BETADIRECTINPUTVERSION \
135 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
136 #define DIERR_BADDRIVERVER \
137 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
138 #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
139 #define DIERR_NOTFOUND \
140 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
141 #define DIERR_OBJECTNOTFOUND \
142 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
143 #define DIERR_INVALIDPARAM E_INVALIDARG
144 #define DIERR_NOINTERFACE E_NOINTERFACE
145 #define DIERR_GENERIC E_FAIL
146 #define DIERR_OUTOFMEMORY E_OUTOFMEMORY
147 #define DIERR_UNSUPPORTED E_NOTIMPL
148 #define DIERR_NOTINITIALIZED \
149 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
150 #define DIERR_ALREADYINITIALIZED \
151 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
152 #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
153 #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
154 #define DIERR_INPUTLOST \
155 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
156 #define DIERR_ACQUIRED \
157 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
158 #define DIERR_NOTACQUIRED \
159 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
160 #define DIERR_READONLY E_ACCESSDENIED
161 #define DIERR_HANDLEEXISTS E_ACCESSDENIED
163 #define E_PENDING 0x8000000AL
165 #define DIERR_INSUFFICIENTPRIVS 0x80040200L
166 #define DIERR_DEVICEFULL 0x80040201L
167 #define DIERR_MOREDATA 0x80040202L
168 #define DIERR_NOTDOWNLOADED 0x80040203L
169 #define DIERR_HASEFFECTS 0x80040204L
170 #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
171 #define DIERR_INCOMPLETEEFFECT 0x80040206L
172 #define DIERR_NOTBUFFERED 0x80040207L
173 #define DIERR_EFFECTPLAYING 0x80040208L
174 #define DIERR_UNPLUGGED 0x80040209L
175 #define DIERR_REPORTFULL 0x8004020AL
177 #define DIENUM_STOP 0
178 #define DIENUM_CONTINUE 1
180 #define DIEDFL_ALLDEVICES 0x00000000
181 #define DIEDFL_ATTACHEDONLY 0x00000000
182 #define DIEDFL_FORCEFEEDBACK 0x00000100
183 #define DIEDFL_INCLUDEALIASES 0x00010000
184 #define DIEDFL_INCLUDEPHANTOMS 0x00020000
185 #define DIEDFL_INCLUDEHIDDEN 0x00040000
187 #define DIDEVTYPE_DEVICE 1
188 #define DIDEVTYPE_MOUSE 2
189 #define DIDEVTYPE_KEYBOARD 3
190 #define DIDEVTYPE_JOYSTICK 4
191 #define DIDEVTYPE_HID 0x00010000
193 #define DI8DEVCLASS_ALL 0
194 #define DI8DEVCLASS_DEVICE 1
195 #define DI8DEVCLASS_POINTER 2
196 #define DI8DEVCLASS_KEYBOARD 3
197 #define DI8DEVCLASS_GAMECTRL 4
199 #define DI8DEVTYPE_DEVICE 0x11
200 #define DI8DEVTYPE_MOUSE 0x12
201 #define DI8DEVTYPE_KEYBOARD 0x13
202 #define DI8DEVTYPE_JOYSTICK 0x14
203 #define DI8DEVTYPE_GAMEPAD 0x15
204 #define DI8DEVTYPE_DRIVING 0x16
205 #define DI8DEVTYPE_FLIGHT 0x17
206 #define DI8DEVTYPE_1STPERSON 0x18
207 #define DI8DEVTYPE_DEVICECTRL 0x19
208 #define DI8DEVTYPE_SCREENPOINTER 0x1A
209 #define DI8DEVTYPE_REMOTE 0x1B
210 #define DI8DEVTYPE_SUPPLEMENTAL 0x1C
212 #define DIDEVTYPEMOUSE_UNKNOWN 1
213 #define DIDEVTYPEMOUSE_TRADITIONAL 2
214 #define DIDEVTYPEMOUSE_FINGERSTICK 3
215 #define DIDEVTYPEMOUSE_TOUCHPAD 4
216 #define DIDEVTYPEMOUSE_TRACKBALL 5
218 #define DIDEVTYPEKEYBOARD_UNKNOWN 0
219 #define DIDEVTYPEKEYBOARD_PCXT 1
220 #define DIDEVTYPEKEYBOARD_OLIVETTI 2
221 #define DIDEVTYPEKEYBOARD_PCAT 3
222 #define DIDEVTYPEKEYBOARD_PCENH 4
223 #define DIDEVTYPEKEYBOARD_NOKIA1050 5
224 #define DIDEVTYPEKEYBOARD_NOKIA9140 6
225 #define DIDEVTYPEKEYBOARD_NEC98 7
226 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
227 #define DIDEVTYPEKEYBOARD_NEC98106 9
228 #define DIDEVTYPEKEYBOARD_JAPAN106 10
229 #define DIDEVTYPEKEYBOARD_JAPANAX 11
230 #define DIDEVTYPEKEYBOARD_J3100 12
232 #define DIDEVTYPEJOYSTICK_UNKNOWN 1
233 #define DIDEVTYPEJOYSTICK_TRADITIONAL 2
234 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
235 #define DIDEVTYPEJOYSTICK_GAMEPAD 4
236 #define DIDEVTYPEJOYSTICK_RUDDER 5
237 #define DIDEVTYPEJOYSTICK_WHEEL 6
238 #define DIDEVTYPEJOYSTICK_HEADTRACKER 7
240 #define DI8DEVTYPEMOUSE_UNKNOWN 1
241 #define DI8DEVTYPEMOUSE_TRADITIONAL 2
242 #define DI8DEVTYPEMOUSE_FINGERSTICK 3
243 #define DI8DEVTYPEMOUSE_TOUCHPAD 4
244 #define DI8DEVTYPEMOUSE_TRACKBALL 5
245 #define DI8DEVTYPEMOUSE_ABSOLUTE 6
247 #define DI8DEVTYPEKEYBOARD_UNKNOWN 0
248 #define DI8DEVTYPEKEYBOARD_PCXT 1
249 #define DI8DEVTYPEKEYBOARD_OLIVETTI 2
250 #define DI8DEVTYPEKEYBOARD_PCAT 3
251 #define DI8DEVTYPEKEYBOARD_PCENH 4
252 #define DI8DEVTYPEKEYBOARD_NOKIA1050 5
253 #define DI8DEVTYPEKEYBOARD_NOKIA9140 6
254 #define DI8DEVTYPEKEYBOARD_NEC98 7
255 #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
256 #define DI8DEVTYPEKEYBOARD_NEC98106 9
257 #define DI8DEVTYPEKEYBOARD_JAPAN106 10
258 #define DI8DEVTYPEKEYBOARD_JAPANAX 11
259 #define DI8DEVTYPEKEYBOARD_J3100 12
261 #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
263 #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
264 #define DI8DEVTYPEJOYSTICK_STANDARD 2
266 #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
267 #define DI8DEVTYPEGAMEPAD_STANDARD 2
268 #define DI8DEVTYPEGAMEPAD_TILT 3
270 #define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
271 #define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
272 #define DI8DEVTYPEDRIVING_DUALPEDALS 3
273 #define DI8DEVTYPEDRIVING_THREEPEDALS 4
274 #define DI8DEVTYPEDRIVING_HANDHELD 5
276 #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
277 #define DI8DEVTYPEFLIGHT_STICK 2
278 #define DI8DEVTYPEFLIGHT_YOKE 3
279 #define DI8DEVTYPEFLIGHT_RC 4
281 #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
282 #define DI8DEVTYPE1STPERSON_UNKNOWN 2
283 #define DI8DEVTYPE1STPERSON_SIXDOF 3
284 #define DI8DEVTYPE1STPERSON_SHOOTER 4
286 #define DI8DEVTYPESCREENPTR_UNKNOWN 2
287 #define DI8DEVTYPESCREENPTR_LIGHTGUN 3
288 #define DI8DEVTYPESCREENPTR_LIGHTPEN 4
289 #define DI8DEVTYPESCREENPTR_TOUCH 5
291 #define DI8DEVTYPEREMOTE_UNKNOWN 2
293 #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
294 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
295 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
297 #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
298 #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
299 #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
300 #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
301 #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
302 #define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
303 #define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
304 #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
305 #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
306 #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
307 #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
308 #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
310 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
311 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
319 CHAR tszName
[MAX_PATH
];
320 #if(DIRECTINPUT_VERSION >= 0x0500)
322 DWORD dwFFForceResolution
;
323 WORD wCollectionNumber
;
324 WORD wDesignatorIndex
;
330 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
331 } DIDEVICEOBJECTINSTANCEA
, *LPDIDEVICEOBJECTINSTANCEA
;
332 typedef const DIDEVICEOBJECTINSTANCEA
*LPCDIDEVICEOBJECTINSTANCEA
;
340 WCHAR tszName
[MAX_PATH
];
341 #if(DIRECTINPUT_VERSION >= 0x0500)
343 DWORD dwFFForceResolution
;
344 WORD wCollectionNumber
;
345 WORD wDesignatorIndex
;
351 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
352 } DIDEVICEOBJECTINSTANCEW
, *LPDIDEVICEOBJECTINSTANCEW
;
353 typedef const DIDEVICEOBJECTINSTANCEW
*LPCDIDEVICEOBJECTINSTANCEW
;
355 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE
)
356 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE
)
357 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE
)
365 CHAR tszInstanceName
[MAX_PATH
];
366 CHAR tszProductName
[MAX_PATH
];
367 #if(DIRECTINPUT_VERSION >= 0x0500)
371 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
372 } DIDEVICEINSTANCEA
, *LPDIDEVICEINSTANCEA
;
373 typedef const DIDEVICEINSTANCEA
*LPCDIDEVICEINSTANCEA
;
380 WCHAR tszInstanceName
[MAX_PATH
];
381 WCHAR tszProductName
[MAX_PATH
];
382 #if(DIRECTINPUT_VERSION >= 0x0500)
386 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
387 } DIDEVICEINSTANCEW
, *LPDIDEVICEINSTANCEW
;
388 typedef const DIDEVICEINSTANCEW
*LPCDIDEVICEINSTANCEW
;
390 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE
)
391 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE
)
392 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE
)
394 typedef BOOL (CALLBACK
*LPDIENUMDEVICESCALLBACKA
)(LPCDIDEVICEINSTANCEA
,LPVOID
);
395 typedef BOOL (CALLBACK
*LPDIENUMDEVICESCALLBACKW
)(LPCDIDEVICEINSTANCEW
,LPVOID
);
396 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK
)
398 #if DIRECTINPUT_VERSION >= 0x0800
399 typedef BOOL (CALLBACK
*LPDIENUMDEVICESBYSEMANTICSCBA
)(LPCDIDEVICEINSTANCEA
,LPDIRECTINPUTDEVICE8A
,DWORD
,DWORD
,LPVOID
);
400 typedef BOOL (CALLBACK
*LPDIENUMDEVICESBYSEMANTICSCBW
)(LPCDIDEVICEINSTANCEW
,LPDIRECTINPUTDEVICE8W
,DWORD
,DWORD
,LPVOID
);
401 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB
)
404 typedef BOOL (CALLBACK
*LPDICONFIGUREDEVICESCALLBACK
)(LPUNKNOWN
,LPVOID
);
406 typedef BOOL (CALLBACK
*LPDIENUMDEVICEOBJECTSCALLBACKA
)(LPCDIDEVICEOBJECTINSTANCEA
,LPVOID
);
407 typedef BOOL (CALLBACK
*LPDIENUMDEVICEOBJECTSCALLBACKW
)(LPCDIDEVICEOBJECTINSTANCEW
,LPVOID
);
408 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK
)
410 typedef BOOL (CALLBACK
*LPDIENUMCREATEDEFFECTOBJECTSCALLBACK
)(LPDIRECTINPUTEFFECT
, LPVOID
);
412 #define DIK_ESCAPE 0x01
423 #define DIK_MINUS 0x0C /* - on main keyboard */
424 #define DIK_EQUALS 0x0D
425 #define DIK_BACK 0x0E /* backspace */
437 #define DIK_LBRACKET 0x1A
438 #define DIK_RBRACKET 0x1B
439 #define DIK_RETURN 0x1C /* Enter on main keyboard */
440 #define DIK_LCONTROL 0x1D
450 #define DIK_SEMICOLON 0x27
451 #define DIK_APOSTROPHE 0x28
452 #define DIK_GRAVE 0x29 /* accent grave */
453 #define DIK_LSHIFT 0x2A
454 #define DIK_BACKSLASH 0x2B
462 #define DIK_COMMA 0x33
463 #define DIK_PERIOD 0x34 /* . on main keyboard */
464 #define DIK_SLASH 0x35 /* / on main keyboard */
465 #define DIK_RSHIFT 0x36
466 #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
467 #define DIK_LMENU 0x38 /* left Alt */
468 #define DIK_SPACE 0x39
469 #define DIK_CAPITAL 0x3A
480 #define DIK_NUMLOCK 0x45
481 #define DIK_SCROLL 0x46 /* Scroll Lock */
482 #define DIK_NUMPAD7 0x47
483 #define DIK_NUMPAD8 0x48
484 #define DIK_NUMPAD9 0x49
485 #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
486 #define DIK_NUMPAD4 0x4B
487 #define DIK_NUMPAD5 0x4C
488 #define DIK_NUMPAD6 0x4D
489 #define DIK_ADD 0x4E /* + on numeric keypad */
490 #define DIK_NUMPAD1 0x4F
491 #define DIK_NUMPAD2 0x50
492 #define DIK_NUMPAD3 0x51
493 #define DIK_NUMPAD0 0x52
494 #define DIK_DECIMAL 0x53 /* . on numeric keypad */
497 #define DIK_F13 0x64 /* (NEC PC98) */
498 #define DIK_F14 0x65 /* (NEC PC98) */
499 #define DIK_F15 0x66 /* (NEC PC98) */
500 #define DIK_KANA 0x70 /* (Japanese keyboard) */
501 #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
502 #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
503 #define DIK_YEN 0x7D /* (Japanese keyboard) */
504 #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
505 #define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
506 #define DIK_AT 0x91 /* (NEC PC98) */
507 #define DIK_COLON 0x92 /* (NEC PC98) */
508 #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
509 #define DIK_KANJI 0x94 /* (Japanese keyboard) */
510 #define DIK_STOP 0x95 /* (NEC PC98) */
511 #define DIK_AX 0x96 /* (Japan AX) */
512 #define DIK_UNLABELED 0x97 /* (J3100) */
513 #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
514 #define DIK_RCONTROL 0x9D
515 #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
516 #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
517 #define DIK_SYSRQ 0xB7
518 #define DIK_RMENU 0xB8 /* right Alt */
519 #define DIK_PAUSE 0xC5 /* Pause */
520 #define DIK_HOME 0xC7 /* Home on arrow keypad */
521 #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
522 #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
523 #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
524 #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
525 #define DIK_END 0xCF /* End on arrow keypad */
526 #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
527 #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
528 #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
529 #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
530 #define DIK_LWIN 0xDB /* Left Windows key */
531 #define DIK_RWIN 0xDC /* Right Windows key */
532 #define DIK_APPS 0xDD /* AppMenu key */
533 #define DIK_POWER 0xDE
534 #define DIK_SLEEP 0xDF
535 #define DIK_BACKSPACE DIK_BACK /* backspace */
536 #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
537 #define DIK_LALT DIK_LMENU /* left Alt */
538 #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
539 #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
540 #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
541 #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
542 #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
543 #define DIK_RALT DIK_RMENU /* right Alt */
544 #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
545 #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
546 #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
547 #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
548 #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
549 #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
551 #define DIDFT_ALL 0x00000000
552 #define DIDFT_RELAXIS 0x00000001
553 #define DIDFT_ABSAXIS 0x00000002
554 #define DIDFT_AXIS 0x00000003
555 #define DIDFT_PSHBUTTON 0x00000004
556 #define DIDFT_TGLBUTTON 0x00000008
557 #define DIDFT_BUTTON 0x0000000C
558 #define DIDFT_POV 0x00000010
559 #define DIDFT_COLLECTION 0x00000040
560 #define DIDFT_NODATA 0x00000080
561 #define DIDFT_ANYINSTANCE 0x00FFFF00
562 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
563 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
564 #define DIDFT_GETTYPE(n) LOBYTE(n)
565 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
566 #define DIDFT_FFACTUATOR 0x01000000
567 #define DIDFT_FFEFFECTTRIGGER 0x02000000
568 #define DIDFT_OUTPUT 0x10000000
569 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
570 #define DIDFT_NOCOLLECTION 0x00FFFF00
571 #define DIDF_ABSAXIS 0x00000001
572 #define DIDF_RELAXIS 0x00000002
574 #define DIGDD_PEEK 0x00000001
576 typedef struct DIDEVICEOBJECTDATA
{
581 } DIDEVICEOBJECTDATA
,*LPDIDEVICEOBJECTDATA
;
582 typedef const DIDEVICEOBJECTDATA
*LPCDIDEVICEOBJECTDATA
;
584 typedef struct _DIOBJECTDATAFORMAT
{
589 } DIOBJECTDATAFORMAT
, *LPDIOBJECTDATAFORMAT
;
597 LPDIOBJECTDATAFORMAT rgodf
;
598 } DIDATAFORMAT
, *LPDIDATAFORMAT
;
599 typedef const DIDATAFORMAT
*LPCDIDATAFORMAT
;
606 } DIPROPHEADER
,*LPDIPROPHEADER
;
607 typedef const DIPROPHEADER
*LPCDIPROPHEADER
;
609 #define DIPH_DEVICE 0
610 #define DIPH_BYOFFSET 1
612 #define DIPH_BYUSAGE 3
614 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
616 typedef struct DIPROPDWORD
{
619 } DIPROPDWORD
, *LPDIPROPDWORD
;
620 typedef const DIPROPDWORD
*LPCDIPROPDWORD
;
622 typedef struct DIPROPRANGE
{
626 } DIPROPRANGE
, *LPDIPROPRANGE
;
627 typedef const DIPROPRANGE
*LPCDIPROPRANGE
;
629 #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
630 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
632 typedef struct DIPROPCAL
{
637 } DIPROPCAL
, *LPDIPROPCAL
;
638 typedef const DIPROPCAL
*LPCDIPROPCAL
;
640 typedef struct DIPROPGUIDANDPATH
{
643 WCHAR wszPath
[MAX_PATH
];
644 } DIPROPGUIDANDPATH
, *LPDIPROPGUIDANDPATH
;
645 typedef const DIPROPGUIDANDPATH
*LPCDIPROPGUIDANDPATH
;
647 /* special property GUIDs */
649 #define MAKEDIPROP(prop) (*(const GUID *)(prop))
651 #define MAKEDIPROP(prop) ((REFGUID)(prop))
653 #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
654 #define DIPROP_AXISMODE MAKEDIPROP(2)
656 #define DIPROPAXISMODE_ABS 0
657 #define DIPROPAXISMODE_REL 1
659 #define DIPROP_GRANULARITY MAKEDIPROP(3)
660 #define DIPROP_RANGE MAKEDIPROP(4)
661 #define DIPROP_DEADZONE MAKEDIPROP(5)
662 #define DIPROP_SATURATION MAKEDIPROP(6)
663 #define DIPROP_FFGAIN MAKEDIPROP(7)
664 #define DIPROP_FFLOAD MAKEDIPROP(8)
665 #define DIPROP_AUTOCENTER MAKEDIPROP(9)
667 #define DIPROPAUTOCENTER_OFF 0
668 #define DIPROPAUTOCENTER_ON 1
670 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
672 #define DIPROPCALIBRATIONMODE_COOKED 0
673 #define DIPROPCALIBRATIONMODE_RAW 1
675 #define DIPROP_CALIBRATION MAKEDIPROP(11)
676 #define DIPROP_GUIDANDPATH MAKEDIPROP(12)
679 typedef struct DIDEVCAPS
{
686 #if(DIRECTINPUT_VERSION >= 0x0500)
687 DWORD dwFFSamplePeriod
;
688 DWORD dwFFMinTimeResolution
;
689 DWORD dwFirmwareRevision
;
690 DWORD dwHardwareRevision
;
691 DWORD dwFFDriverVersion
;
692 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
693 } DIDEVCAPS
,*LPDIDEVCAPS
;
695 #define DIDC_ATTACHED 0x00000001
696 #define DIDC_POLLEDDEVICE 0x00000002
697 #define DIDC_EMULATED 0x00000004
698 #define DIDC_POLLEDDATAFORMAT 0x00000008
699 #define DIDC_FORCEFEEDBACK 0x00000100
700 #define DIDC_FFATTACK 0x00000200
701 #define DIDC_FFFADE 0x00000400
702 #define DIDC_SATURATION 0x00000800
703 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
704 #define DIDC_POSNEGSATURATION 0x00002000
705 #define DIDC_DEADBAND 0x00004000
707 /* SetCooperativeLevel dwFlags */
708 #define DISCL_EXCLUSIVE 0x00000001
709 #define DISCL_NONEXCLUSIVE 0x00000002
710 #define DISCL_FOREGROUND 0x00000004
711 #define DISCL_BACKGROUND 0x00000008
713 typedef struct DICONSTANTFORCE
{
715 } DICONSTANTFORCE
, *LPDICONSTANTFORCE
;
716 typedef const DICONSTANTFORCE
*LPCDICONSTANTFORCE
;
718 typedef struct DIRAMPFORCE
{
721 } DIRAMPFORCE
, *LPDIRAMPFORCE
;
722 typedef const DIRAMPFORCE
*LPCDIRAMPFORCE
;
724 typedef struct DIPERIODIC
{
729 } DIPERIODIC
, *LPDIPERIODIC
;
730 typedef const DIPERIODIC
*LPCDIPERIODIC
;
732 typedef struct DICONDITION
{
734 LONG lPositiveCoefficient
;
735 LONG lNegativeCoefficient
;
736 DWORD dwPositiveSaturation
;
737 DWORD dwNegativeSaturation
;
739 } DICONDITION
, *LPDICONDITION
;
740 typedef const DICONDITION
*LPCDICONDITION
;
742 typedef struct DICUSTOMFORCE
{
744 DWORD dwSamplePeriod
;
747 } DICUSTOMFORCE
, *LPDICUSTOMFORCE
;
748 typedef const DICUSTOMFORCE
*LPCDICUSTOMFORCE
;
750 typedef struct DIENVELOPE
{
756 } DIENVELOPE
, *LPDIENVELOPE
;
757 typedef const DIENVELOPE
*LPCDIENVELOPE
;
759 typedef struct DIEFFECT
{
763 DWORD dwSamplePeriod
;
765 DWORD dwTriggerButton
;
766 DWORD dwTriggerRepeatInterval
;
770 LPDIENVELOPE lpEnvelope
;
771 DWORD cbTypeSpecificParams
;
772 LPVOID lpvTypeSpecificParams
;
773 } DIEFFECT
, *LPDIEFFECT
;
774 typedef const DIEFFECT
*LPCDIEFFECT
;
776 typedef struct DIEFFECTINFOA
{
780 DWORD dwStaticParams
;
781 DWORD dwDynamicParams
;
782 CHAR tszName
[MAX_PATH
];
783 } DIEFFECTINFOA
, *LPDIEFFECTINFOA
;
784 typedef const DIEFFECTINFOA
*LPCDIEFFECTINFOA
;
786 typedef struct DIEFFECTINFOW
{
790 DWORD dwStaticParams
;
791 DWORD dwDynamicParams
;
792 WCHAR tszName
[MAX_PATH
];
793 } DIEFFECTINFOW
, *LPDIEFFECTINFOW
;
794 typedef const DIEFFECTINFOW
*LPCDIEFFECTINFOW
;
796 DECL_WINELIB_TYPE_AW(DIEFFECTINFO
)
797 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO
)
798 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO
)
800 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSCALLBACKA
)(LPCDIEFFECTINFOA
, LPVOID
);
801 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSCALLBACKW
)(LPCDIEFFECTINFOW
, LPVOID
);
803 typedef struct DIEFFESCAPE
{
810 } DIEFFESCAPE
, *LPDIEFFESCAPE
;
812 typedef struct DIJOYSTATE
{
822 } DIJOYSTATE
, *LPDIJOYSTATE
;
824 typedef struct DIJOYSTATE2
{
833 BYTE rgbButtons
[128];
834 LONG lVX
; /* 'v' as in velocity */
841 LONG lAX
; /* 'a' as in acceleration */
848 LONG lFX
; /* 'f' as in force */
851 LONG lFRx
; /* 'fr' as in rotational force aka torque */
855 } DIJOYSTATE2
, *LPDIJOYSTATE2
;
857 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
858 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
859 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
860 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
861 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
862 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
863 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
865 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
867 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
868 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
869 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
870 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
871 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
872 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
873 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
874 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
875 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
876 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
877 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
878 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
879 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
880 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
881 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
882 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
883 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
884 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
885 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
886 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
887 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
888 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
889 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
890 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
891 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
892 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
893 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
894 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
895 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
896 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
897 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
898 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
899 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
901 /* DInput 7 structures, types */
902 typedef struct DIFILEEFFECT
{
905 LPCDIEFFECT lpDiEffect
;
906 CHAR szFriendlyName
[MAX_PATH
];
907 } DIFILEEFFECT
, *LPDIFILEEFFECT
;
909 typedef const DIFILEEFFECT
*LPCDIFILEEFFECT
;
910 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSINFILECALLBACK
)(LPCDIFILEEFFECT
, LPVOID
);
912 /* DInput 8 structures and types */
913 #if DIRECTINPUT_VERSION >= 0x0800
914 typedef struct _DIACTIONA
{
919 LPCSTR lptszActionName
;
925 } DIACTIONA
, *LPDIACTIONA
;
926 typedef const DIACTIONA
*LPCDIACTIONA
;
928 typedef struct _DIACTIONW
{
933 LPCWSTR lptszActionName
;
939 } DIACTIONW
, *LPDIACTIONW
;
940 typedef const DIACTIONW
*LPCDIACTIONW
;
942 DECL_WINELIB_TYPE_AW(DIACTION
)
943 DECL_WINELIB_TYPE_AW(LPDIACTION
)
944 DECL_WINELIB_TYPE_AW(LPCDIACTION
)
946 #define DIA_FORCEFEEDBACK 0x00000001
947 #define DIA_APPMAPPED 0x00000002
948 #define DIA_APPNOMAP 0x00000004
949 #define DIA_NORANGE 0x00000008
950 #define DIA_APPFIXED 0x00000010
952 #define DIAH_UNMAPPED 0x00000000
953 #define DIAH_USERCONFIG 0x00000001
954 #define DIAH_APPREQUESTED 0x00000002
955 #define DIAH_HWAPP 0x00000004
956 #define DIAH_HWDEFAULT 0x00000008
957 #define DIAH_DEFAULT 0x00000020
958 #define DIAH_ERROR 0x80000000
960 typedef struct _DIACTIONFORMATA
{
965 LPDIACTIONA rgoAction
;
971 HINSTANCE hInstString
;
972 FILETIME ftTimeStamp
;
974 CHAR tszActionMap
[MAX_PATH
];
975 } DIACTIONFORMATA
, *LPDIACTIONFORMATA
;
976 typedef const DIACTIONFORMATA
*LPCDIACTIONFORMATA
;
978 typedef struct _DIACTIONFORMATW
{
983 LPDIACTIONW rgoAction
;
989 HINSTANCE hInstString
;
990 FILETIME ftTimeStamp
;
992 WCHAR tszActionMap
[MAX_PATH
];
993 } DIACTIONFORMATW
, *LPDIACTIONFORMATW
;
994 typedef const DIACTIONFORMATW
*LPCDIACTIONFORMATW
;
996 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT
)
997 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT
)
998 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT
)
1000 #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
1001 #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
1002 #define DIAFTS_UNUSEDDEVICELOW 0x00000000
1003 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
1005 #define DIDBAM_DEFAULT 0x00000000
1006 #define DIDBAM_PRESERVE 0x00000001
1007 #define DIDBAM_INITIALIZE 0x00000002
1008 #define DIDBAM_HWDEFAULTS 0x00000004
1010 #define DIDSAM_DEFAULT 0x00000000
1011 #define DIDSAM_NOUSER 0x00000001
1012 #define DIDSAM_FORCESAVE 0x00000002
1014 #define DICD_DEFAULT 0x00000000
1015 #define DICD_EDIT 0x00000001
1017 #ifndef D3DCOLOR_DEFINED
1018 typedef DWORD D3DCOLOR
;
1019 #define D3DCOLOR_DEFINED
1022 typedef struct _DICOLORSET
{
1025 D3DCOLOR cTextHighlight
;
1026 D3DCOLOR cCalloutLine
;
1027 D3DCOLOR cCalloutHighlight
;
1029 D3DCOLOR cControlFill
;
1030 D3DCOLOR cHighlightFill
;
1032 } DICOLORSET
, *LPDICOLORSET
;
1033 typedef const DICOLORSET
*LPCDICOLORSET
;
1035 typedef struct _DICONFIGUREDEVICESPARAMSA
{
1038 LPSTR lptszUserNames
;
1040 LPDIACTIONFORMATA lprgFormats
;
1043 LPUNKNOWN lpUnkDDSTarget
;
1044 } DICONFIGUREDEVICESPARAMSA
, *LPDICONFIGUREDEVICESPARAMSA
;
1045 typedef const DICONFIGUREDEVICESPARAMSA
*LPCDICONFIGUREDEVICESPARAMSA
;
1047 typedef struct _DICONFIGUREDEVICESPARAMSW
{
1050 LPWSTR lptszUserNames
;
1052 LPDIACTIONFORMATW lprgFormats
;
1055 LPUNKNOWN lpUnkDDSTarget
;
1056 } DICONFIGUREDEVICESPARAMSW
, *LPDICONFIGUREDEVICESPARAMSW
;
1057 typedef const DICONFIGUREDEVICESPARAMSW
*LPCDICONFIGUREDEVICESPARAMSW
;
1059 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS
)
1060 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS
)
1061 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS
)
1063 #define DIDIFT_CONFIGURATION 0x00000001
1064 #define DIDIFT_OVERLAY 0x00000002
1066 #define DIDAL_CENTERED 0x00000000
1067 #define DIDAL_LEFTALIGNED 0x00000001
1068 #define DIDAL_RIGHTALIGNED 0x00000002
1069 #define DIDAL_MIDDLE 0x00000000
1070 #define DIDAL_TOPALIGNED 0x00000004
1071 #define DIDAL_BOTTOMALIGNED 0x00000008
1073 typedef struct _DIDEVICEIMAGEINFOA
{
1074 CHAR tszImagePath
[MAX_PATH
];
1080 POINT rgptCalloutLine
[5];
1083 } DIDEVICEIMAGEINFOA
, *LPDIDEVICEIMAGEINFOA
;
1084 typedef const DIDEVICEIMAGEINFOA
*LPCDIDEVICEIMAGEINFOA
;
1086 typedef struct _DIDEVICEIMAGEINFOW
{
1087 WCHAR tszImagePath
[MAX_PATH
];
1093 POINT rgptCalloutLine
[5];
1096 } DIDEVICEIMAGEINFOW
, *LPDIDEVICEIMAGEINFOW
;
1097 typedef const DIDEVICEIMAGEINFOW
*LPCDIDEVICEIMAGEINFOW
;
1099 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO
)
1100 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO
)
1101 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO
)
1103 typedef struct _DIDEVICEIMAGEINFOHEADERA
{
1105 DWORD dwSizeImageInfo
;
1112 LPDIDEVICEIMAGEINFOA lprgImageInfoArray
;
1113 } DIDEVICEIMAGEINFOHEADERA
, *LPDIDEVICEIMAGEINFOHEADERA
;
1114 typedef const DIDEVICEIMAGEINFOHEADERA
*LPCDIDEVICEIMAGEINFOHEADERA
;
1116 typedef struct _DIDEVICEIMAGEINFOHEADERW
{
1118 DWORD dwSizeImageInfo
;
1125 LPDIDEVICEIMAGEINFOW lprgImageInfoArray
;
1126 } DIDEVICEIMAGEINFOHEADERW
, *LPDIDEVICEIMAGEINFOHEADERW
;
1127 typedef const DIDEVICEIMAGEINFOHEADERW
*LPCDIDEVICEIMAGEINFOHEADERW
;
1129 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER
)
1130 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER
)
1131 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER
)
1136 /*****************************************************************************
1137 * IDirectInputEffect interface
1139 #define INTERFACE IDirectInputEffect
1140 #define IDirectInputEffect_METHODS \
1142 STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE; \
1143 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE; \
1144 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE; \
1145 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE; \
1146 STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE; \
1147 STDMETHOD(Stop)(THIS) PURE; \
1148 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE; \
1149 STDMETHOD(Download)(THIS) PURE; \
1150 STDMETHOD(Unload)(THIS) PURE; \
1151 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1152 ICOM_DEFINE(IDirectInputEffect
,IUnknown
)
1156 /*** IUnknown methods ***/
1157 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1158 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
1159 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
1160 /*** IDirectInputEffect methods ***/
1161 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1162 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
1163 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
1164 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
1165 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
1166 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
1167 #define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->lpVtbl->GetEffectStatus(p,a)
1168 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
1169 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
1170 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1174 /*****************************************************************************
1175 * IDirectInputDeviceA interface
1177 #define INTERFACE IDirectInputDeviceA
1178 #define IDirectInputDeviceA_METHODS \
1180 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1181 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1182 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1183 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1184 STDMETHOD(Acquire)(THIS) PURE; \
1185 STDMETHOD(Unacquire)(THIS) PURE; \
1186 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1187 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1188 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1189 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1190 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1191 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1192 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; \
1193 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1194 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1195 ICOM_DEFINE(IDirectInputDeviceA
,IUnknown
)
1198 /*****************************************************************************
1199 * IDirectInputDeviceW interface
1201 #define INTERFACE IDirectInputDeviceW
1202 #define IDirectInputDeviceW_METHODS \
1204 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1205 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1206 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1207 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1208 STDMETHOD(Acquire)(THIS) PURE; \
1209 STDMETHOD(Unacquire)(THIS) PURE; \
1210 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1211 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1212 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1213 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1214 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1215 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1216 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; \
1217 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1218 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1219 ICOM_DEFINE(IDirectInputDeviceW
,IUnknown
)
1223 /*** IUnknown methods ***/
1224 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1225 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
1226 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
1227 /*** IDirectInputDevice methods ***/
1228 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1229 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1230 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1231 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1232 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
1233 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1234 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1235 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1236 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1237 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1238 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1239 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1240 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1241 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1242 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1246 /*****************************************************************************
1247 * IDirectInputDevice2A interface
1249 #define INTERFACE IDirectInputDevice2A
1250 #define IDirectInputDevice2A_METHODS \
1251 IDirectInputDeviceA_METHODS \
1252 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1253 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1254 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; \
1255 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1256 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1257 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1258 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1259 STDMETHOD(Poll)(THIS) PURE; \
1260 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1261 ICOM_DEFINE(IDirectInputDevice2A
,IDirectInputDeviceA
)
1264 /*****************************************************************************
1265 * IDirectInputDevice2W interface
1267 #define INTERFACE IDirectInputDevice2W
1268 #define IDirectInputDevice2W_METHODS \
1269 IDirectInputDeviceW_METHODS \
1270 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1271 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1272 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE; \
1273 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1274 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1275 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1276 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1277 STDMETHOD(Poll)(THIS) PURE; \
1278 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1279 ICOM_DEFINE(IDirectInputDevice2W
,IDirectInputDeviceW
)
1283 /*** IUnknown methods ***/
1284 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1285 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
1286 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
1287 /*** IDirectInputDevice methods ***/
1288 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1289 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1290 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1291 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1292 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
1293 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1294 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1295 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1296 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1297 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1298 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1299 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1300 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1301 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1302 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1303 /*** IDirectInputDevice2 methods ***/
1304 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1305 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1306 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1307 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1308 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1309 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1310 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1311 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
1312 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1315 #if DIRECTINPUT_VERSION >= 0x0700
1316 /*****************************************************************************
1317 * IDirectInputDevice7A interface
1319 #define INTERFACE IDirectInputDevice7A
1320 #define IDirectInputDevice7A_METHODS \
1321 IDirectInputDevice2A_METHODS \
1322 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1323 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1324 ICOM_DEFINE(IDirectInputDevice7A
,IDirectInputDevice2A
)
1327 /*****************************************************************************
1328 * IDirectInputDevice7W interface
1330 #define INTERFACE IDirectInputDevice7W
1331 #define IDirectInputDevice7W_METHODS \
1332 IDirectInputDevice2W_METHODS \
1333 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1334 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1335 ICOM_DEFINE(IDirectInputDevice7W
,IDirectInputDevice2W
)
1339 /*** IUnknown methods ***/
1340 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1341 #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
1342 #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
1343 /*** IDirectInputDevice methods ***/
1344 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1345 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1346 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1347 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1348 #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
1349 #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1350 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1351 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1352 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1353 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1354 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1355 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1356 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1357 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1358 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1359 /*** IDirectInputDevice2 methods ***/
1360 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1361 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1362 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1363 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1364 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1365 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1366 #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1367 #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
1368 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1369 /*** IDirectInputDevice7 methods ***/
1370 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1371 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1376 #if DIRECTINPUT_VERSION >= 0x0800
1377 /*****************************************************************************
1378 * IDirectInputDevice8A interface
1380 #define INTERFACE IDirectInputDevice8A
1381 #define IDirectInputDevice8A_METHODS \
1382 IDirectInputDevice7A_METHODS \
1383 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1384 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1385 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
1386 ICOM_DEFINE(IDirectInputDevice8A
,IDirectInputDevice7A
)
1389 /*****************************************************************************
1390 * IDirectInputDevice8W interface
1392 #define INTERFACE IDirectInputDevice8W
1393 #define IDirectInputDevice8W_METHODS \
1394 IDirectInputDevice7W_METHODS \
1395 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; \
1396 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; \
1397 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
1398 ICOM_DEFINE(IDirectInputDevice8W
,IDirectInputDevice7W
)
1402 /*** IUnknown methods ***/
1403 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1404 #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
1405 #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
1406 /*** IDirectInputDevice methods ***/
1407 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1408 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1409 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1410 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1411 #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
1412 #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1413 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1414 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1415 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1416 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1417 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1418 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1419 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1420 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1421 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1422 /*** IDirectInputDevice2 methods ***/
1423 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1424 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1425 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1426 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1427 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1428 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1429 #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1430 #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
1431 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1432 /*** IDirectInputDevice7 methods ***/
1433 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1434 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1435 /*** IDirectInputDevice8 methods ***/
1436 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
1437 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
1438 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
1443 /* "Standard" Mouse report... */
1444 typedef struct DIMOUSESTATE
{
1451 /* "Standard" Mouse report for DInput 7... */
1452 typedef struct DIMOUSESTATE2
{
1459 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
1460 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
1461 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
1462 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1463 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1464 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1465 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1470 extern const DIDATAFORMAT c_dfDIMouse
;
1471 extern const DIDATAFORMAT c_dfDIMouse2
; /* DX 7 */
1472 extern const DIDATAFORMAT c_dfDIKeyboard
;
1473 extern const DIDATAFORMAT c_dfDIJoystick
;
1474 extern const DIDATAFORMAT c_dfDIJoystick2
;
1479 /*****************************************************************************
1480 * IDirectInputA interface
1482 #define INTERFACE IDirectInputA
1483 #define IDirectInputA_METHODS \
1485 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1486 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1487 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1488 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1489 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1490 ICOM_DEFINE(IDirectInputA
,IUnknown
)
1493 /*****************************************************************************
1494 * IDirectInputW interface
1496 #define INTERFACE IDirectInputW
1497 #define IDirectInputW_METHODS \
1499 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1500 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1501 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1502 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1503 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1504 ICOM_DEFINE(IDirectInputW
,IUnknown
)
1508 /*** IUnknown methods ***/
1509 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1510 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
1511 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
1512 /*** IDirectInput methods ***/
1513 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1514 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1515 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1516 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1517 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1520 /*****************************************************************************
1521 * IDirectInput2A interface
1523 #define INTERFACE IDirectInput2A
1524 #define IDirectInput2A_METHODS \
1525 IDirectInputA_METHODS \
1526 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
1527 ICOM_DEFINE(IDirectInput2A
,IDirectInputA
)
1530 /*****************************************************************************
1531 * IDirectInput2W interface
1533 #define INTERFACE IDirectInput2W
1534 #define IDirectInput2W_METHODS \
1535 IDirectInputW_METHODS \
1536 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
1537 ICOM_DEFINE(IDirectInput2W
,IDirectInputW
)
1541 /*** IUnknown methods ***/
1542 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1543 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
1544 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
1545 /*** IDirectInput methods ***/
1546 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1547 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1548 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1549 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1550 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1551 /*** IDirectInput2 methods ***/
1552 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1555 #if DIRECTINPUT_VERSION >= 0x0700
1556 /*****************************************************************************
1557 * IDirectInput7A interface
1559 #define INTERFACE IDirectInput7A
1560 #define IDirectInput7A_METHODS \
1561 IDirectInput2A_METHODS \
1562 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1563 ICOM_DEFINE(IDirectInput7A
,IDirectInput2A
)
1566 /*****************************************************************************
1567 * IDirectInput7W interface
1569 #define INTERFACE IDirectInput7W
1570 #define IDirectInput7W_METHODS \
1571 IDirectInput2W_METHODS \
1572 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1573 ICOM_DEFINE(IDirectInput7W
,IDirectInput2W
)
1577 /*** IUnknown methods ***/
1578 #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1579 #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
1580 #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
1581 /*** IDirectInput methods ***/
1582 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1583 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1584 #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1585 #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1586 #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1587 /*** IDirectInput2 methods ***/
1588 #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1589 /*** IDirectInput7 methods ***/
1590 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
1595 #if DIRECTINPUT_VERSION >= 0x0800
1596 /*****************************************************************************
1597 * IDirectInput8A interface
1599 #define INTERFACE IDirectInput8A
1600 #define IDirectInput8A_METHODS \
1602 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1603 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1604 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1605 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1606 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1607 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; \
1608 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1609 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1610 ICOM_DEFINE(IDirectInput8A
,IUnknown
)
1613 /*****************************************************************************
1614 * IDirectInput8W interface
1616 #define INTERFACE IDirectInput8W
1617 #define IDirectInput8W_METHODS \
1619 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1620 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1621 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1622 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1623 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1624 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE; \
1625 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1626 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1627 ICOM_DEFINE(IDirectInput8W
,IUnknown
)
1631 /*** IUnknown methods ***/
1632 #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1633 #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
1634 #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
1635 /*** IDirectInput8 methods ***/
1636 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1637 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1638 #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1639 #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1640 #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1641 #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1642 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
1643 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
1648 /* Export functions */
1654 #if DIRECTINPUT_VERSION >= 0x0800
1655 HRESULT WINAPI
DirectInput8Create(HINSTANCE
,DWORD
,REFIID
,LPVOID
*,LPUNKNOWN
);
1658 HRESULT WINAPI
DirectInputCreateA(HINSTANCE
,DWORD
,LPDIRECTINPUTA
*,LPUNKNOWN
);
1659 HRESULT WINAPI
DirectInputCreateW(HINSTANCE
,DWORD
,LPDIRECTINPUTW
*,LPUNKNOWN
);
1660 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
1662 HRESULT WINAPI
DirectInputCreateEx(HINSTANCE
,DWORD
,REFIID
,LPVOID
*,LPUNKNOWN
);
1668 #endif /* __WINE_DINPUT_H */