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 "windef.h" /* for MAX_PATH */
25 #ifndef DIRECTINPUT_VERSION
26 #define DIRECTINPUT_VERSION 0x0800
30 DEFINE_GUID(CLSID_DirectInput
, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
31 DEFINE_GUID(CLSID_DirectInputDevice
, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
33 DEFINE_GUID(CLSID_DirectInput8
, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
34 DEFINE_GUID(CLSID_DirectInputDevice8
, 0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
37 DEFINE_GUID(IID_IDirectInputA
, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
38 DEFINE_GUID(IID_IDirectInputW
, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
39 DEFINE_GUID(IID_IDirectInput2A
, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
40 DEFINE_GUID(IID_IDirectInput2W
, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
41 DEFINE_GUID(IID_IDirectInput7A
, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
42 DEFINE_GUID(IID_IDirectInput7W
, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
43 DEFINE_GUID(IID_IDirectInput8A
, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
44 DEFINE_GUID(IID_IDirectInput8W
, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
45 DEFINE_GUID(IID_IDirectInputDeviceA
, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
46 DEFINE_GUID(IID_IDirectInputDeviceW
, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
47 DEFINE_GUID(IID_IDirectInputDevice2A
, 0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
48 DEFINE_GUID(IID_IDirectInputDevice2W
, 0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
49 DEFINE_GUID(IID_IDirectInputDevice7A
, 0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
50 DEFINE_GUID(IID_IDirectInputDevice7W
, 0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
51 DEFINE_GUID(IID_IDirectInputDevice8A
, 0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
52 DEFINE_GUID(IID_IDirectInputDevice8W
, 0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
53 DEFINE_GUID(IID_IDirectInputEffect
, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
55 /* Predefined object types */
56 DEFINE_GUID(GUID_XAxis
, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
57 DEFINE_GUID(GUID_YAxis
, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
58 DEFINE_GUID(GUID_ZAxis
, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
59 DEFINE_GUID(GUID_RxAxis
,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
60 DEFINE_GUID(GUID_RyAxis
,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
61 DEFINE_GUID(GUID_RzAxis
,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
62 DEFINE_GUID(GUID_Slider
,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
63 DEFINE_GUID(GUID_Button
,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
64 DEFINE_GUID(GUID_Key
, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
65 DEFINE_GUID(GUID_POV
, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
66 DEFINE_GUID(GUID_Unknown
,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
68 /* Predefined product GUIDs */
69 DEFINE_GUID(GUID_SysMouse
, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
70 DEFINE_GUID(GUID_SysKeyboard
, 0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
71 DEFINE_GUID(GUID_Joystick
, 0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
73 /* predefined forcefeedback effects */
74 DEFINE_GUID(GUID_ConstantForce
, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
75 DEFINE_GUID(GUID_RampForce
, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
76 DEFINE_GUID(GUID_Square
, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
77 DEFINE_GUID(GUID_Sine
, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
78 DEFINE_GUID(GUID_Triangle
, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
79 DEFINE_GUID(GUID_SawtoothUp
, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
80 DEFINE_GUID(GUID_SawtoothDown
, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
81 DEFINE_GUID(GUID_Spring
, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
82 DEFINE_GUID(GUID_Damper
, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
83 DEFINE_GUID(GUID_Inertia
, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
84 DEFINE_GUID(GUID_Friction
, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
85 DEFINE_GUID(GUID_CustomForce
, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
87 typedef struct IDirectInputA IDirectInputA
,*LPDIRECTINPUTA
;
88 typedef struct IDirectInputW IDirectInputW
,*LPDIRECTINPUTW
;
89 typedef struct IDirectInput2A IDirectInput2A
,*LPDIRECTINPUT2A
;
90 typedef struct IDirectInput2W IDirectInput2W
,*LPDIRECTINPUT2W
;
91 typedef struct IDirectInput7A IDirectInput7A
,*LPDIRECTINPUT7A
;
92 typedef struct IDirectInput7W IDirectInput7W
,*LPDIRECTINPUT7W
;
93 typedef struct IDirectInput8A IDirectInput8A
,*LPDIRECTINPUT8A
;
94 typedef struct IDirectInput8W IDirectInput8W
,*LPDIRECTINPUT8W
;
95 typedef struct IDirectInputDeviceA IDirectInputDeviceA
,*LPDIRECTINPUTDEVICEA
;
96 typedef struct IDirectInputDeviceW IDirectInputDeviceW
,*LPDIRECTINPUTDEVICEW
;
97 typedef struct IDirectInputDevice2A IDirectInputDevice2A
,*LPDIRECTINPUTDEVICE2A
;
98 typedef struct IDirectInputDevice2W IDirectInputDevice2W
,*LPDIRECTINPUTDEVICE2W
;
99 typedef struct IDirectInputDevice7A IDirectInputDevice7A
,*LPDIRECTINPUTDEVICE7A
;
100 typedef struct IDirectInputDevice7W IDirectInputDevice7W
,*LPDIRECTINPUTDEVICE7W
;
101 typedef struct IDirectInputDevice8A IDirectInputDevice8A
,*LPDIRECTINPUTDEVICE8A
;
102 typedef struct IDirectInputDevice8W IDirectInputDevice8W
,*LPDIRECTINPUTDEVICE8W
;
103 typedef struct IDirectInputEffect IDirectInputEffect
,*LPDIRECTINPUTEFFECT
;
104 typedef struct SysKeyboardA SysKeyboardA
,*LPSYSKEYBOARDA
;
105 typedef struct SysMouseA SysMouseA
,*LPSYSMOUSEA
;
107 #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
108 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT
)
109 #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
110 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2
)
111 #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
112 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7
)
113 #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
114 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE
)
115 #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
116 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2
)
117 #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
118 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7
)
119 #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
120 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8
)
123 #define DI_NOTATTACHED S_FALSE
124 #define DI_BUFFEROVERFLOW S_FALSE
125 #define DI_PROPNOEFFECT S_FALSE
126 #define DI_NOEFFECT S_FALSE
127 #define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
128 #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
129 #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
130 #define DI_TRUNCATED ((HRESULT)0x00000008L)
131 #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
133 #define DIERR_OLDDIRECTINPUTVERSION \
134 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
135 #define DIERR_BETADIRECTINPUTVERSION \
136 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
137 #define DIERR_BADDRIVERVER \
138 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
139 #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
140 #define DIERR_NOTFOUND \
141 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
142 #define DIERR_OBJECTNOTFOUND \
143 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
144 #define DIERR_INVALIDPARAM E_INVALIDARG
145 #define DIERR_NOINTERFACE E_NOINTERFACE
146 #define DIERR_GENERIC E_FAIL
147 #define DIERR_OUTOFMEMORY E_OUTOFMEMORY
148 #define DIERR_UNSUPPORTED E_NOTIMPL
149 #define DIERR_NOTINITIALIZED \
150 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
151 #define DIERR_ALREADYINITIALIZED \
152 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
153 #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
154 #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
155 #define DIERR_INPUTLOST \
156 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
157 #define DIERR_ACQUIRED \
158 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
159 #define DIERR_NOTACQUIRED \
160 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
161 #define DIERR_READONLY E_ACCESSDENIED
162 #define DIERR_HANDLEEXISTS E_ACCESSDENIED
164 #define E_PENDING 0x8000000AL
166 #define DIERR_INSUFFICIENTPRIVS 0x80040200L
167 #define DIERR_DEVICEFULL 0x80040201L
168 #define DIERR_MOREDATA 0x80040202L
169 #define DIERR_NOTDOWNLOADED 0x80040203L
170 #define DIERR_HASEFFECTS 0x80040204L
171 #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
172 #define DIERR_INCOMPLETEEFFECT 0x80040206L
173 #define DIERR_NOTBUFFERED 0x80040207L
174 #define DIERR_EFFECTPLAYING 0x80040208L
175 #define DIERR_UNPLUGGED 0x80040209L
176 #define DIERR_REPORTFULL 0x8004020AL
178 #define DIENUM_STOP 0
179 #define DIENUM_CONTINUE 1
181 #define DIEDFL_ALLDEVICES 0x00000000
182 #define DIEDFL_ATTACHEDONLY 0x00000000
183 #define DIEDFL_FORCEFEEDBACK 0x00000100
184 #define DIEDFL_INCLUDEALIASES 0x00010000
185 #define DIEDFL_INCLUDEPHANTOMS 0x00020000
186 #define DIEDFL_INCLUDEHIDDEN 0x00040000
188 #define DIDEVTYPE_DEVICE 1
189 #define DIDEVTYPE_MOUSE 2
190 #define DIDEVTYPE_KEYBOARD 3
191 #define DIDEVTYPE_JOYSTICK 4
192 #define DIDEVTYPE_HID 0x00010000
194 #define DI8DEVCLASS_ALL 0
195 #define DI8DEVCLASS_DEVICE 1
196 #define DI8DEVCLASS_POINTER 2
197 #define DI8DEVCLASS_KEYBOARD 3
198 #define DI8DEVCLASS_GAMECTRL 4
200 #define DI8DEVTYPE_DEVICE 0x11
201 #define DI8DEVTYPE_MOUSE 0x12
202 #define DI8DEVTYPE_KEYBOARD 0x13
203 #define DI8DEVTYPE_JOYSTICK 0x14
204 #define DI8DEVTYPE_GAMEPAD 0x15
205 #define DI8DEVTYPE_DRIVING 0x16
206 #define DI8DEVTYPE_FLIGHT 0x17
207 #define DI8DEVTYPE_1STPERSON 0x18
208 #define DI8DEVTYPE_DEVICECTRL 0x19
209 #define DI8DEVTYPE_SCREENPOINTER 0x1A
210 #define DI8DEVTYPE_REMOTE 0x1B
211 #define DI8DEVTYPE_SUPPLEMENTAL 0x1C
213 #define DIDEVTYPEMOUSE_UNKNOWN 1
214 #define DIDEVTYPEMOUSE_TRADITIONAL 2
215 #define DIDEVTYPEMOUSE_FINGERSTICK 3
216 #define DIDEVTYPEMOUSE_TOUCHPAD 4
217 #define DIDEVTYPEMOUSE_TRACKBALL 5
219 #define DIDEVTYPEKEYBOARD_UNKNOWN 0
220 #define DIDEVTYPEKEYBOARD_PCXT 1
221 #define DIDEVTYPEKEYBOARD_OLIVETTI 2
222 #define DIDEVTYPEKEYBOARD_PCAT 3
223 #define DIDEVTYPEKEYBOARD_PCENH 4
224 #define DIDEVTYPEKEYBOARD_NOKIA1050 5
225 #define DIDEVTYPEKEYBOARD_NOKIA9140 6
226 #define DIDEVTYPEKEYBOARD_NEC98 7
227 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
228 #define DIDEVTYPEKEYBOARD_NEC98106 9
229 #define DIDEVTYPEKEYBOARD_JAPAN106 10
230 #define DIDEVTYPEKEYBOARD_JAPANAX 11
231 #define DIDEVTYPEKEYBOARD_J3100 12
233 #define DIDEVTYPEJOYSTICK_UNKNOWN 1
234 #define DIDEVTYPEJOYSTICK_TRADITIONAL 2
235 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
236 #define DIDEVTYPEJOYSTICK_GAMEPAD 4
237 #define DIDEVTYPEJOYSTICK_RUDDER 5
238 #define DIDEVTYPEJOYSTICK_WHEEL 6
239 #define DIDEVTYPEJOYSTICK_HEADTRACKER 7
241 #define DI8DEVTYPEMOUSE_UNKNOWN 1
242 #define DI8DEVTYPEMOUSE_TRADITIONAL 2
243 #define DI8DEVTYPEMOUSE_FINGERSTICK 3
244 #define DI8DEVTYPEMOUSE_TOUCHPAD 4
245 #define DI8DEVTYPEMOUSE_TRACKBALL 5
246 #define DI8DEVTYPEMOUSE_ABSOLUTE 6
248 #define DI8DEVTYPEKEYBOARD_UNKNOWN 0
249 #define DI8DEVTYPEKEYBOARD_PCXT 1
250 #define DI8DEVTYPEKEYBOARD_OLIVETTI 2
251 #define DI8DEVTYPEKEYBOARD_PCAT 3
252 #define DI8DEVTYPEKEYBOARD_PCENH 4
253 #define DI8DEVTYPEKEYBOARD_NOKIA1050 5
254 #define DI8DEVTYPEKEYBOARD_NOKIA9140 6
255 #define DI8DEVTYPEKEYBOARD_NEC98 7
256 #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
257 #define DI8DEVTYPEKEYBOARD_NEC98106 9
258 #define DI8DEVTYPEKEYBOARD_JAPAN106 10
259 #define DI8DEVTYPEKEYBOARD_JAPANAX 11
260 #define DI8DEVTYPEKEYBOARD_J3100 12
262 #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
264 #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
265 #define DI8DEVTYPEJOYSTICK_STANDARD 2
267 #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
268 #define DI8DEVTYPEGAMEPAD_STANDARD 2
269 #define DI8DEVTYPEGAMEPAD_TILT 3
271 #define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
272 #define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
273 #define DI8DEVTYPEDRIVING_DUALPEDALS 3
274 #define DI8DEVTYPEDRIVING_THREEPEDALS 4
275 #define DI8DEVTYPEDRIVING_HANDHELD 5
277 #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
278 #define DI8DEVTYPEFLIGHT_STICK 2
279 #define DI8DEVTYPEFLIGHT_YOKE 3
280 #define DI8DEVTYPEFLIGHT_RC 4
282 #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
283 #define DI8DEVTYPE1STPERSON_UNKNOWN 2
284 #define DI8DEVTYPE1STPERSON_SIXDOF 3
285 #define DI8DEVTYPE1STPERSON_SHOOTER 4
287 #define DI8DEVTYPESCREENPTR_UNKNOWN 2
288 #define DI8DEVTYPESCREENPTR_LIGHTGUN 3
289 #define DI8DEVTYPESCREENPTR_LIGHTPEN 4
290 #define DI8DEVTYPESCREENPTR_TOUCH 5
292 #define DI8DEVTYPEREMOTE_UNKNOWN 2
294 #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
295 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
296 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
298 #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
299 #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
300 #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
301 #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
302 #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
303 #define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
304 #define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
305 #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
306 #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
307 #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
308 #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
309 #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
311 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
312 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
320 CHAR tszName
[MAX_PATH
];
321 #if(DIRECTINPUT_VERSION >= 0x0500)
323 DWORD dwFFForceResolution
;
324 WORD wCollectionNumber
;
325 WORD wDesignatorIndex
;
331 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
332 } DIDEVICEOBJECTINSTANCEA
, *LPDIDEVICEOBJECTINSTANCEA
;
333 typedef const DIDEVICEOBJECTINSTANCEA
*LPCDIDEVICEOBJECTINSTANCEA
;
341 WCHAR tszName
[MAX_PATH
];
342 #if(DIRECTINPUT_VERSION >= 0x0500)
344 DWORD dwFFForceResolution
;
345 WORD wCollectionNumber
;
346 WORD wDesignatorIndex
;
352 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
353 } DIDEVICEOBJECTINSTANCEW
, *LPDIDEVICEOBJECTINSTANCEW
;
354 typedef const DIDEVICEOBJECTINSTANCEW
*LPCDIDEVICEOBJECTINSTANCEW
;
356 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE
)
357 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE
)
358 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE
)
366 CHAR tszInstanceName
[MAX_PATH
];
367 CHAR tszProductName
[MAX_PATH
];
368 #if(DIRECTINPUT_VERSION >= 0x0500)
372 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
373 } DIDEVICEINSTANCEA
, *LPDIDEVICEINSTANCEA
;
374 typedef const DIDEVICEINSTANCEA
*LPCDIDEVICEINSTANCEA
;
381 WCHAR tszInstanceName
[MAX_PATH
];
382 WCHAR tszProductName
[MAX_PATH
];
383 #if(DIRECTINPUT_VERSION >= 0x0500)
387 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
388 } DIDEVICEINSTANCEW
, *LPDIDEVICEINSTANCEW
;
389 typedef const DIDEVICEINSTANCEW
*LPCDIDEVICEINSTANCEW
;
391 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE
)
392 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE
)
393 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE
)
395 typedef BOOL (CALLBACK
*LPDIENUMDEVICESCALLBACKA
)(LPCDIDEVICEINSTANCEA
,LPVOID
);
396 typedef BOOL (CALLBACK
*LPDIENUMDEVICESCALLBACKW
)(LPCDIDEVICEINSTANCEW
,LPVOID
);
397 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK
)
399 #if DIRECTINPUT_VERSION >= 0x0800
400 typedef BOOL (CALLBACK
*LPDIENUMDEVICESBYSEMANTICSCBA
)(LPCDIDEVICEINSTANCEA
,LPDIRECTINPUTDEVICE8A
,DWORD
,DWORD
,LPVOID
);
401 typedef BOOL (CALLBACK
*LPDIENUMDEVICESBYSEMANTICSCBW
)(LPCDIDEVICEINSTANCEW
,LPDIRECTINPUTDEVICE8W
,DWORD
,DWORD
,LPVOID
);
402 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB
)
405 typedef BOOL (CALLBACK
*LPDICONFIGUREDEVICESCALLBACK
)(LPUNKNOWN
,LPVOID
);
407 typedef BOOL (CALLBACK
*LPDIENUMDEVICEOBJECTSCALLBACKA
)(LPCDIDEVICEOBJECTINSTANCEA
,LPVOID
);
408 typedef BOOL (CALLBACK
*LPDIENUMDEVICEOBJECTSCALLBACKW
)(LPCDIDEVICEOBJECTINSTANCEW
,LPVOID
);
409 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK
)
411 typedef BOOL (CALLBACK
*LPDIENUMCREATEDEFFECTOBJECTSCALLBACK
)(LPDIRECTINPUTEFFECT
, LPVOID
);
413 #define DIK_ESCAPE 0x01
424 #define DIK_MINUS 0x0C /* - on main keyboard */
425 #define DIK_EQUALS 0x0D
426 #define DIK_BACK 0x0E /* backspace */
438 #define DIK_LBRACKET 0x1A
439 #define DIK_RBRACKET 0x1B
440 #define DIK_RETURN 0x1C /* Enter on main keyboard */
441 #define DIK_LCONTROL 0x1D
451 #define DIK_SEMICOLON 0x27
452 #define DIK_APOSTROPHE 0x28
453 #define DIK_GRAVE 0x29 /* accent grave */
454 #define DIK_LSHIFT 0x2A
455 #define DIK_BACKSLASH 0x2B
463 #define DIK_COMMA 0x33
464 #define DIK_PERIOD 0x34 /* . on main keyboard */
465 #define DIK_SLASH 0x35 /* / on main keyboard */
466 #define DIK_RSHIFT 0x36
467 #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
468 #define DIK_LMENU 0x38 /* left Alt */
469 #define DIK_SPACE 0x39
470 #define DIK_CAPITAL 0x3A
481 #define DIK_NUMLOCK 0x45
482 #define DIK_SCROLL 0x46 /* Scroll Lock */
483 #define DIK_NUMPAD7 0x47
484 #define DIK_NUMPAD8 0x48
485 #define DIK_NUMPAD9 0x49
486 #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
487 #define DIK_NUMPAD4 0x4B
488 #define DIK_NUMPAD5 0x4C
489 #define DIK_NUMPAD6 0x4D
490 #define DIK_ADD 0x4E /* + on numeric keypad */
491 #define DIK_NUMPAD1 0x4F
492 #define DIK_NUMPAD2 0x50
493 #define DIK_NUMPAD3 0x51
494 #define DIK_NUMPAD0 0x52
495 #define DIK_DECIMAL 0x53 /* . on numeric keypad */
498 #define DIK_F13 0x64 /* (NEC PC98) */
499 #define DIK_F14 0x65 /* (NEC PC98) */
500 #define DIK_F15 0x66 /* (NEC PC98) */
501 #define DIK_KANA 0x70 /* (Japanese keyboard) */
502 #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
503 #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
504 #define DIK_YEN 0x7D /* (Japanese keyboard) */
505 #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
506 #define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
507 #define DIK_AT 0x91 /* (NEC PC98) */
508 #define DIK_COLON 0x92 /* (NEC PC98) */
509 #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
510 #define DIK_KANJI 0x94 /* (Japanese keyboard) */
511 #define DIK_STOP 0x95 /* (NEC PC98) */
512 #define DIK_AX 0x96 /* (Japan AX) */
513 #define DIK_UNLABELED 0x97 /* (J3100) */
514 #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
515 #define DIK_RCONTROL 0x9D
516 #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
517 #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
518 #define DIK_SYSRQ 0xB7
519 #define DIK_RMENU 0xB8 /* right Alt */
520 #define DIK_PAUSE 0xC5 /* Pause */
521 #define DIK_HOME 0xC7 /* Home on arrow keypad */
522 #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
523 #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
524 #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
525 #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
526 #define DIK_END 0xCF /* End on arrow keypad */
527 #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
528 #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
529 #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
530 #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
531 #define DIK_LWIN 0xDB /* Left Windows key */
532 #define DIK_RWIN 0xDC /* Right Windows key */
533 #define DIK_APPS 0xDD /* AppMenu key */
534 #define DIK_POWER 0xDE
535 #define DIK_SLEEP 0xDF
536 #define DIK_BACKSPACE DIK_BACK /* backspace */
537 #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
538 #define DIK_LALT DIK_LMENU /* left Alt */
539 #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
540 #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
541 #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
542 #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
543 #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
544 #define DIK_RALT DIK_RMENU /* right Alt */
545 #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
546 #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
547 #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
548 #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
549 #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
550 #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
552 #define DIDFT_ALL 0x00000000
553 #define DIDFT_RELAXIS 0x00000001
554 #define DIDFT_ABSAXIS 0x00000002
555 #define DIDFT_AXIS 0x00000003
556 #define DIDFT_PSHBUTTON 0x00000004
557 #define DIDFT_TGLBUTTON 0x00000008
558 #define DIDFT_BUTTON 0x0000000C
559 #define DIDFT_POV 0x00000010
560 #define DIDFT_COLLECTION 0x00000040
561 #define DIDFT_NODATA 0x00000080
562 #define DIDFT_ANYINSTANCE 0x00FFFF00
563 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
564 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
565 #define DIDFT_GETTYPE(n) LOBYTE(n)
566 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
567 #define DIDFT_FFACTUATOR 0x01000000
568 #define DIDFT_FFEFFECTTRIGGER 0x02000000
569 #define DIDFT_OUTPUT 0x10000000
570 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
571 #define DIDFT_NOCOLLECTION 0x00FFFF00
572 #define DIDF_ABSAXIS 0x00000001
573 #define DIDF_RELAXIS 0x00000002
575 #define DIGDD_PEEK 0x00000001
577 typedef struct DIDEVICEOBJECTDATA
{
582 } DIDEVICEOBJECTDATA
,*LPDIDEVICEOBJECTDATA
;
583 typedef const DIDEVICEOBJECTDATA
*LPCDIDEVICEOBJECTDATA
;
585 typedef struct _DIOBJECTDATAFORMAT
{
590 } DIOBJECTDATAFORMAT
, *LPDIOBJECTDATAFORMAT
;
598 LPDIOBJECTDATAFORMAT rgodf
;
599 } DIDATAFORMAT
, *LPDIDATAFORMAT
;
600 typedef const DIDATAFORMAT
*LPCDIDATAFORMAT
;
607 } DIPROPHEADER
,*LPDIPROPHEADER
;
608 typedef const DIPROPHEADER
*LPCDIPROPHEADER
;
610 #define DIPH_DEVICE 0
611 #define DIPH_BYOFFSET 1
613 #define DIPH_BYUSAGE 3
615 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
617 typedef struct DIPROPDWORD
{
620 } DIPROPDWORD
, *LPDIPROPDWORD
;
621 typedef const DIPROPDWORD
*LPCDIPROPDWORD
;
623 typedef struct DIPROPRANGE
{
627 } DIPROPRANGE
, *LPDIPROPRANGE
;
628 typedef const DIPROPRANGE
*LPCDIPROPRANGE
;
630 #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
631 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
633 typedef struct DIPROPCAL
{
638 } DIPROPCAL
, *LPDIPROPCAL
;
639 typedef const DIPROPCAL
*LPCDIPROPCAL
;
641 typedef struct DIPROPGUIDANDPATH
{
644 WCHAR wszPath
[MAX_PATH
];
645 } DIPROPGUIDANDPATH
, *LPDIPROPGUIDANDPATH
;
646 typedef const DIPROPGUIDANDPATH
*LPCDIPROPGUIDANDPATH
;
648 /* special property GUIDs */
650 #define MAKEDIPROP(prop) (*(const GUID *)(prop))
652 #define MAKEDIPROP(prop) ((REFGUID)(prop))
654 #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
655 #define DIPROP_AXISMODE MAKEDIPROP(2)
657 #define DIPROPAXISMODE_ABS 0
658 #define DIPROPAXISMODE_REL 1
660 #define DIPROP_GRANULARITY MAKEDIPROP(3)
661 #define DIPROP_RANGE MAKEDIPROP(4)
662 #define DIPROP_DEADZONE MAKEDIPROP(5)
663 #define DIPROP_SATURATION MAKEDIPROP(6)
664 #define DIPROP_FFGAIN MAKEDIPROP(7)
665 #define DIPROP_FFLOAD MAKEDIPROP(8)
666 #define DIPROP_AUTOCENTER MAKEDIPROP(9)
668 #define DIPROPAUTOCENTER_OFF 0
669 #define DIPROPAUTOCENTER_ON 1
671 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
673 #define DIPROPCALIBRATIONMODE_COOKED 0
674 #define DIPROPCALIBRATIONMODE_RAW 1
676 #define DIPROP_CALIBRATION MAKEDIPROP(11)
677 #define DIPROP_GUIDANDPATH MAKEDIPROP(12)
680 typedef struct DIDEVCAPS
{
687 #if(DIRECTINPUT_VERSION >= 0x0500)
688 DWORD dwFFSamplePeriod
;
689 DWORD dwFFMinTimeResolution
;
690 DWORD dwFirmwareRevision
;
691 DWORD dwHardwareRevision
;
692 DWORD dwFFDriverVersion
;
693 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
694 } DIDEVCAPS
,*LPDIDEVCAPS
;
696 #define DIDC_ATTACHED 0x00000001
697 #define DIDC_POLLEDDEVICE 0x00000002
698 #define DIDC_EMULATED 0x00000004
699 #define DIDC_POLLEDDATAFORMAT 0x00000008
700 #define DIDC_FORCEFEEDBACK 0x00000100
701 #define DIDC_FFATTACK 0x00000200
702 #define DIDC_FFFADE 0x00000400
703 #define DIDC_SATURATION 0x00000800
704 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
705 #define DIDC_POSNEGSATURATION 0x00002000
706 #define DIDC_DEADBAND 0x00004000
708 /* SetCooperativeLevel dwFlags */
709 #define DISCL_EXCLUSIVE 0x00000001
710 #define DISCL_NONEXCLUSIVE 0x00000002
711 #define DISCL_FOREGROUND 0x00000004
712 #define DISCL_BACKGROUND 0x00000008
714 typedef struct DICONSTANTFORCE
{
716 } DICONSTANTFORCE
, *LPDICONSTANTFORCE
;
717 typedef const DICONSTANTFORCE
*LPCDICONSTANTFORCE
;
719 typedef struct DIRAMPFORCE
{
722 } DIRAMPFORCE
, *LPDIRAMPFORCE
;
723 typedef const DIRAMPFORCE
*LPCDIRAMPFORCE
;
725 typedef struct DIPERIODIC
{
730 } DIPERIODIC
, *LPDIPERIODIC
;
731 typedef const DIPERIODIC
*LPCDIPERIODIC
;
733 typedef struct DICONDITION
{
735 LONG lPositiveCoefficient
;
736 LONG lNegativeCoefficient
;
737 DWORD dwPositiveSaturation
;
738 DWORD dwNegativeSaturation
;
740 } DICONDITION
, *LPDICONDITION
;
741 typedef const DICONDITION
*LPCDICONDITION
;
743 typedef struct DICUSTOMFORCE
{
745 DWORD dwSamplePeriod
;
748 } DICUSTOMFORCE
, *LPDICUSTOMFORCE
;
749 typedef const DICUSTOMFORCE
*LPCDICUSTOMFORCE
;
751 typedef struct DIENVELOPE
{
757 } DIENVELOPE
, *LPDIENVELOPE
;
758 typedef const DIENVELOPE
*LPCDIENVELOPE
;
760 typedef struct DIEFFECT
{
764 DWORD dwSamplePeriod
;
766 DWORD dwTriggerButton
;
767 DWORD dwTriggerRepeatInterval
;
771 LPDIENVELOPE lpEnvelope
;
772 DWORD cbTypeSpecificParams
;
773 LPVOID lpvTypeSpecificParams
;
774 } DIEFFECT
, *LPDIEFFECT
;
775 typedef const DIEFFECT
*LPCDIEFFECT
;
777 typedef struct DIEFFECTINFOA
{
781 DWORD dwStaticParams
;
782 DWORD dwDynamicParams
;
783 CHAR tszName
[MAX_PATH
];
784 } DIEFFECTINFOA
, *LPDIEFFECTINFOA
;
785 typedef const DIEFFECTINFOA
*LPCDIEFFECTINFOA
;
787 typedef struct DIEFFECTINFOW
{
791 DWORD dwStaticParams
;
792 DWORD dwDynamicParams
;
793 WCHAR tszName
[MAX_PATH
];
794 } DIEFFECTINFOW
, *LPDIEFFECTINFOW
;
795 typedef const DIEFFECTINFOW
*LPCDIEFFECTINFOW
;
797 DECL_WINELIB_TYPE_AW(DIEFFECTINFO
)
798 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO
)
799 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO
)
801 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSCALLBACKA
)(LPCDIEFFECTINFOA
, LPVOID
);
802 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSCALLBACKW
)(LPCDIEFFECTINFOW
, LPVOID
);
804 typedef struct DIEFFESCAPE
{
811 } DIEFFESCAPE
, *LPDIEFFESCAPE
;
813 typedef struct DIJOYSTATE
{
823 } DIJOYSTATE
, *LPDIJOYSTATE
;
825 typedef struct DIJOYSTATE2
{
834 BYTE rgbButtons
[128];
835 LONG lVX
; /* 'v' as in velocity */
842 LONG lAX
; /* 'a' as in acceleration */
849 LONG lFX
; /* 'f' as in force */
852 LONG lFRx
; /* 'fr' as in rotational force aka torque */
856 } DIJOYSTATE2
, *LPDIJOYSTATE2
;
858 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
859 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
860 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
861 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
862 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
863 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
864 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
866 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
868 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
869 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
870 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
871 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
872 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
873 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
874 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
875 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
876 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
877 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
878 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
879 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
880 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
881 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
882 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
883 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
884 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
885 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
886 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
887 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
888 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
889 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
890 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
891 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
892 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
893 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
894 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
895 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
896 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
897 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
898 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
899 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
900 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
902 /* DInput 7 structures, types */
903 typedef struct DIFILEEFFECT
{
906 LPCDIEFFECT lpDiEffect
;
907 CHAR szFriendlyName
[MAX_PATH
];
908 } DIFILEEFFECT
, *LPDIFILEEFFECT
;
910 typedef const DIFILEEFFECT
*LPCDIFILEEFFECT
;
911 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSINFILECALLBACK
)(LPCDIFILEEFFECT
, LPVOID
);
913 /* DInput 8 structures and types */
914 #if DIRECTINPUT_VERSION >= 0x0800
915 typedef struct _DIACTIONA
{
920 LPCSTR lptszActionName
;
926 } DIACTIONA
, *LPDIACTIONA
;
927 typedef const DIACTIONA
*LPCDIACTIONA
;
929 typedef struct _DIACTIONW
{
934 LPCWSTR lptszActionName
;
940 } DIACTIONW
, *LPDIACTIONW
;
941 typedef const DIACTIONW
*LPCDIACTIONW
;
943 DECL_WINELIB_TYPE_AW(DIACTION
)
944 DECL_WINELIB_TYPE_AW(LPDIACTION
)
945 DECL_WINELIB_TYPE_AW(LPCDIACTION
)
947 #define DIA_FORCEFEEDBACK 0x00000001
948 #define DIA_APPMAPPED 0x00000002
949 #define DIA_APPNOMAP 0x00000004
950 #define DIA_NORANGE 0x00000008
951 #define DIA_APPFIXED 0x00000010
953 #define DIAH_UNMAPPED 0x00000000
954 #define DIAH_USERCONFIG 0x00000001
955 #define DIAH_APPREQUESTED 0x00000002
956 #define DIAH_HWAPP 0x00000004
957 #define DIAH_HWDEFAULT 0x00000008
958 #define DIAH_DEFAULT 0x00000020
959 #define DIAH_ERROR 0x80000000
961 typedef struct _DIACTIONFORMATA
{
966 LPDIACTIONA rgoAction
;
972 HINSTANCE hInstString
;
973 FILETIME ftTimeStamp
;
975 CHAR tszActionMap
[MAX_PATH
];
976 } DIACTIONFORMATA
, *LPDIACTIONFORMATA
;
977 typedef const DIACTIONFORMATA
*LPCDIACTIONFORMATA
;
979 typedef struct _DIACTIONFORMATW
{
984 LPDIACTIONW rgoAction
;
990 HINSTANCE hInstString
;
991 FILETIME ftTimeStamp
;
993 WCHAR tszActionMap
[MAX_PATH
];
994 } DIACTIONFORMATW
, *LPDIACTIONFORMATW
;
995 typedef const DIACTIONFORMATW
*LPCDIACTIONFORMATW
;
997 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT
)
998 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT
)
999 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT
)
1001 #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
1002 #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
1003 #define DIAFTS_UNUSEDDEVICELOW 0x00000000
1004 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
1006 #define DIDBAM_DEFAULT 0x00000000
1007 #define DIDBAM_PRESERVE 0x00000001
1008 #define DIDBAM_INITIALIZE 0x00000002
1009 #define DIDBAM_HWDEFAULTS 0x00000004
1011 #define DIDSAM_DEFAULT 0x00000000
1012 #define DIDSAM_NOUSER 0x00000001
1013 #define DIDSAM_FORCESAVE 0x00000002
1015 #define DICD_DEFAULT 0x00000000
1016 #define DICD_EDIT 0x00000001
1018 #ifndef D3DCOLOR_DEFINED
1019 typedef DWORD D3DCOLOR
;
1020 #define D3DCOLOR_DEFINED
1023 typedef struct _DICOLORSET
{
1026 D3DCOLOR cTextHighlight
;
1027 D3DCOLOR cCalloutLine
;
1028 D3DCOLOR cCalloutHighlight
;
1030 D3DCOLOR cControlFill
;
1031 D3DCOLOR cHighlightFill
;
1033 } DICOLORSET
, *LPDICOLORSET
;
1034 typedef const DICOLORSET
*LPCDICOLORSET
;
1036 typedef struct _DICONFIGUREDEVICESPARAMSA
{
1039 LPSTR lptszUserNames
;
1041 LPDIACTIONFORMATA lprgFormats
;
1044 LPUNKNOWN lpUnkDDSTarget
;
1045 } DICONFIGUREDEVICESPARAMSA
, *LPDICONFIGUREDEVICESPARAMSA
;
1046 typedef const DICONFIGUREDEVICESPARAMSA
*LPCDICONFIGUREDEVICESPARAMSA
;
1048 typedef struct _DICONFIGUREDEVICESPARAMSW
{
1051 LPWSTR lptszUserNames
;
1053 LPDIACTIONFORMATW lprgFormats
;
1056 LPUNKNOWN lpUnkDDSTarget
;
1057 } DICONFIGUREDEVICESPARAMSW
, *LPDICONFIGUREDEVICESPARAMSW
;
1058 typedef const DICONFIGUREDEVICESPARAMSW
*LPCDICONFIGUREDEVICESPARAMSW
;
1060 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS
)
1061 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS
)
1062 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS
)
1064 #define DIDIFT_CONFIGURATION 0x00000001
1065 #define DIDIFT_OVERLAY 0x00000002
1067 #define DIDAL_CENTERED 0x00000000
1068 #define DIDAL_LEFTALIGNED 0x00000001
1069 #define DIDAL_RIGHTALIGNED 0x00000002
1070 #define DIDAL_MIDDLE 0x00000000
1071 #define DIDAL_TOPALIGNED 0x00000004
1072 #define DIDAL_BOTTOMALIGNED 0x00000008
1074 typedef struct _DIDEVICEIMAGEINFOA
{
1075 CHAR tszImagePath
[MAX_PATH
];
1081 POINT rgptCalloutLine
[5];
1084 } DIDEVICEIMAGEINFOA
, *LPDIDEVICEIMAGEINFOA
;
1085 typedef const DIDEVICEIMAGEINFOA
*LPCDIDEVICEIMAGEINFOA
;
1087 typedef struct _DIDEVICEIMAGEINFOW
{
1088 WCHAR tszImagePath
[MAX_PATH
];
1094 POINT rgptCalloutLine
[5];
1097 } DIDEVICEIMAGEINFOW
, *LPDIDEVICEIMAGEINFOW
;
1098 typedef const DIDEVICEIMAGEINFOW
*LPCDIDEVICEIMAGEINFOW
;
1100 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO
)
1101 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO
)
1102 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO
)
1104 typedef struct _DIDEVICEIMAGEINFOHEADERA
{
1106 DWORD dwSizeImageInfo
;
1113 LPDIDEVICEIMAGEINFOA lprgImageInfoArray
;
1114 } DIDEVICEIMAGEINFOHEADERA
, *LPDIDEVICEIMAGEINFOHEADERA
;
1115 typedef const DIDEVICEIMAGEINFOHEADERA
*LPCDIDEVICEIMAGEINFOHEADERA
;
1117 typedef struct _DIDEVICEIMAGEINFOHEADERW
{
1119 DWORD dwSizeImageInfo
;
1126 LPDIDEVICEIMAGEINFOW lprgImageInfoArray
;
1127 } DIDEVICEIMAGEINFOHEADERW
, *LPDIDEVICEIMAGEINFOHEADERW
;
1128 typedef const DIDEVICEIMAGEINFOHEADERW
*LPCDIDEVICEIMAGEINFOHEADERW
;
1130 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER
)
1131 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER
)
1132 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER
)
1137 /*****************************************************************************
1138 * IDirectInputEffect interface
1140 #define INTERFACE IDirectInputEffect
1141 #define IDirectInputEffect_METHODS \
1143 STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE; \
1144 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE; \
1145 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE; \
1146 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE; \
1147 STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE; \
1148 STDMETHOD(Stop)(THIS) PURE; \
1149 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE; \
1150 STDMETHOD(Download)(THIS) PURE; \
1151 STDMETHOD(Unload)(THIS) PURE; \
1152 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1153 ICOM_DEFINE(IDirectInputEffect
,IUnknown
)
1157 /*** IUnknown methods ***/
1158 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1159 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
1160 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
1161 /*** IDirectInputEffect methods ***/
1162 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1163 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
1164 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
1165 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
1166 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
1167 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
1168 #define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->lpVtbl->GetEffectStatus(p,a)
1169 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
1170 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
1171 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1175 /*****************************************************************************
1176 * IDirectInputDeviceA interface
1178 #define INTERFACE IDirectInputDeviceA
1179 #define IDirectInputDeviceA_METHODS \
1181 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1182 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1183 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1184 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1185 STDMETHOD(Acquire)(THIS) PURE; \
1186 STDMETHOD(Unacquire)(THIS) PURE; \
1187 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1188 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1189 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1190 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1191 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1192 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1193 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; \
1194 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1195 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1196 ICOM_DEFINE(IDirectInputDeviceA
,IUnknown
)
1199 /*****************************************************************************
1200 * IDirectInputDeviceW interface
1202 #define INTERFACE IDirectInputDeviceW
1203 #define IDirectInputDeviceW_METHODS \
1205 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1206 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1207 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1208 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1209 STDMETHOD(Acquire)(THIS) PURE; \
1210 STDMETHOD(Unacquire)(THIS) PURE; \
1211 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1212 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1213 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1214 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1215 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1216 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1217 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; \
1218 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1219 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1220 ICOM_DEFINE(IDirectInputDeviceW
,IUnknown
)
1224 /*** IUnknown methods ***/
1225 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1226 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
1227 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
1228 /*** IDirectInputDevice methods ***/
1229 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1230 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1231 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1232 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1233 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
1234 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1235 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1236 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1237 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1238 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1239 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1240 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1241 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1242 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1243 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1247 /*****************************************************************************
1248 * IDirectInputDevice2A interface
1250 #define INTERFACE IDirectInputDevice2A
1251 #define IDirectInputDevice2A_METHODS \
1252 IDirectInputDeviceA_METHODS \
1253 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1254 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1255 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; \
1256 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1257 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1258 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1259 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1260 STDMETHOD(Poll)(THIS) PURE; \
1261 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1262 ICOM_DEFINE(IDirectInputDevice2A
,IDirectInputDeviceA
)
1265 /*****************************************************************************
1266 * IDirectInputDevice2W interface
1268 #define INTERFACE IDirectInputDevice2W
1269 #define IDirectInputDevice2W_METHODS \
1270 IDirectInputDeviceW_METHODS \
1271 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1272 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1273 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE; \
1274 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1275 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1276 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1277 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1278 STDMETHOD(Poll)(THIS) PURE; \
1279 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1280 ICOM_DEFINE(IDirectInputDevice2W
,IDirectInputDeviceW
)
1284 /*** IUnknown methods ***/
1285 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1286 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
1287 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
1288 /*** IDirectInputDevice methods ***/
1289 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1290 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1291 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1292 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1293 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
1294 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1295 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1296 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1297 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1298 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1299 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1300 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1301 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1302 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1303 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1304 /*** IDirectInputDevice2 methods ***/
1305 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1306 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1307 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1308 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1309 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1310 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1311 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1312 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
1313 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1316 #if DIRECTINPUT_VERSION >= 0x0700
1317 /*****************************************************************************
1318 * IDirectInputDevice7A interface
1320 #define INTERFACE IDirectInputDevice7A
1321 #define IDirectInputDevice7A_METHODS \
1322 IDirectInputDevice2A_METHODS \
1323 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1324 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1325 ICOM_DEFINE(IDirectInputDevice7A
,IDirectInputDevice2A
)
1328 /*****************************************************************************
1329 * IDirectInputDevice7W interface
1331 #define INTERFACE IDirectInputDevice7W
1332 #define IDirectInputDevice7W_METHODS \
1333 IDirectInputDevice2W_METHODS \
1334 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1335 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1336 ICOM_DEFINE(IDirectInputDevice7W
,IDirectInputDevice2W
)
1340 /*** IUnknown methods ***/
1341 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1342 #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
1343 #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
1344 /*** IDirectInputDevice methods ***/
1345 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1346 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1347 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1348 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1349 #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
1350 #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1351 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1352 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1353 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1354 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1355 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1356 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1357 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1358 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1359 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1360 /*** IDirectInputDevice2 methods ***/
1361 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1362 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1363 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1364 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1365 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1366 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1367 #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1368 #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
1369 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1370 /*** IDirectInputDevice7 methods ***/
1371 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1372 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1377 #if DIRECTINPUT_VERSION >= 0x0800
1378 /*****************************************************************************
1379 * IDirectInputDevice8A interface
1381 #define INTERFACE IDirectInputDevice8A
1382 #define IDirectInputDevice8A_METHODS \
1383 IDirectInputDevice7A_METHODS \
1384 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1385 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1386 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
1387 ICOM_DEFINE(IDirectInputDevice8A
,IDirectInputDevice7A
)
1390 /*****************************************************************************
1391 * IDirectInputDevice8W interface
1393 #define INTERFACE IDirectInputDevice8W
1394 #define IDirectInputDevice8W_METHODS \
1395 IDirectInputDevice7W_METHODS \
1396 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; \
1397 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; \
1398 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
1399 ICOM_DEFINE(IDirectInputDevice8W
,IDirectInputDevice7W
)
1403 /*** IUnknown methods ***/
1404 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1405 #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
1406 #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
1407 /*** IDirectInputDevice methods ***/
1408 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1409 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1410 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1411 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1412 #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
1413 #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1414 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1415 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1416 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1417 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1418 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1419 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1420 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1421 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1422 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1423 /*** IDirectInputDevice2 methods ***/
1424 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1425 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1426 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1427 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1428 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1429 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1430 #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1431 #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
1432 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1433 /*** IDirectInputDevice7 methods ***/
1434 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1435 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1436 /*** IDirectInputDevice8 methods ***/
1437 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
1438 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
1439 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
1444 /* "Standard" Mouse report... */
1445 typedef struct DIMOUSESTATE
{
1452 /* "Standard" Mouse report for DInput 7... */
1453 typedef struct DIMOUSESTATE2
{
1460 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
1461 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
1462 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
1463 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1464 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1465 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1466 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1471 extern const DIDATAFORMAT c_dfDIMouse
;
1472 extern const DIDATAFORMAT c_dfDIMouse2
; /* DX 7 */
1473 extern const DIDATAFORMAT c_dfDIKeyboard
;
1474 extern const DIDATAFORMAT c_dfDIJoystick
;
1475 extern const DIDATAFORMAT c_dfDIJoystick2
;
1480 /*****************************************************************************
1481 * IDirectInputA interface
1483 #define INTERFACE IDirectInputA
1484 #define IDirectInputA_METHODS \
1486 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1487 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1488 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1489 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1490 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1491 ICOM_DEFINE(IDirectInputA
,IUnknown
)
1494 /*****************************************************************************
1495 * IDirectInputW interface
1497 #define INTERFACE IDirectInputW
1498 #define IDirectInputW_METHODS \
1500 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1501 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1502 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1503 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1504 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1505 ICOM_DEFINE(IDirectInputW
,IUnknown
)
1509 /*** IUnknown methods ***/
1510 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1511 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
1512 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
1513 /*** IDirectInput methods ***/
1514 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1515 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1516 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1517 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1518 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1521 /*****************************************************************************
1522 * IDirectInput2A interface
1524 #define INTERFACE IDirectInput2A
1525 #define IDirectInput2A_METHODS \
1526 IDirectInputA_METHODS \
1527 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
1528 ICOM_DEFINE(IDirectInput2A
,IDirectInputA
)
1531 /*****************************************************************************
1532 * IDirectInput2W interface
1534 #define INTERFACE IDirectInput2W
1535 #define IDirectInput2W_METHODS \
1536 IDirectInputW_METHODS \
1537 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
1538 ICOM_DEFINE(IDirectInput2W
,IDirectInputW
)
1542 /*** IUnknown methods ***/
1543 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1544 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
1545 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
1546 /*** IDirectInput methods ***/
1547 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1548 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1549 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1550 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1551 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1552 /*** IDirectInput2 methods ***/
1553 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1556 #if DIRECTINPUT_VERSION >= 0x0700
1557 /*****************************************************************************
1558 * IDirectInput7A interface
1560 #define INTERFACE IDirectInput7A
1561 #define IDirectInput7A_METHODS \
1562 IDirectInput2A_METHODS \
1563 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1564 ICOM_DEFINE(IDirectInput7A
,IDirectInput2A
)
1567 /*****************************************************************************
1568 * IDirectInput7W interface
1570 #define INTERFACE IDirectInput7W
1571 #define IDirectInput7W_METHODS \
1572 IDirectInput2W_METHODS \
1573 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1574 ICOM_DEFINE(IDirectInput7W
,IDirectInput2W
)
1578 /*** IUnknown methods ***/
1579 #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1580 #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
1581 #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
1582 /*** IDirectInput methods ***/
1583 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1584 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1585 #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1586 #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1587 #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1588 /*** IDirectInput2 methods ***/
1589 #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1590 /*** IDirectInput7 methods ***/
1591 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
1596 #if DIRECTINPUT_VERSION >= 0x0800
1597 /*****************************************************************************
1598 * IDirectInput8A interface
1600 #define INTERFACE IDirectInput8A
1601 #define IDirectInput8A_METHODS \
1603 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1604 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1605 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1606 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1607 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1608 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; \
1609 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1610 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1611 ICOM_DEFINE(IDirectInput8A
,IUnknown
)
1614 /*****************************************************************************
1615 * IDirectInput8W interface
1617 #define INTERFACE IDirectInput8W
1618 #define IDirectInput8W_METHODS \
1620 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1621 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1622 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1623 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1624 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1625 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE; \
1626 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1627 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1628 ICOM_DEFINE(IDirectInput8W
,IUnknown
)
1632 /*** IUnknown methods ***/
1633 #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1634 #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
1635 #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
1636 /*** IDirectInput8 methods ***/
1637 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1638 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1639 #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1640 #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1641 #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1642 #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1643 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
1644 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
1649 /* Export functions */
1655 #if DIRECTINPUT_VERSION >= 0x0800
1656 HRESULT WINAPI
DirectInput8Create(HINSTANCE
,DWORD
,REFIID
,LPVOID
*,LPUNKNOWN
);
1659 HRESULT WINAPI
DirectInputCreateA(HINSTANCE
,DWORD
,LPDIRECTINPUTA
*,LPUNKNOWN
);
1660 HRESULT WINAPI
DirectInputCreateW(HINSTANCE
,DWORD
,LPDIRECTINPUTW
*,LPUNKNOWN
);
1661 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
1663 HRESULT WINAPI
DirectInputCreateEx(HINSTANCE
,DWORD
,REFIID
,LPVOID
*,LPUNKNOWN
);
1669 #endif /* __WINE_DINPUT_H */