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);
71 DEFINE_GUID(GUID_SysMouseEm
, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
72 DEFINE_GUID(GUID_SysMouseEm2
, 0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
73 DEFINE_GUID(GUID_SysKeyboardEm
, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
74 DEFINE_GUID(GUID_SysKeyboardEm2
,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
76 /* predefined forcefeedback effects */
77 DEFINE_GUID(GUID_ConstantForce
, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
78 DEFINE_GUID(GUID_RampForce
, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
79 DEFINE_GUID(GUID_Square
, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
80 DEFINE_GUID(GUID_Sine
, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
81 DEFINE_GUID(GUID_Triangle
, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
82 DEFINE_GUID(GUID_SawtoothUp
, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
83 DEFINE_GUID(GUID_SawtoothDown
, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
84 DEFINE_GUID(GUID_Spring
, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
85 DEFINE_GUID(GUID_Damper
, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
86 DEFINE_GUID(GUID_Inertia
, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
87 DEFINE_GUID(GUID_Friction
, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
88 DEFINE_GUID(GUID_CustomForce
, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
90 typedef struct IDirectInputA IDirectInputA
,*LPDIRECTINPUTA
;
91 typedef struct IDirectInputW IDirectInputW
,*LPDIRECTINPUTW
;
92 typedef struct IDirectInput2A IDirectInput2A
,*LPDIRECTINPUT2A
;
93 typedef struct IDirectInput2W IDirectInput2W
,*LPDIRECTINPUT2W
;
94 typedef struct IDirectInput7A IDirectInput7A
,*LPDIRECTINPUT7A
;
95 typedef struct IDirectInput7W IDirectInput7W
,*LPDIRECTINPUT7W
;
96 typedef struct IDirectInput8A IDirectInput8A
,*LPDIRECTINPUT8A
;
97 typedef struct IDirectInput8W IDirectInput8W
,*LPDIRECTINPUT8W
;
98 typedef struct IDirectInputDeviceA IDirectInputDeviceA
,*LPDIRECTINPUTDEVICEA
;
99 typedef struct IDirectInputDeviceW IDirectInputDeviceW
,*LPDIRECTINPUTDEVICEW
;
100 typedef struct IDirectInputDevice2A IDirectInputDevice2A
,*LPDIRECTINPUTDEVICE2A
;
101 typedef struct IDirectInputDevice2W IDirectInputDevice2W
,*LPDIRECTINPUTDEVICE2W
;
102 typedef struct IDirectInputDevice7A IDirectInputDevice7A
,*LPDIRECTINPUTDEVICE7A
;
103 typedef struct IDirectInputDevice7W IDirectInputDevice7W
,*LPDIRECTINPUTDEVICE7W
;
104 typedef struct IDirectInputDevice8A IDirectInputDevice8A
,*LPDIRECTINPUTDEVICE8A
;
105 typedef struct IDirectInputDevice8W IDirectInputDevice8W
,*LPDIRECTINPUTDEVICE8W
;
106 typedef struct IDirectInputEffect IDirectInputEffect
,*LPDIRECTINPUTEFFECT
;
107 typedef struct SysKeyboardA SysKeyboardA
,*LPSYSKEYBOARDA
;
108 typedef struct SysMouseA SysMouseA
,*LPSYSMOUSEA
;
110 #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
111 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT
)
112 #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
113 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2
)
114 #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
115 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7
)
116 #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
117 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE
)
118 #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
119 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2
)
120 #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
121 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7
)
122 #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
123 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8
)
126 #define DI_NOTATTACHED S_FALSE
127 #define DI_BUFFEROVERFLOW S_FALSE
128 #define DI_PROPNOEFFECT S_FALSE
129 #define DI_NOEFFECT S_FALSE
130 #define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
131 #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
132 #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
133 #define DI_TRUNCATED ((HRESULT)0x00000008L)
134 #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
136 #define DIERR_OLDDIRECTINPUTVERSION \
137 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
138 #define DIERR_BETADIRECTINPUTVERSION \
139 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
140 #define DIERR_BADDRIVERVER \
141 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
142 #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
143 #define DIERR_NOTFOUND \
144 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
145 #define DIERR_OBJECTNOTFOUND \
146 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
147 #define DIERR_INVALIDPARAM E_INVALIDARG
148 #define DIERR_NOINTERFACE E_NOINTERFACE
149 #define DIERR_GENERIC E_FAIL
150 #define DIERR_OUTOFMEMORY E_OUTOFMEMORY
151 #define DIERR_UNSUPPORTED E_NOTIMPL
152 #define DIERR_NOTINITIALIZED \
153 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
154 #define DIERR_ALREADYINITIALIZED \
155 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
156 #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
157 #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
158 #define DIERR_INPUTLOST \
159 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
160 #define DIERR_ACQUIRED \
161 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
162 #define DIERR_NOTACQUIRED \
163 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
164 #define DIERR_READONLY E_ACCESSDENIED
165 #define DIERR_HANDLEEXISTS E_ACCESSDENIED
167 #define E_PENDING 0x8000000AL
169 #define DIERR_INSUFFICIENTPRIVS 0x80040200L
170 #define DIERR_DEVICEFULL 0x80040201L
171 #define DIERR_MOREDATA 0x80040202L
172 #define DIERR_NOTDOWNLOADED 0x80040203L
173 #define DIERR_HASEFFECTS 0x80040204L
174 #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
175 #define DIERR_INCOMPLETEEFFECT 0x80040206L
176 #define DIERR_NOTBUFFERED 0x80040207L
177 #define DIERR_EFFECTPLAYING 0x80040208L
178 #define DIERR_UNPLUGGED 0x80040209L
179 #define DIERR_REPORTFULL 0x8004020AL
181 #define DIENUM_STOP 0
182 #define DIENUM_CONTINUE 1
184 #define DIEDFL_ALLDEVICES 0x00000000
185 #define DIEDFL_ATTACHEDONLY 0x00000000
186 #define DIEDFL_FORCEFEEDBACK 0x00000100
187 #define DIEDFL_INCLUDEALIASES 0x00010000
188 #define DIEDFL_INCLUDEPHANTOMS 0x00020000
189 #define DIEDFL_INCLUDEHIDDEN 0x00040000
191 #define DIDEVTYPE_DEVICE 1
192 #define DIDEVTYPE_MOUSE 2
193 #define DIDEVTYPE_KEYBOARD 3
194 #define DIDEVTYPE_JOYSTICK 4
195 #define DIDEVTYPE_HID 0x00010000
197 #define DI8DEVCLASS_ALL 0
198 #define DI8DEVCLASS_DEVICE 1
199 #define DI8DEVCLASS_POINTER 2
200 #define DI8DEVCLASS_KEYBOARD 3
201 #define DI8DEVCLASS_GAMECTRL 4
203 #define DI8DEVTYPE_DEVICE 0x11
204 #define DI8DEVTYPE_MOUSE 0x12
205 #define DI8DEVTYPE_KEYBOARD 0x13
206 #define DI8DEVTYPE_JOYSTICK 0x14
207 #define DI8DEVTYPE_GAMEPAD 0x15
208 #define DI8DEVTYPE_DRIVING 0x16
209 #define DI8DEVTYPE_FLIGHT 0x17
210 #define DI8DEVTYPE_1STPERSON 0x18
211 #define DI8DEVTYPE_DEVICECTRL 0x19
212 #define DI8DEVTYPE_SCREENPOINTER 0x1A
213 #define DI8DEVTYPE_REMOTE 0x1B
214 #define DI8DEVTYPE_SUPPLEMENTAL 0x1C
216 #define DIDEVTYPEMOUSE_UNKNOWN 1
217 #define DIDEVTYPEMOUSE_TRADITIONAL 2
218 #define DIDEVTYPEMOUSE_FINGERSTICK 3
219 #define DIDEVTYPEMOUSE_TOUCHPAD 4
220 #define DIDEVTYPEMOUSE_TRACKBALL 5
222 #define DIDEVTYPEKEYBOARD_UNKNOWN 0
223 #define DIDEVTYPEKEYBOARD_PCXT 1
224 #define DIDEVTYPEKEYBOARD_OLIVETTI 2
225 #define DIDEVTYPEKEYBOARD_PCAT 3
226 #define DIDEVTYPEKEYBOARD_PCENH 4
227 #define DIDEVTYPEKEYBOARD_NOKIA1050 5
228 #define DIDEVTYPEKEYBOARD_NOKIA9140 6
229 #define DIDEVTYPEKEYBOARD_NEC98 7
230 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
231 #define DIDEVTYPEKEYBOARD_NEC98106 9
232 #define DIDEVTYPEKEYBOARD_JAPAN106 10
233 #define DIDEVTYPEKEYBOARD_JAPANAX 11
234 #define DIDEVTYPEKEYBOARD_J3100 12
236 #define DIDEVTYPEJOYSTICK_UNKNOWN 1
237 #define DIDEVTYPEJOYSTICK_TRADITIONAL 2
238 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
239 #define DIDEVTYPEJOYSTICK_GAMEPAD 4
240 #define DIDEVTYPEJOYSTICK_RUDDER 5
241 #define DIDEVTYPEJOYSTICK_WHEEL 6
242 #define DIDEVTYPEJOYSTICK_HEADTRACKER 7
244 #define DI8DEVTYPEMOUSE_UNKNOWN 1
245 #define DI8DEVTYPEMOUSE_TRADITIONAL 2
246 #define DI8DEVTYPEMOUSE_FINGERSTICK 3
247 #define DI8DEVTYPEMOUSE_TOUCHPAD 4
248 #define DI8DEVTYPEMOUSE_TRACKBALL 5
249 #define DI8DEVTYPEMOUSE_ABSOLUTE 6
251 #define DI8DEVTYPEKEYBOARD_UNKNOWN 0
252 #define DI8DEVTYPEKEYBOARD_PCXT 1
253 #define DI8DEVTYPEKEYBOARD_OLIVETTI 2
254 #define DI8DEVTYPEKEYBOARD_PCAT 3
255 #define DI8DEVTYPEKEYBOARD_PCENH 4
256 #define DI8DEVTYPEKEYBOARD_NOKIA1050 5
257 #define DI8DEVTYPEKEYBOARD_NOKIA9140 6
258 #define DI8DEVTYPEKEYBOARD_NEC98 7
259 #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
260 #define DI8DEVTYPEKEYBOARD_NEC98106 9
261 #define DI8DEVTYPEKEYBOARD_JAPAN106 10
262 #define DI8DEVTYPEKEYBOARD_JAPANAX 11
263 #define DI8DEVTYPEKEYBOARD_J3100 12
265 #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
267 #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
268 #define DI8DEVTYPEJOYSTICK_STANDARD 2
270 #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
271 #define DI8DEVTYPEGAMEPAD_STANDARD 2
272 #define DI8DEVTYPEGAMEPAD_TILT 3
274 #define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
275 #define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
276 #define DI8DEVTYPEDRIVING_DUALPEDALS 3
277 #define DI8DEVTYPEDRIVING_THREEPEDALS 4
278 #define DI8DEVTYPEDRIVING_HANDHELD 5
280 #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
281 #define DI8DEVTYPEFLIGHT_STICK 2
282 #define DI8DEVTYPEFLIGHT_YOKE 3
283 #define DI8DEVTYPEFLIGHT_RC 4
285 #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
286 #define DI8DEVTYPE1STPERSON_UNKNOWN 2
287 #define DI8DEVTYPE1STPERSON_SIXDOF 3
288 #define DI8DEVTYPE1STPERSON_SHOOTER 4
290 #define DI8DEVTYPESCREENPTR_UNKNOWN 2
291 #define DI8DEVTYPESCREENPTR_LIGHTGUN 3
292 #define DI8DEVTYPESCREENPTR_LIGHTPEN 4
293 #define DI8DEVTYPESCREENPTR_TOUCH 5
295 #define DI8DEVTYPEREMOTE_UNKNOWN 2
297 #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
298 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
299 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
301 #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
302 #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
303 #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
304 #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
305 #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
306 #define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
307 #define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
308 #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
309 #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
310 #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
311 #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
312 #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
314 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
315 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
317 typedef struct DIDEVICEOBJECTINSTANCE_DX3A
{
323 CHAR tszName
[MAX_PATH
];
324 } DIDEVICEOBJECTINSTANCE_DX3A
, *LPDIDEVICEOBJECTINSTANCE_DX3A
;
325 typedef const DIDEVICEOBJECTINSTANCE_DX3A
*LPCDIDEVICEOBJECTINSTANCE_DX3A
;
326 typedef struct DIDEVICEOBJECTINSTANCE_DX3W
{
332 WCHAR tszName
[MAX_PATH
];
333 } DIDEVICEOBJECTINSTANCE_DX3W
, *LPDIDEVICEOBJECTINSTANCE_DX3W
;
334 typedef const DIDEVICEOBJECTINSTANCE_DX3W
*LPCDIDEVICEOBJECTINSTANCE_DX3W
;
336 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3
)
337 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3
)
338 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3
)
340 typedef struct DIDEVICEOBJECTINSTANCEA
{
346 CHAR tszName
[MAX_PATH
];
347 #if(DIRECTINPUT_VERSION >= 0x0500)
349 DWORD dwFFForceResolution
;
350 WORD wCollectionNumber
;
351 WORD wDesignatorIndex
;
357 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
358 } DIDEVICEOBJECTINSTANCEA
, *LPDIDEVICEOBJECTINSTANCEA
;
359 typedef const DIDEVICEOBJECTINSTANCEA
*LPCDIDEVICEOBJECTINSTANCEA
;
361 typedef struct DIDEVICEOBJECTINSTANCEW
{
367 WCHAR tszName
[MAX_PATH
];
368 #if(DIRECTINPUT_VERSION >= 0x0500)
370 DWORD dwFFForceResolution
;
371 WORD wCollectionNumber
;
372 WORD wDesignatorIndex
;
378 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
379 } DIDEVICEOBJECTINSTANCEW
, *LPDIDEVICEOBJECTINSTANCEW
;
380 typedef const DIDEVICEOBJECTINSTANCEW
*LPCDIDEVICEOBJECTINSTANCEW
;
382 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE
)
383 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE
)
384 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE
)
386 typedef struct DIDEVICEINSTANCE_DX3A
{
391 CHAR tszInstanceName
[MAX_PATH
];
392 CHAR tszProductName
[MAX_PATH
];
393 } DIDEVICEINSTANCE_DX3A
, *LPDIDEVICEINSTANCE_DX3A
;
394 typedef const DIDEVICEINSTANCE_DX3A
*LPCDIDEVICEINSTANCE_DX3A
;
395 typedef struct DIDEVICEINSTANCE_DX3W
{
400 WCHAR tszInstanceName
[MAX_PATH
];
401 WCHAR tszProductName
[MAX_PATH
];
402 } DIDEVICEINSTANCE_DX3W
, *LPDIDEVICEINSTANCE_DX3W
;
403 typedef const DIDEVICEINSTANCE_DX3W
*LPCDIDEVICEINSTANCE_DX3W
;
405 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3
)
406 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3
)
407 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3
)
409 typedef struct DIDEVICEINSTANCEA
{
414 CHAR tszInstanceName
[MAX_PATH
];
415 CHAR tszProductName
[MAX_PATH
];
416 #if(DIRECTINPUT_VERSION >= 0x0500)
420 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
421 } DIDEVICEINSTANCEA
, *LPDIDEVICEINSTANCEA
;
422 typedef const DIDEVICEINSTANCEA
*LPCDIDEVICEINSTANCEA
;
424 typedef struct DIDEVICEINSTANCEW
{
429 WCHAR tszInstanceName
[MAX_PATH
];
430 WCHAR tszProductName
[MAX_PATH
];
431 #if(DIRECTINPUT_VERSION >= 0x0500)
435 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
436 } DIDEVICEINSTANCEW
, *LPDIDEVICEINSTANCEW
;
437 typedef const DIDEVICEINSTANCEW
*LPCDIDEVICEINSTANCEW
;
439 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE
)
440 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE
)
441 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE
)
443 typedef BOOL (CALLBACK
*LPDIENUMDEVICESCALLBACKA
)(LPCDIDEVICEINSTANCEA
,LPVOID
);
444 typedef BOOL (CALLBACK
*LPDIENUMDEVICESCALLBACKW
)(LPCDIDEVICEINSTANCEW
,LPVOID
);
445 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK
)
447 #if DIRECTINPUT_VERSION >= 0x0800
448 typedef BOOL (CALLBACK
*LPDIENUMDEVICESBYSEMANTICSCBA
)(LPCDIDEVICEINSTANCEA
,LPDIRECTINPUTDEVICE8A
,DWORD
,DWORD
,LPVOID
);
449 typedef BOOL (CALLBACK
*LPDIENUMDEVICESBYSEMANTICSCBW
)(LPCDIDEVICEINSTANCEW
,LPDIRECTINPUTDEVICE8W
,DWORD
,DWORD
,LPVOID
);
450 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB
)
453 typedef BOOL (CALLBACK
*LPDICONFIGUREDEVICESCALLBACK
)(LPUNKNOWN
,LPVOID
);
455 typedef BOOL (CALLBACK
*LPDIENUMDEVICEOBJECTSCALLBACKA
)(LPCDIDEVICEOBJECTINSTANCEA
,LPVOID
);
456 typedef BOOL (CALLBACK
*LPDIENUMDEVICEOBJECTSCALLBACKW
)(LPCDIDEVICEOBJECTINSTANCEW
,LPVOID
);
457 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK
)
459 typedef BOOL (CALLBACK
*LPDIENUMCREATEDEFFECTOBJECTSCALLBACK
)(LPDIRECTINPUTEFFECT
, LPVOID
);
461 #define DIK_ESCAPE 0x01
472 #define DIK_MINUS 0x0C /* - on main keyboard */
473 #define DIK_EQUALS 0x0D
474 #define DIK_BACK 0x0E /* backspace */
486 #define DIK_LBRACKET 0x1A
487 #define DIK_RBRACKET 0x1B
488 #define DIK_RETURN 0x1C /* Enter on main keyboard */
489 #define DIK_LCONTROL 0x1D
499 #define DIK_SEMICOLON 0x27
500 #define DIK_APOSTROPHE 0x28
501 #define DIK_GRAVE 0x29 /* accent grave */
502 #define DIK_LSHIFT 0x2A
503 #define DIK_BACKSLASH 0x2B
511 #define DIK_COMMA 0x33
512 #define DIK_PERIOD 0x34 /* . on main keyboard */
513 #define DIK_SLASH 0x35 /* / on main keyboard */
514 #define DIK_RSHIFT 0x36
515 #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
516 #define DIK_LMENU 0x38 /* left Alt */
517 #define DIK_SPACE 0x39
518 #define DIK_CAPITAL 0x3A
529 #define DIK_NUMLOCK 0x45
530 #define DIK_SCROLL 0x46 /* Scroll Lock */
531 #define DIK_NUMPAD7 0x47
532 #define DIK_NUMPAD8 0x48
533 #define DIK_NUMPAD9 0x49
534 #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
535 #define DIK_NUMPAD4 0x4B
536 #define DIK_NUMPAD5 0x4C
537 #define DIK_NUMPAD6 0x4D
538 #define DIK_ADD 0x4E /* + on numeric keypad */
539 #define DIK_NUMPAD1 0x4F
540 #define DIK_NUMPAD2 0x50
541 #define DIK_NUMPAD3 0x51
542 #define DIK_NUMPAD0 0x52
543 #define DIK_DECIMAL 0x53 /* . on numeric keypad */
546 #define DIK_F13 0x64 /* (NEC PC98) */
547 #define DIK_F14 0x65 /* (NEC PC98) */
548 #define DIK_F15 0x66 /* (NEC PC98) */
549 #define DIK_KANA 0x70 /* (Japanese keyboard) */
550 #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
551 #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
552 #define DIK_YEN 0x7D /* (Japanese keyboard) */
553 #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
554 #define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
555 #define DIK_AT 0x91 /* (NEC PC98) */
556 #define DIK_COLON 0x92 /* (NEC PC98) */
557 #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
558 #define DIK_KANJI 0x94 /* (Japanese keyboard) */
559 #define DIK_STOP 0x95 /* (NEC PC98) */
560 #define DIK_AX 0x96 /* (Japan AX) */
561 #define DIK_UNLABELED 0x97 /* (J3100) */
562 #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
563 #define DIK_RCONTROL 0x9D
564 #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
565 #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
566 #define DIK_SYSRQ 0xB7
567 #define DIK_RMENU 0xB8 /* right Alt */
568 #define DIK_PAUSE 0xC5 /* Pause */
569 #define DIK_HOME 0xC7 /* Home on arrow keypad */
570 #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
571 #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
572 #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
573 #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
574 #define DIK_END 0xCF /* End on arrow keypad */
575 #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
576 #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
577 #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
578 #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
579 #define DIK_LWIN 0xDB /* Left Windows key */
580 #define DIK_RWIN 0xDC /* Right Windows key */
581 #define DIK_APPS 0xDD /* AppMenu key */
582 #define DIK_POWER 0xDE
583 #define DIK_SLEEP 0xDF
584 #define DIK_BACKSPACE DIK_BACK /* backspace */
585 #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
586 #define DIK_LALT DIK_LMENU /* left Alt */
587 #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
588 #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
589 #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
590 #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
591 #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
592 #define DIK_RALT DIK_RMENU /* right Alt */
593 #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
594 #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
595 #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
596 #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
597 #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
598 #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
600 #define DIDFT_ALL 0x00000000
601 #define DIDFT_RELAXIS 0x00000001
602 #define DIDFT_ABSAXIS 0x00000002
603 #define DIDFT_AXIS 0x00000003
604 #define DIDFT_PSHBUTTON 0x00000004
605 #define DIDFT_TGLBUTTON 0x00000008
606 #define DIDFT_BUTTON 0x0000000C
607 #define DIDFT_POV 0x00000010
608 #define DIDFT_COLLECTION 0x00000040
609 #define DIDFT_NODATA 0x00000080
610 #define DIDFT_ANYINSTANCE 0x00FFFF00
611 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
612 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
613 #define DIDFT_GETTYPE(n) LOBYTE(n)
614 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
615 #define DIDFT_FFACTUATOR 0x01000000
616 #define DIDFT_FFEFFECTTRIGGER 0x02000000
617 #define DIDFT_OUTPUT 0x10000000
618 #define DIDFT_VENDORDEFINED 0x04000000
619 #define DIDFT_ALIAS 0x08000000
620 #ifndef DIDFT_OPTIONAL
621 #define DIDFT_OPTIONAL 0x80000000
623 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
624 #define DIDFT_NOCOLLECTION 0x00FFFF00
625 #define DIDF_ABSAXIS 0x00000001
626 #define DIDF_RELAXIS 0x00000002
628 #define DIGDD_PEEK 0x00000001
630 typedef struct DIDEVICEOBJECTDATA_DX3
{
635 } DIDEVICEOBJECTDATA_DX3
,*LPDIDEVICEOBJECTDATA_DX3
;
636 typedef const DIDEVICEOBJECTDATA_DX3
*LPCDIDEVICEOBJECTDATA_DX3
;
638 typedef struct DIDEVICEOBJECTDATA
{
644 } DIDEVICEOBJECTDATA
, *LPDIDEVICEOBJECTDATA
;
645 typedef const DIDEVICEOBJECTDATA
*LPCDIDEVICEOBJECTDATA
;
647 typedef struct _DIOBJECTDATAFORMAT
{
652 } DIOBJECTDATAFORMAT
, *LPDIOBJECTDATAFORMAT
;
653 typedef const DIOBJECTDATAFORMAT
*LPCDIOBJECTDATAFORMAT
;
655 typedef struct _DIDATAFORMAT
{
661 LPDIOBJECTDATAFORMAT rgodf
;
662 } DIDATAFORMAT
, *LPDIDATAFORMAT
;
663 typedef const DIDATAFORMAT
*LPCDIDATAFORMAT
;
665 #define DIDOI_FFACTUATOR 0x00000001
666 #define DIDOI_FFEFFECTTRIGGER 0x00000002
667 #define DIDOI_POLLED 0x00008000
668 #define DIDOI_ASPECTPOSITION 0x00000100
669 #define DIDOI_ASPECTVELOCITY 0x00000200
670 #define DIDOI_ASPECTACCEL 0x00000300
671 #define DIDOI_ASPECTFORCE 0x00000400
672 #define DIDOI_ASPECTMASK 0x00000F00
673 #define DIDOI_GUIDISUSAGE 0x00010000
675 typedef struct DIPROPHEADER
{
680 } DIPROPHEADER
,*LPDIPROPHEADER
;
681 typedef const DIPROPHEADER
*LPCDIPROPHEADER
;
683 #define DIPH_DEVICE 0
684 #define DIPH_BYOFFSET 1
686 #define DIPH_BYUSAGE 3
688 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
690 typedef struct DIPROPDWORD
{
693 } DIPROPDWORD
, *LPDIPROPDWORD
;
694 typedef const DIPROPDWORD
*LPCDIPROPDWORD
;
696 typedef struct DIPROPRANGE
{
700 } DIPROPRANGE
, *LPDIPROPRANGE
;
701 typedef const DIPROPRANGE
*LPCDIPROPRANGE
;
703 #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
704 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
706 typedef struct DIPROPCAL
{
711 } DIPROPCAL
, *LPDIPROPCAL
;
712 typedef const DIPROPCAL
*LPCDIPROPCAL
;
714 typedef struct DIPROPGUIDANDPATH
{
717 WCHAR wszPath
[MAX_PATH
];
718 } DIPROPGUIDANDPATH
, *LPDIPROPGUIDANDPATH
;
719 typedef const DIPROPGUIDANDPATH
*LPCDIPROPGUIDANDPATH
;
721 /* special property GUIDs */
723 #define MAKEDIPROP(prop) (*(const GUID *)(prop))
725 #define MAKEDIPROP(prop) ((REFGUID)(prop))
727 #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
728 #define DIPROP_AXISMODE MAKEDIPROP(2)
730 #define DIPROPAXISMODE_ABS 0
731 #define DIPROPAXISMODE_REL 1
733 #define DIPROP_GRANULARITY MAKEDIPROP(3)
734 #define DIPROP_RANGE MAKEDIPROP(4)
735 #define DIPROP_DEADZONE MAKEDIPROP(5)
736 #define DIPROP_SATURATION MAKEDIPROP(6)
737 #define DIPROP_FFGAIN MAKEDIPROP(7)
738 #define DIPROP_FFLOAD MAKEDIPROP(8)
739 #define DIPROP_AUTOCENTER MAKEDIPROP(9)
741 #define DIPROPAUTOCENTER_OFF 0
742 #define DIPROPAUTOCENTER_ON 1
744 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
746 #define DIPROPCALIBRATIONMODE_COOKED 0
747 #define DIPROPCALIBRATIONMODE_RAW 1
749 #define DIPROP_CALIBRATION MAKEDIPROP(11)
750 #define DIPROP_GUIDANDPATH MAKEDIPROP(12)
752 typedef struct DIDEVCAPS_DX3
{
759 } DIDEVCAPS_DX3
, *LPDIDEVCAPS_DX3
;
761 typedef struct DIDEVCAPS
{
768 #if(DIRECTINPUT_VERSION >= 0x0500)
769 DWORD dwFFSamplePeriod
;
770 DWORD dwFFMinTimeResolution
;
771 DWORD dwFirmwareRevision
;
772 DWORD dwHardwareRevision
;
773 DWORD dwFFDriverVersion
;
774 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
775 } DIDEVCAPS
,*LPDIDEVCAPS
;
777 #define DIDC_ATTACHED 0x00000001
778 #define DIDC_POLLEDDEVICE 0x00000002
779 #define DIDC_EMULATED 0x00000004
780 #define DIDC_POLLEDDATAFORMAT 0x00000008
781 #define DIDC_FORCEFEEDBACK 0x00000100
782 #define DIDC_FFATTACK 0x00000200
783 #define DIDC_FFFADE 0x00000400
784 #define DIDC_SATURATION 0x00000800
785 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
786 #define DIDC_POSNEGSATURATION 0x00002000
787 #define DIDC_DEADBAND 0x00004000
788 #define DIDC_STARTDELAY 0x00008000
789 #define DIDC_ALIAS 0x00010000
790 #define DIDC_PHANTOM 0x00020000
791 #define DIDC_HIDDEN 0x00040000
794 /* SetCooperativeLevel dwFlags */
795 #define DISCL_EXCLUSIVE 0x00000001
796 #define DISCL_NONEXCLUSIVE 0x00000002
797 #define DISCL_FOREGROUND 0x00000004
798 #define DISCL_BACKGROUND 0x00000008
800 #define DIEFT_ALL 0x00000000
802 #define DIEFT_CONSTANTFORCE 0x00000001
803 #define DIEFT_RAMPFORCE 0x00000002
804 #define DIEFT_PERIODIC 0x00000003
805 #define DIEFT_CONDITION 0x00000004
806 #define DIEFT_CUSTOMFORCE 0x00000005
807 #define DIEFT_HARDWARE 0x000000FF
808 #define DIEFT_FFATTACK 0x00000200
809 #define DIEFT_FFFADE 0x00000400
810 #define DIEFT_SATURATION 0x00000800
811 #define DIEFT_POSNEGCOEFFICIENTS 0x00001000
812 #define DIEFT_POSNEGSATURATION 0x00002000
813 #define DIEFT_DEADBAND 0x00004000
814 #define DIEFT_STARTDELAY 0x00008000
815 #define DIEFT_GETTYPE(n) LOBYTE(n)
817 #define DI_DEGREES 100
818 #define DI_FFNOMINALMAX 10000
819 #define DI_SECONDS 1000000
821 typedef struct DICONSTANTFORCE
{
823 } DICONSTANTFORCE
, *LPDICONSTANTFORCE
;
824 typedef const DICONSTANTFORCE
*LPCDICONSTANTFORCE
;
826 typedef struct DIRAMPFORCE
{
829 } DIRAMPFORCE
, *LPDIRAMPFORCE
;
830 typedef const DIRAMPFORCE
*LPCDIRAMPFORCE
;
832 typedef struct DIPERIODIC
{
837 } DIPERIODIC
, *LPDIPERIODIC
;
838 typedef const DIPERIODIC
*LPCDIPERIODIC
;
840 typedef struct DICONDITION
{
842 LONG lPositiveCoefficient
;
843 LONG lNegativeCoefficient
;
844 DWORD dwPositiveSaturation
;
845 DWORD dwNegativeSaturation
;
847 } DICONDITION
, *LPDICONDITION
;
848 typedef const DICONDITION
*LPCDICONDITION
;
850 typedef struct DICUSTOMFORCE
{
852 DWORD dwSamplePeriod
;
855 } DICUSTOMFORCE
, *LPDICUSTOMFORCE
;
856 typedef const DICUSTOMFORCE
*LPCDICUSTOMFORCE
;
858 typedef struct DIENVELOPE
{
864 } DIENVELOPE
, *LPDIENVELOPE
;
865 typedef const DIENVELOPE
*LPCDIENVELOPE
;
867 typedef struct DIEFFECT_DX5
{
871 DWORD dwSamplePeriod
;
873 DWORD dwTriggerButton
;
874 DWORD dwTriggerRepeatInterval
;
878 LPDIENVELOPE lpEnvelope
;
879 DWORD cbTypeSpecificParams
;
880 LPVOID lpvTypeSpecificParams
;
881 } DIEFFECT_DX5
, *LPDIEFFECT_DX5
;
882 typedef const DIEFFECT_DX5
*LPCDIEFFECT_DX5
;
884 typedef struct DIEFFECT
{
888 DWORD dwSamplePeriod
;
890 DWORD dwTriggerButton
;
891 DWORD dwTriggerRepeatInterval
;
895 LPDIENVELOPE lpEnvelope
;
896 DWORD cbTypeSpecificParams
;
897 LPVOID lpvTypeSpecificParams
;
899 } DIEFFECT
, *LPDIEFFECT
;
900 typedef const DIEFFECT
*LPCDIEFFECT
;
901 typedef DIEFFECT DIEFFECT_DX6
;
902 typedef LPDIEFFECT LPDIEFFECT_DX6
;
904 typedef struct DIEFFECTINFOA
{
908 DWORD dwStaticParams
;
909 DWORD dwDynamicParams
;
910 CHAR tszName
[MAX_PATH
];
911 } DIEFFECTINFOA
, *LPDIEFFECTINFOA
;
912 typedef const DIEFFECTINFOA
*LPCDIEFFECTINFOA
;
914 typedef struct DIEFFECTINFOW
{
918 DWORD dwStaticParams
;
919 DWORD dwDynamicParams
;
920 WCHAR tszName
[MAX_PATH
];
921 } DIEFFECTINFOW
, *LPDIEFFECTINFOW
;
922 typedef const DIEFFECTINFOW
*LPCDIEFFECTINFOW
;
924 DECL_WINELIB_TYPE_AW(DIEFFECTINFO
)
925 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO
)
926 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO
)
928 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSCALLBACKA
)(LPCDIEFFECTINFOA
, LPVOID
);
929 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSCALLBACKW
)(LPCDIEFFECTINFOW
, LPVOID
);
931 typedef struct DIEFFESCAPE
{
938 } DIEFFESCAPE
, *LPDIEFFESCAPE
;
940 typedef struct DIJOYSTATE
{
950 } DIJOYSTATE
, *LPDIJOYSTATE
;
952 typedef struct DIJOYSTATE2
{
961 BYTE rgbButtons
[128];
962 LONG lVX
; /* 'v' as in velocity */
969 LONG lAX
; /* 'a' as in acceleration */
976 LONG lFX
; /* 'f' as in force */
979 LONG lFRx
; /* 'fr' as in rotational force aka torque */
983 } DIJOYSTATE2
, *LPDIJOYSTATE2
;
985 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
986 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
987 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
988 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
989 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
990 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
991 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
993 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
995 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
996 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
997 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
998 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
999 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
1000 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
1001 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
1002 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
1003 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
1004 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
1005 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
1006 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
1007 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
1008 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
1009 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
1010 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
1011 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
1012 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
1013 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
1014 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
1015 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
1016 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
1017 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
1018 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
1019 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
1020 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
1021 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
1022 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
1023 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
1024 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
1025 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
1026 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
1027 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
1029 /* DInput 7 structures, types */
1030 typedef struct DIFILEEFFECT
{
1033 LPCDIEFFECT lpDiEffect
;
1034 CHAR szFriendlyName
[MAX_PATH
];
1035 } DIFILEEFFECT
, *LPDIFILEEFFECT
;
1037 typedef const DIFILEEFFECT
*LPCDIFILEEFFECT
;
1038 typedef BOOL (CALLBACK
*LPDIENUMEFFECTSINFILECALLBACK
)(LPCDIFILEEFFECT
, LPVOID
);
1040 /* DInput 8 structures and types */
1041 #if DIRECTINPUT_VERSION >= 0x0800
1042 typedef struct _DIACTIONA
{
1047 LPCSTR lptszActionName
;
1053 } DIACTIONA
, *LPDIACTIONA
;
1054 typedef const DIACTIONA
*LPCDIACTIONA
;
1056 typedef struct _DIACTIONW
{
1061 LPCWSTR lptszActionName
;
1067 } DIACTIONW
, *LPDIACTIONW
;
1068 typedef const DIACTIONW
*LPCDIACTIONW
;
1070 DECL_WINELIB_TYPE_AW(DIACTION
)
1071 DECL_WINELIB_TYPE_AW(LPDIACTION
)
1072 DECL_WINELIB_TYPE_AW(LPCDIACTION
)
1074 #define DIA_FORCEFEEDBACK 0x00000001
1075 #define DIA_APPMAPPED 0x00000002
1076 #define DIA_APPNOMAP 0x00000004
1077 #define DIA_NORANGE 0x00000008
1078 #define DIA_APPFIXED 0x00000010
1080 #define DIAH_UNMAPPED 0x00000000
1081 #define DIAH_USERCONFIG 0x00000001
1082 #define DIAH_APPREQUESTED 0x00000002
1083 #define DIAH_HWAPP 0x00000004
1084 #define DIAH_HWDEFAULT 0x00000008
1085 #define DIAH_DEFAULT 0x00000020
1086 #define DIAH_ERROR 0x80000000
1088 typedef struct _DIACTIONFORMATA
{
1093 LPDIACTIONA rgoAction
;
1099 HINSTANCE hInstString
;
1100 FILETIME ftTimeStamp
;
1102 CHAR tszActionMap
[MAX_PATH
];
1103 } DIACTIONFORMATA
, *LPDIACTIONFORMATA
;
1104 typedef const DIACTIONFORMATA
*LPCDIACTIONFORMATA
;
1106 typedef struct _DIACTIONFORMATW
{
1111 LPDIACTIONW rgoAction
;
1117 HINSTANCE hInstString
;
1118 FILETIME ftTimeStamp
;
1120 WCHAR tszActionMap
[MAX_PATH
];
1121 } DIACTIONFORMATW
, *LPDIACTIONFORMATW
;
1122 typedef const DIACTIONFORMATW
*LPCDIACTIONFORMATW
;
1124 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT
)
1125 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT
)
1126 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT
)
1128 #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
1129 #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
1130 #define DIAFTS_UNUSEDDEVICELOW 0x00000000
1131 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
1133 #define DIDBAM_DEFAULT 0x00000000
1134 #define DIDBAM_PRESERVE 0x00000001
1135 #define DIDBAM_INITIALIZE 0x00000002
1136 #define DIDBAM_HWDEFAULTS 0x00000004
1138 #define DIDSAM_DEFAULT 0x00000000
1139 #define DIDSAM_NOUSER 0x00000001
1140 #define DIDSAM_FORCESAVE 0x00000002
1142 #define DICD_DEFAULT 0x00000000
1143 #define DICD_EDIT 0x00000001
1145 #ifndef D3DCOLOR_DEFINED
1146 typedef DWORD D3DCOLOR
;
1147 #define D3DCOLOR_DEFINED
1150 typedef struct _DICOLORSET
{
1153 D3DCOLOR cTextHighlight
;
1154 D3DCOLOR cCalloutLine
;
1155 D3DCOLOR cCalloutHighlight
;
1157 D3DCOLOR cControlFill
;
1158 D3DCOLOR cHighlightFill
;
1160 } DICOLORSET
, *LPDICOLORSET
;
1161 typedef const DICOLORSET
*LPCDICOLORSET
;
1163 typedef struct _DICONFIGUREDEVICESPARAMSA
{
1166 LPSTR lptszUserNames
;
1168 LPDIACTIONFORMATA lprgFormats
;
1171 LPUNKNOWN lpUnkDDSTarget
;
1172 } DICONFIGUREDEVICESPARAMSA
, *LPDICONFIGUREDEVICESPARAMSA
;
1173 typedef const DICONFIGUREDEVICESPARAMSA
*LPCDICONFIGUREDEVICESPARAMSA
;
1175 typedef struct _DICONFIGUREDEVICESPARAMSW
{
1178 LPWSTR lptszUserNames
;
1180 LPDIACTIONFORMATW lprgFormats
;
1183 LPUNKNOWN lpUnkDDSTarget
;
1184 } DICONFIGUREDEVICESPARAMSW
, *LPDICONFIGUREDEVICESPARAMSW
;
1185 typedef const DICONFIGUREDEVICESPARAMSW
*LPCDICONFIGUREDEVICESPARAMSW
;
1187 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS
)
1188 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS
)
1189 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS
)
1191 #define DIDIFT_CONFIGURATION 0x00000001
1192 #define DIDIFT_OVERLAY 0x00000002
1194 #define DIDAL_CENTERED 0x00000000
1195 #define DIDAL_LEFTALIGNED 0x00000001
1196 #define DIDAL_RIGHTALIGNED 0x00000002
1197 #define DIDAL_MIDDLE 0x00000000
1198 #define DIDAL_TOPALIGNED 0x00000004
1199 #define DIDAL_BOTTOMALIGNED 0x00000008
1201 typedef struct _DIDEVICEIMAGEINFOA
{
1202 CHAR tszImagePath
[MAX_PATH
];
1208 POINT rgptCalloutLine
[5];
1211 } DIDEVICEIMAGEINFOA
, *LPDIDEVICEIMAGEINFOA
;
1212 typedef const DIDEVICEIMAGEINFOA
*LPCDIDEVICEIMAGEINFOA
;
1214 typedef struct _DIDEVICEIMAGEINFOW
{
1215 WCHAR tszImagePath
[MAX_PATH
];
1221 POINT rgptCalloutLine
[5];
1224 } DIDEVICEIMAGEINFOW
, *LPDIDEVICEIMAGEINFOW
;
1225 typedef const DIDEVICEIMAGEINFOW
*LPCDIDEVICEIMAGEINFOW
;
1227 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO
)
1228 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO
)
1229 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO
)
1231 typedef struct _DIDEVICEIMAGEINFOHEADERA
{
1233 DWORD dwSizeImageInfo
;
1240 LPDIDEVICEIMAGEINFOA lprgImageInfoArray
;
1241 } DIDEVICEIMAGEINFOHEADERA
, *LPDIDEVICEIMAGEINFOHEADERA
;
1242 typedef const DIDEVICEIMAGEINFOHEADERA
*LPCDIDEVICEIMAGEINFOHEADERA
;
1244 typedef struct _DIDEVICEIMAGEINFOHEADERW
{
1246 DWORD dwSizeImageInfo
;
1253 LPDIDEVICEIMAGEINFOW lprgImageInfoArray
;
1254 } DIDEVICEIMAGEINFOHEADERW
, *LPDIDEVICEIMAGEINFOHEADERW
;
1255 typedef const DIDEVICEIMAGEINFOHEADERW
*LPCDIDEVICEIMAGEINFOHEADERW
;
1257 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER
)
1258 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER
)
1259 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER
)
1264 /*****************************************************************************
1265 * IDirectInputEffect interface
1267 #define INTERFACE IDirectInputEffect
1268 #define IDirectInputEffect_METHODS \
1270 STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE; \
1271 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE; \
1272 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE; \
1273 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE; \
1274 STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE; \
1275 STDMETHOD(Stop)(THIS) PURE; \
1276 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE; \
1277 STDMETHOD(Download)(THIS) PURE; \
1278 STDMETHOD(Unload)(THIS) PURE; \
1279 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1280 DECLARE_INTERFACE_(IDirectInputEffect
,IUnknown
) { IDirectInputEffect_METHODS
};
1284 /*** IUnknown methods ***/
1285 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1286 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
1287 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
1288 /*** IDirectInputEffect methods ***/
1289 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1290 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
1291 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
1292 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
1293 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
1294 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
1295 #define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->lpVtbl->GetEffectStatus(p,a)
1296 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
1297 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
1298 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1302 /*****************************************************************************
1303 * IDirectInputDeviceA interface
1305 #define INTERFACE IDirectInputDeviceA
1306 #define IDirectInputDeviceA_METHODS \
1308 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1309 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1310 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1311 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1312 STDMETHOD(Acquire)(THIS) PURE; \
1313 STDMETHOD(Unacquire)(THIS) PURE; \
1314 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1315 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1316 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1317 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1318 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1319 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1320 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; \
1321 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1322 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1323 DECLARE_INTERFACE_(IDirectInputDeviceA
,IUnknown
) { IDirectInputDeviceA_METHODS
};
1326 /*****************************************************************************
1327 * IDirectInputDeviceW interface
1329 #define INTERFACE IDirectInputDeviceW
1330 #define IDirectInputDeviceW_METHODS \
1332 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1333 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1334 STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1335 STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1336 STDMETHOD(Acquire)(THIS) PURE; \
1337 STDMETHOD(Unacquire)(THIS) PURE; \
1338 STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1339 STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1340 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1341 STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1342 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1343 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1344 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE; \
1345 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1346 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1347 DECLARE_INTERFACE_(IDirectInputDeviceW
,IUnknown
) { IDirectInputDeviceW_METHODS
};
1351 /*** IUnknown methods ***/
1352 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1353 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
1354 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
1355 /*** IDirectInputDevice methods ***/
1356 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1357 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1358 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1359 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1360 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
1361 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1362 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1363 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1364 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1365 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1366 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1367 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1368 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1369 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1370 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1374 /*****************************************************************************
1375 * IDirectInputDevice2A interface
1377 #define INTERFACE IDirectInputDevice2A
1378 #define IDirectInputDevice2A_METHODS \
1379 IDirectInputDeviceA_METHODS \
1380 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1381 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1382 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; \
1383 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1384 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1385 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1386 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1387 STDMETHOD(Poll)(THIS) PURE; \
1388 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1389 DECLARE_INTERFACE_(IDirectInputDevice2A
,IDirectInputDeviceA
) { IDirectInputDevice2A_METHODS
};
1392 /*****************************************************************************
1393 * IDirectInputDevice2W interface
1395 #define INTERFACE IDirectInputDevice2W
1396 #define IDirectInputDevice2W_METHODS \
1397 IDirectInputDeviceW_METHODS \
1398 STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1399 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1400 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE; \
1401 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1402 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1403 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1404 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1405 STDMETHOD(Poll)(THIS) PURE; \
1406 STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1407 DECLARE_INTERFACE_(IDirectInputDevice2W
,IDirectInputDeviceW
) { IDirectInputDevice2W_METHODS
};
1411 /*** IUnknown methods ***/
1412 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1413 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
1414 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
1415 /*** IDirectInputDevice methods ***/
1416 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1417 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1418 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1419 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1420 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
1421 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1422 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1423 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1424 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1425 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1426 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1427 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1428 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1429 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1430 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1431 /*** IDirectInputDevice2 methods ***/
1432 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1433 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1434 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1435 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1436 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1437 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1438 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1439 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
1440 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1443 #if DIRECTINPUT_VERSION >= 0x0700
1444 /*****************************************************************************
1445 * IDirectInputDevice7A interface
1447 #define INTERFACE IDirectInputDevice7A
1448 #define IDirectInputDevice7A_METHODS \
1449 IDirectInputDevice2A_METHODS \
1450 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1451 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1452 DECLARE_INTERFACE_(IDirectInputDevice7A
,IDirectInputDevice2A
) { IDirectInputDevice7A_METHODS
};
1455 /*****************************************************************************
1456 * IDirectInputDevice7W interface
1458 #define INTERFACE IDirectInputDevice7W
1459 #define IDirectInputDevice7W_METHODS \
1460 IDirectInputDevice2W_METHODS \
1461 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1462 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1463 DECLARE_INTERFACE_(IDirectInputDevice7W
,IDirectInputDevice2W
) { IDirectInputDevice7W_METHODS
};
1467 /*** IUnknown methods ***/
1468 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1469 #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
1470 #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
1471 /*** IDirectInputDevice methods ***/
1472 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1473 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1474 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1475 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1476 #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
1477 #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1478 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1479 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1480 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1481 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1482 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1483 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1484 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1485 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1486 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1487 /*** IDirectInputDevice2 methods ***/
1488 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1489 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1490 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1491 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1492 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1493 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1494 #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1495 #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
1496 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1497 /*** IDirectInputDevice7 methods ***/
1498 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1499 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1504 #if DIRECTINPUT_VERSION >= 0x0800
1505 /*****************************************************************************
1506 * IDirectInputDevice8A interface
1508 #define INTERFACE IDirectInputDevice8A
1509 #define IDirectInputDevice8A_METHODS \
1510 IDirectInputDevice7A_METHODS \
1511 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1512 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1513 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
1514 DECLARE_INTERFACE_(IDirectInputDevice8A
,IDirectInputDevice7A
) { IDirectInputDevice8A_METHODS
};
1517 /*****************************************************************************
1518 * IDirectInputDevice8W interface
1520 #define INTERFACE IDirectInputDevice8W
1521 #define IDirectInputDevice8W_METHODS \
1522 IDirectInputDevice7W_METHODS \
1523 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; \
1524 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE; \
1525 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
1526 DECLARE_INTERFACE_(IDirectInputDevice8W
,IDirectInputDevice7W
) { IDirectInputDevice8W_METHODS
};
1530 /*** IUnknown methods ***/
1531 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1532 #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
1533 #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
1534 /*** IDirectInputDevice methods ***/
1535 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1536 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1537 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1538 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1539 #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
1540 #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1541 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1542 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1543 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1544 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1545 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1546 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1547 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1548 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1549 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1550 /*** IDirectInputDevice2 methods ***/
1551 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1552 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1553 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1554 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1555 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1556 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1557 #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1558 #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
1559 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1560 /*** IDirectInputDevice7 methods ***/
1561 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1562 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1563 /*** IDirectInputDevice8 methods ***/
1564 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
1565 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
1566 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
1571 /* "Standard" Mouse report... */
1572 typedef struct DIMOUSESTATE
{
1579 /* "Standard" Mouse report for DInput 7... */
1580 typedef struct DIMOUSESTATE2
{
1587 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
1588 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
1589 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
1590 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1591 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1592 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1593 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1594 #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
1595 #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
1596 #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
1597 #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
1602 extern const DIDATAFORMAT c_dfDIMouse
;
1603 extern const DIDATAFORMAT c_dfDIMouse2
; /* DX 7 */
1604 extern const DIDATAFORMAT c_dfDIKeyboard
;
1605 extern const DIDATAFORMAT c_dfDIJoystick
;
1606 extern const DIDATAFORMAT c_dfDIJoystick2
;
1611 /*****************************************************************************
1612 * IDirectInputA interface
1614 #define INTERFACE IDirectInputA
1615 #define IDirectInputA_METHODS \
1617 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1618 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1619 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1620 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1621 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1622 DECLARE_INTERFACE_(IDirectInputA
,IUnknown
) { IDirectInputA_METHODS
};
1625 /*****************************************************************************
1626 * IDirectInputW interface
1628 #define INTERFACE IDirectInputW
1629 #define IDirectInputW_METHODS \
1631 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1632 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1633 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1634 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1635 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1636 DECLARE_INTERFACE_(IDirectInputW
,IUnknown
) { IDirectInputW_METHODS
};
1640 /*** IUnknown methods ***/
1641 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1642 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
1643 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
1644 /*** IDirectInput methods ***/
1645 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1646 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1647 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1648 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1649 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1652 /*****************************************************************************
1653 * IDirectInput2A interface
1655 #define INTERFACE IDirectInput2A
1656 #define IDirectInput2A_METHODS \
1657 IDirectInputA_METHODS \
1658 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
1659 DECLARE_INTERFACE_(IDirectInput2A
,IDirectInputA
) { IDirectInput2A_METHODS
};
1662 /*****************************************************************************
1663 * IDirectInput2W interface
1665 #define INTERFACE IDirectInput2W
1666 #define IDirectInput2W_METHODS \
1667 IDirectInputW_METHODS \
1668 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
1669 DECLARE_INTERFACE_(IDirectInput2W
,IDirectInputW
) { IDirectInput2W_METHODS
};
1673 /*** IUnknown methods ***/
1674 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1675 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
1676 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
1677 /*** IDirectInput methods ***/
1678 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1679 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1680 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1681 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1682 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1683 /*** IDirectInput2 methods ***/
1684 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1687 #if DIRECTINPUT_VERSION >= 0x0700
1688 /*****************************************************************************
1689 * IDirectInput7A interface
1691 #define INTERFACE IDirectInput7A
1692 #define IDirectInput7A_METHODS \
1693 IDirectInput2A_METHODS \
1694 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1695 DECLARE_INTERFACE_(IDirectInput7A
,IDirectInput2A
) { IDirectInput7A_METHODS
};
1698 /*****************************************************************************
1699 * IDirectInput7W interface
1701 #define INTERFACE IDirectInput7W
1702 #define IDirectInput7W_METHODS \
1703 IDirectInput2W_METHODS \
1704 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1705 DECLARE_INTERFACE_(IDirectInput7W
,IDirectInput2W
) { IDirectInput7W_METHODS
};
1709 /*** IUnknown methods ***/
1710 #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1711 #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
1712 #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
1713 /*** IDirectInput methods ***/
1714 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1715 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1716 #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1717 #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1718 #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1719 /*** IDirectInput2 methods ***/
1720 #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1721 /*** IDirectInput7 methods ***/
1722 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
1727 #if DIRECTINPUT_VERSION >= 0x0800
1728 /*****************************************************************************
1729 * IDirectInput8A interface
1731 #define INTERFACE IDirectInput8A
1732 #define IDirectInput8A_METHODS \
1734 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1735 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1736 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1737 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1738 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1739 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; \
1740 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1741 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1742 DECLARE_INTERFACE_(IDirectInput8A
,IUnknown
) { IDirectInput8A_METHODS
};
1745 /*****************************************************************************
1746 * IDirectInput8W interface
1748 #define INTERFACE IDirectInput8W
1749 #define IDirectInput8W_METHODS \
1751 STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1752 STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1753 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1754 STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1755 STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1756 STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE; \
1757 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1758 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1759 DECLARE_INTERFACE_(IDirectInput8W
,IUnknown
) { IDirectInput8W_METHODS
};
1763 /*** IUnknown methods ***/
1764 #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1765 #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
1766 #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
1767 /*** IDirectInput8 methods ***/
1768 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1769 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1770 #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1771 #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1772 #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1773 #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1774 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
1775 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
1780 /* Export functions */
1786 #if DIRECTINPUT_VERSION >= 0x0800
1787 HRESULT WINAPI
DirectInput8Create(HINSTANCE
,DWORD
,REFIID
,LPVOID
*,LPUNKNOWN
);
1790 HRESULT WINAPI
DirectInputCreateA(HINSTANCE
,DWORD
,LPDIRECTINPUTA
*,LPUNKNOWN
);
1791 HRESULT WINAPI
DirectInputCreateW(HINSTANCE
,DWORD
,LPDIRECTINPUTW
*,LPUNKNOWN
);
1792 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
1794 HRESULT WINAPI
DirectInputCreateEx(HINSTANCE
,DWORD
,REFIID
,LPVOID
*,LPUNKNOWN
);
1800 #endif /* __WINE_DINPUT_H */