Added stub implementation of cabinet.dll.
[wine] / include / dinput.h
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_DINPUT_H
20 #define __WINE_DINPUT_H
21
22 #include "windef.h" /* for MAX_PATH */
23 #include "unknwn.h"
24
25 #ifndef DIRECTINPUT_VERSION
26 #define DIRECTINPUT_VERSION     0x0800
27 #endif
28
29 /* Classes */
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);
32
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);
35
36 /* Interfaces */
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);
54
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);
67
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);
72
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);
86
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;
106
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)
121
122 #define DI_OK                           S_OK
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)
132
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
163 #ifndef E_PENDING
164 #define E_PENDING                       0x8000000AL
165 #endif
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
177
178 #define DIENUM_STOP                     0
179 #define DIENUM_CONTINUE                 1
180
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
187
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
193
194 #define DIDEVTYPEMOUSE_UNKNOWN          1
195 #define DIDEVTYPEMOUSE_TRADITIONAL      2
196 #define DIDEVTYPEMOUSE_FINGERSTICK      3
197 #define DIDEVTYPEMOUSE_TOUCHPAD         4
198 #define DIDEVTYPEMOUSE_TRACKBALL        5
199
200 #define DIDEVTYPEKEYBOARD_UNKNOWN       0
201 #define DIDEVTYPEKEYBOARD_PCXT          1
202 #define DIDEVTYPEKEYBOARD_OLIVETTI      2
203 #define DIDEVTYPEKEYBOARD_PCAT          3
204 #define DIDEVTYPEKEYBOARD_PCENH         4
205 #define DIDEVTYPEKEYBOARD_NOKIA1050     5
206 #define DIDEVTYPEKEYBOARD_NOKIA9140     6
207 #define DIDEVTYPEKEYBOARD_NEC98         7
208 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
209 #define DIDEVTYPEKEYBOARD_NEC98106      9
210 #define DIDEVTYPEKEYBOARD_JAPAN106     10
211 #define DIDEVTYPEKEYBOARD_JAPANAX      11
212 #define DIDEVTYPEKEYBOARD_J3100        12
213
214 #define DIDEVTYPEJOYSTICK_UNKNOWN       1
215 #define DIDEVTYPEJOYSTICK_TRADITIONAL   2
216 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
217 #define DIDEVTYPEJOYSTICK_GAMEPAD       4
218 #define DIDEVTYPEJOYSTICK_RUDDER        5
219 #define DIDEVTYPEJOYSTICK_WHEEL         6
220 #define DIDEVTYPEJOYSTICK_HEADTRACKER   7
221
222 #define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
223 #define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
224
225 typedef struct {
226     DWORD       dwSize;
227     GUID        guidType;
228     DWORD       dwOfs;
229     DWORD       dwType;
230     DWORD       dwFlags;
231     CHAR        tszName[MAX_PATH];
232 #if(DIRECTINPUT_VERSION >= 0x0500)
233     DWORD       dwFFMaxForce;
234     DWORD       dwFFForceResolution;
235     WORD        wCollectionNumber;
236     WORD        wDesignatorIndex;
237     WORD        wUsagePage;
238     WORD        wUsage;
239     DWORD       dwDimension;
240     WORD        wExponent;
241     WORD        wReserved;
242 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
243 } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
244 typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
245
246 typedef struct {
247     DWORD       dwSize;
248     GUID        guidType;
249     DWORD       dwOfs;
250     DWORD       dwType;
251     DWORD       dwFlags;
252     WCHAR       tszName[MAX_PATH];
253 #if(DIRECTINPUT_VERSION >= 0x0500)
254     DWORD       dwFFMaxForce;
255     DWORD       dwFFForceResolution;
256     WORD        wCollectionNumber;
257     WORD        wDesignatorIndex;
258     WORD        wUsagePage;
259     WORD        wUsage;
260     DWORD       dwDimension;
261     WORD        wExponent;
262     WORD        wReserved;
263 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
264 } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
265 typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
266
267 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
268 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
269 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
270
271
272 typedef struct {
273     DWORD       dwSize;
274     GUID        guidInstance;
275     GUID        guidProduct;
276     DWORD       dwDevType;
277     CHAR        tszInstanceName[MAX_PATH];
278     CHAR        tszProductName[MAX_PATH];
279 #if(DIRECTINPUT_VERSION >= 0x0500)
280     GUID        guidFFDriver;
281     WORD        wUsagePage;
282     WORD        wUsage;
283 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
284 } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
285 typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
286
287 typedef struct {
288     DWORD       dwSize;
289     GUID        guidInstance;
290     GUID        guidProduct;
291     DWORD       dwDevType;
292     WCHAR       tszInstanceName[MAX_PATH];
293     WCHAR       tszProductName[MAX_PATH];
294 #if(DIRECTINPUT_VERSION >= 0x0500)
295     GUID        guidFFDriver;
296     WORD        wUsagePage;
297     WORD        wUsage;
298 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
299 } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
300 typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
301
302 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
303 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
304 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
305
306 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
307 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
308 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
309
310 #if DIRECTINPUT_VERSION >= 0x0800
311 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
312 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
313 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
314 #endif
315
316 typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
317
318 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
319 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
320 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
321
322 typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
323
324 #define DIK_ESCAPE          0x01
325 #define DIK_1               0x02
326 #define DIK_2               0x03
327 #define DIK_3               0x04
328 #define DIK_4               0x05
329 #define DIK_5               0x06
330 #define DIK_6               0x07
331 #define DIK_7               0x08
332 #define DIK_8               0x09
333 #define DIK_9               0x0A
334 #define DIK_0               0x0B
335 #define DIK_MINUS           0x0C    /* - on main keyboard */
336 #define DIK_EQUALS          0x0D
337 #define DIK_BACK            0x0E    /* backspace */
338 #define DIK_TAB             0x0F
339 #define DIK_Q               0x10
340 #define DIK_W               0x11
341 #define DIK_E               0x12
342 #define DIK_R               0x13
343 #define DIK_T               0x14
344 #define DIK_Y               0x15
345 #define DIK_U               0x16
346 #define DIK_I               0x17
347 #define DIK_O               0x18
348 #define DIK_P               0x19
349 #define DIK_LBRACKET        0x1A
350 #define DIK_RBRACKET        0x1B
351 #define DIK_RETURN          0x1C    /* Enter on main keyboard */
352 #define DIK_LCONTROL        0x1D
353 #define DIK_A               0x1E
354 #define DIK_S               0x1F
355 #define DIK_D               0x20
356 #define DIK_F               0x21
357 #define DIK_G               0x22
358 #define DIK_H               0x23
359 #define DIK_J               0x24
360 #define DIK_K               0x25
361 #define DIK_L               0x26
362 #define DIK_SEMICOLON       0x27
363 #define DIK_APOSTROPHE      0x28
364 #define DIK_GRAVE           0x29    /* accent grave */
365 #define DIK_LSHIFT          0x2A
366 #define DIK_BACKSLASH       0x2B
367 #define DIK_Z               0x2C
368 #define DIK_X               0x2D
369 #define DIK_C               0x2E
370 #define DIK_V               0x2F
371 #define DIK_B               0x30
372 #define DIK_N               0x31
373 #define DIK_M               0x32
374 #define DIK_COMMA           0x33
375 #define DIK_PERIOD          0x34    /* . on main keyboard */
376 #define DIK_SLASH           0x35    /* / on main keyboard */
377 #define DIK_RSHIFT          0x36
378 #define DIK_MULTIPLY        0x37    /* * on numeric keypad */
379 #define DIK_LMENU           0x38    /* left Alt */
380 #define DIK_SPACE           0x39
381 #define DIK_CAPITAL         0x3A
382 #define DIK_F1              0x3B
383 #define DIK_F2              0x3C
384 #define DIK_F3              0x3D
385 #define DIK_F4              0x3E
386 #define DIK_F5              0x3F
387 #define DIK_F6              0x40
388 #define DIK_F7              0x41
389 #define DIK_F8              0x42
390 #define DIK_F9              0x43
391 #define DIK_F10             0x44
392 #define DIK_NUMLOCK         0x45
393 #define DIK_SCROLL          0x46    /* Scroll Lock */
394 #define DIK_NUMPAD7         0x47
395 #define DIK_NUMPAD8         0x48
396 #define DIK_NUMPAD9         0x49
397 #define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
398 #define DIK_NUMPAD4         0x4B
399 #define DIK_NUMPAD5         0x4C
400 #define DIK_NUMPAD6         0x4D
401 #define DIK_ADD             0x4E    /* + on numeric keypad */
402 #define DIK_NUMPAD1         0x4F
403 #define DIK_NUMPAD2         0x50
404 #define DIK_NUMPAD3         0x51
405 #define DIK_NUMPAD0         0x52
406 #define DIK_DECIMAL         0x53    /* . on numeric keypad */
407 #define DIK_F11             0x57
408 #define DIK_F12             0x58
409 #define DIK_F13             0x64    /*                     (NEC PC98) */
410 #define DIK_F14             0x65    /*                     (NEC PC98) */
411 #define DIK_F15             0x66    /*                     (NEC PC98) */
412 #define DIK_KANA            0x70    /* (Japanese keyboard)            */
413 #define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
414 #define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
415 #define DIK_YEN             0x7D    /* (Japanese keyboard)            */
416 #define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
417 #define DIK_CIRCUMFLEX      0x90    /* (Japanese keyboard)            */
418 #define DIK_AT              0x91    /*                     (NEC PC98) */
419 #define DIK_COLON           0x92    /*                     (NEC PC98) */
420 #define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
421 #define DIK_KANJI           0x94    /* (Japanese keyboard)            */
422 #define DIK_STOP            0x95    /*                     (NEC PC98) */
423 #define DIK_AX              0x96    /*                     (Japan AX) */
424 #define DIK_UNLABELED       0x97    /*                        (J3100) */
425 #define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
426 #define DIK_RCONTROL        0x9D
427 #define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
428 #define DIK_DIVIDE          0xB5    /* / on numeric keypad */
429 #define DIK_SYSRQ           0xB7
430 #define DIK_RMENU           0xB8    /* right Alt */
431 #define DIK_PAUSE           0xC5    /* Pause */
432 #define DIK_HOME            0xC7    /* Home on arrow keypad */
433 #define DIK_UP              0xC8    /* UpArrow on arrow keypad */
434 #define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
435 #define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
436 #define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
437 #define DIK_END             0xCF    /* End on arrow keypad */
438 #define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
439 #define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
440 #define DIK_INSERT          0xD2    /* Insert on arrow keypad */
441 #define DIK_DELETE          0xD3    /* Delete on arrow keypad */
442 #define DIK_LWIN            0xDB    /* Left Windows key */
443 #define DIK_RWIN            0xDC    /* Right Windows key */
444 #define DIK_APPS            0xDD    /* AppMenu key */
445 #define DIK_POWER           0xDE
446 #define DIK_SLEEP           0xDF
447 #define DIK_BACKSPACE       DIK_BACK            /* backspace */
448 #define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
449 #define DIK_LALT            DIK_LMENU           /* left Alt */
450 #define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
451 #define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
452 #define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
453 #define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
454 #define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
455 #define DIK_RALT            DIK_RMENU           /* right Alt */
456 #define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
457 #define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
458 #define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
459 #define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
460 #define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
461 #define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
462
463 #define DIDFT_ALL               0x00000000
464 #define DIDFT_RELAXIS           0x00000001
465 #define DIDFT_ABSAXIS           0x00000002
466 #define DIDFT_AXIS              0x00000003
467 #define DIDFT_PSHBUTTON         0x00000004
468 #define DIDFT_TGLBUTTON         0x00000008
469 #define DIDFT_BUTTON            0x0000000C
470 #define DIDFT_POV               0x00000010
471 #define DIDFT_COLLECTION        0x00000040
472 #define DIDFT_NODATA            0x00000080
473 #define DIDFT_ANYINSTANCE       0x00FFFF00
474 #define DIDFT_INSTANCEMASK      DIDFT_ANYINSTANCE
475 #define DIDFT_MAKEINSTANCE(n)   ((WORD)(n) << 8)
476 #define DIDFT_GETTYPE(n)        LOBYTE(n)
477 #define DIDFT_GETINSTANCE(n)    LOWORD((n) >> 8)
478 #define DIDFT_FFACTUATOR        0x01000000
479 #define DIDFT_FFEFFECTTRIGGER   0x02000000
480 #define DIDFT_OUTPUT            0x10000000
481 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
482 #define DIDFT_NOCOLLECTION      0x00FFFF00
483 #define DIDF_ABSAXIS            0x00000001
484 #define DIDF_RELAXIS            0x00000002
485
486 #define DIGDD_PEEK              0x00000001
487
488 typedef struct DIDEVICEOBJECTDATA {
489     DWORD       dwOfs;
490     DWORD       dwData;
491     DWORD       dwTimeStamp;
492     DWORD       dwSequence;
493 } DIDEVICEOBJECTDATA,*LPDIDEVICEOBJECTDATA;
494 typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
495
496 typedef struct _DIOBJECTDATAFORMAT {
497     const GUID *pguid;
498     DWORD       dwOfs;
499     DWORD       dwType;
500     DWORD       dwFlags;
501 } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
502
503 typedef struct {
504     DWORD                       dwSize;
505     DWORD                       dwObjSize;
506     DWORD                       dwFlags;
507     DWORD                       dwDataSize;
508     DWORD                       dwNumObjs;
509     LPDIOBJECTDATAFORMAT        rgodf;
510 } DIDATAFORMAT, *LPDIDATAFORMAT;
511 typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
512
513 typedef struct {
514     DWORD       dwSize;
515     DWORD       dwHeaderSize;
516     DWORD       dwObj;
517     DWORD       dwHow;
518 } DIPROPHEADER,*LPDIPROPHEADER;
519 typedef const DIPROPHEADER *LPCDIPROPHEADER;
520
521 #define DIPH_DEVICE     0
522 #define DIPH_BYOFFSET   1
523 #define DIPH_BYID       2
524 #define DIPH_BYUSAGE    3
525
526 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
527
528 typedef struct DIPROPDWORD {
529         DIPROPHEADER    diph;
530         DWORD           dwData;
531 } DIPROPDWORD, *LPDIPROPDWORD;
532 typedef const DIPROPDWORD *LPCDIPROPDWORD;
533
534 typedef struct DIPROPRANGE {
535         DIPROPHEADER    diph;
536         LONG            lMin;
537         LONG            lMax;
538 } DIPROPRANGE, *LPDIPROPRANGE;
539 typedef const DIPROPRANGE *LPCDIPROPRANGE;
540
541 #define DIPROPRANGE_NOMIN       ((LONG)0x80000000)
542 #define DIPROPRANGE_NOMAX       ((LONG)0x7FFFFFFF)
543
544 typedef struct DIPROPCAL {
545         DIPROPHEADER diph;
546         LONG    lMin;
547         LONG    lCenter;
548         LONG    lMax;
549 } DIPROPCAL, *LPDIPROPCAL;
550 typedef const DIPROPCAL *LPCDIPROPCAL;
551
552 typedef struct DIPROPGUIDANDPATH {
553         DIPROPHEADER diph;
554         GUID    guidClass;
555         WCHAR   wszPath[MAX_PATH];
556 } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
557 typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
558
559 /* special property GUIDs */
560 #ifdef __cplusplus
561 #define MAKEDIPROP(prop)        (*(const GUID *)(prop))
562 #else
563 #define MAKEDIPROP(prop)        ((REFGUID)(prop))
564 #endif
565 #define DIPROP_BUFFERSIZE       MAKEDIPROP(1)
566 #define DIPROP_AXISMODE         MAKEDIPROP(2)
567
568 #define DIPROPAXISMODE_ABS      0
569 #define DIPROPAXISMODE_REL      1
570
571 #define DIPROP_GRANULARITY      MAKEDIPROP(3)
572 #define DIPROP_RANGE            MAKEDIPROP(4)
573 #define DIPROP_DEADZONE         MAKEDIPROP(5)
574 #define DIPROP_SATURATION       MAKEDIPROP(6)
575 #define DIPROP_FFGAIN           MAKEDIPROP(7)
576 #define DIPROP_FFLOAD           MAKEDIPROP(8)
577 #define DIPROP_AUTOCENTER       MAKEDIPROP(9)
578
579 #define DIPROPAUTOCENTER_OFF    0
580 #define DIPROPAUTOCENTER_ON     1
581
582 #define DIPROP_CALIBRATIONMODE  MAKEDIPROP(10)
583
584 #define DIPROPCALIBRATIONMODE_COOKED    0
585 #define DIPROPCALIBRATIONMODE_RAW       1
586
587 #define DIPROP_CALIBRATION      MAKEDIPROP(11)
588 #define DIPROP_GUIDANDPATH      MAKEDIPROP(12)
589
590
591 typedef struct DIDEVCAPS {
592     DWORD       dwSize;
593     DWORD       dwFlags;
594     DWORD       dwDevType;
595     DWORD       dwAxes;
596     DWORD       dwButtons;
597     DWORD       dwPOVs;
598 #if(DIRECTINPUT_VERSION >= 0x0500)
599     DWORD       dwFFSamplePeriod;
600     DWORD       dwFFMinTimeResolution;
601     DWORD       dwFirmwareRevision;
602     DWORD       dwHardwareRevision;
603     DWORD       dwFFDriverVersion;
604 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
605 } DIDEVCAPS,*LPDIDEVCAPS;
606
607 #define DIDC_ATTACHED           0x00000001
608 #define DIDC_POLLEDDEVICE       0x00000002
609 #define DIDC_EMULATED           0x00000004
610 #define DIDC_POLLEDDATAFORMAT   0x00000008
611 #define DIDC_FORCEFEEDBACK      0x00000100
612 #define DIDC_FFATTACK           0x00000200
613 #define DIDC_FFFADE             0x00000400
614 #define DIDC_SATURATION         0x00000800
615 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
616 #define DIDC_POSNEGSATURATION   0x00002000
617 #define DIDC_DEADBAND           0x00004000
618
619 /* SetCooperativeLevel dwFlags */
620 #define DISCL_EXCLUSIVE         0x00000001
621 #define DISCL_NONEXCLUSIVE      0x00000002
622 #define DISCL_FOREGROUND        0x00000004
623 #define DISCL_BACKGROUND        0x00000008
624
625 typedef struct DICONSTANTFORCE {
626         LONG                    lMagnitude;
627 } DICONSTANTFORCE, *LPDICONSTANTFORCE;
628 typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
629
630 typedef struct DIRAMPFORCE {
631         LONG                    lStart;
632         LONG                    lEnd;
633 } DIRAMPFORCE, *LPDIRAMPFORCE;
634 typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
635
636 typedef struct DIPERIODIC {
637         DWORD                   dwMagnitude;
638         LONG                    lOffset;
639         DWORD                   dwPhase;
640         DWORD                   dwPeriod;
641 } DIPERIODIC, *LPDIPERIODIC;
642 typedef const DIPERIODIC *LPCDIPERIODIC;
643
644 typedef struct DICONDITION {
645         LONG                    lOffset;
646         LONG                    lPositiveCoefficient;
647         LONG                    lNegativeCoefficient;
648         DWORD                   dwPositiveSaturation;
649         DWORD                   dwNegativeSaturation;
650         LONG                    lDeadBand;
651 } DICONDITION, *LPDICONDITION;
652 typedef const DICONDITION *LPCDICONDITION;
653
654 typedef struct DICUSTOMFORCE {
655         DWORD                   cChannels;
656         DWORD                   dwSamplePeriod;
657         DWORD                   cSamples;
658         LPLONG                  rglForceData;
659 } DICUSTOMFORCE, *LPDICUSTOMFORCE;
660 typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
661
662 typedef struct DIENVELOPE {
663         DWORD                   dwSize;
664         DWORD                   dwAttackLevel;
665         DWORD                   dwAttackTime;
666         DWORD                   dwFadeLevel;
667         DWORD                   dwFadeTime;
668 } DIENVELOPE, *LPDIENVELOPE;
669 typedef const DIENVELOPE *LPCDIENVELOPE;
670
671 typedef struct DIEFFECT {
672         DWORD                   dwSize;
673         DWORD                   dwFlags;
674         DWORD                   dwDuration;
675         DWORD                   dwSamplePeriod;
676         DWORD                   dwGain;
677         DWORD                   dwTriggerButton;
678         DWORD                   dwTriggerRepeatInterval;
679         DWORD                   cAxes;
680         LPDWORD                 rgdwAxes;
681         LPLONG                  rglDirection;
682         LPDIENVELOPE            lpEnvelope;
683         DWORD                   cbTypeSpecificParams;
684         LPVOID                  lpvTypeSpecificParams;
685 } DIEFFECT, *LPDIEFFECT;
686 typedef const DIEFFECT *LPCDIEFFECT;
687
688 typedef struct DIEFFECTINFOA {
689         DWORD                   dwSize;
690         GUID                    guid;
691         DWORD                   dwEffType;
692         DWORD                   dwStaticParams;
693         DWORD                   dwDynamicParams;
694         CHAR                    tszName[MAX_PATH];
695 } DIEFFECTINFOA, *LPDIEFFECTINFOA;
696 typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
697
698 typedef struct DIEFFECTINFOW {
699         DWORD                   dwSize;
700         GUID                    guid;
701         DWORD                   dwEffType;
702         DWORD                   dwStaticParams;
703         DWORD                   dwDynamicParams;
704         WCHAR                   tszName[MAX_PATH];
705 } DIEFFECTINFOW, *LPDIEFFECTINFOW;
706 typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
707
708 DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
709 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
710 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
711
712 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
713 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
714
715 typedef struct DIEFFESCAPE {
716         DWORD   dwSize;
717         DWORD   dwCommand;
718         LPVOID  lpvInBuffer;
719         DWORD   cbInBuffer;
720         LPVOID  lpvOutBuffer;
721         DWORD   cbOutBuffer;
722 } DIEFFESCAPE, *LPDIEFFESCAPE;
723
724 typedef struct DIJOYSTATE {
725         LONG    lX;
726         LONG    lY;
727         LONG    lZ;
728         LONG    lRx;
729         LONG    lRy;
730         LONG    lRz;
731         LONG    rglSlider[2];
732         DWORD   rgdwPOV[4];
733         BYTE    rgbButtons[32];
734 } DIJOYSTATE, *LPDIJOYSTATE;
735
736 typedef struct DIJOYSTATE2 {
737         LONG    lX;
738         LONG    lY;
739         LONG    lZ;
740         LONG    lRx;
741         LONG    lRy;
742         LONG    lRz;
743         LONG    rglSlider[2];
744         DWORD   rgdwPOV[4];
745         BYTE    rgbButtons[128];
746         LONG    lVX;            /* 'v' as in velocity */
747         LONG    lVY;
748         LONG    lVZ;
749         LONG    lVRx;
750         LONG    lVRy;
751         LONG    lVRz;
752         LONG    rglVSlider[2];
753         LONG    lAX;            /* 'a' as in acceleration */
754         LONG    lAY;
755         LONG    lAZ;
756         LONG    lARx;
757         LONG    lARy;
758         LONG    lARz;
759         LONG    rglASlider[2];
760         LONG    lFX;            /* 'f' as in force */
761         LONG    lFY;
762         LONG    lFZ;
763         LONG    lFRx;           /* 'fr' as in rotational force aka torque */
764         LONG    lFRy;
765         LONG    lFRz;
766         LONG    rglFSlider[2];
767 } DIJOYSTATE2, *LPDIJOYSTATE2;
768
769 #define DIJOFS_X                FIELD_OFFSET(DIJOYSTATE, lX)
770 #define DIJOFS_Y                FIELD_OFFSET(DIJOYSTATE, lY)
771 #define DIJOFS_Z                FIELD_OFFSET(DIJOYSTATE, lZ)
772 #define DIJOFS_RX               FIELD_OFFSET(DIJOYSTATE, lRx)
773 #define DIJOFS_RY               FIELD_OFFSET(DIJOYSTATE, lRy)
774 #define DIJOFS_RZ               FIELD_OFFSET(DIJOYSTATE, lRz)
775 #define DIJOFS_SLIDER(n)        (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
776                                                         (n) * sizeof(LONG))
777 #define DIJOFS_POV(n)           (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
778                                                         (n) * sizeof(DWORD))
779 #define DIJOFS_BUTTON(n)        (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
780 #define DIJOFS_BUTTON0          DIJOFS_BUTTON(0)
781 #define DIJOFS_BUTTON1          DIJOFS_BUTTON(1)
782 #define DIJOFS_BUTTON2          DIJOFS_BUTTON(2)
783 #define DIJOFS_BUTTON3          DIJOFS_BUTTON(3)
784 #define DIJOFS_BUTTON4          DIJOFS_BUTTON(4)
785 #define DIJOFS_BUTTON5          DIJOFS_BUTTON(5)
786 #define DIJOFS_BUTTON6          DIJOFS_BUTTON(6)
787 #define DIJOFS_BUTTON7          DIJOFS_BUTTON(7)
788 #define DIJOFS_BUTTON8          DIJOFS_BUTTON(8)
789 #define DIJOFS_BUTTON9          DIJOFS_BUTTON(9)
790 #define DIJOFS_BUTTON10         DIJOFS_BUTTON(10)
791 #define DIJOFS_BUTTON11         DIJOFS_BUTTON(11)
792 #define DIJOFS_BUTTON12         DIJOFS_BUTTON(12)
793 #define DIJOFS_BUTTON13         DIJOFS_BUTTON(13)
794 #define DIJOFS_BUTTON14         DIJOFS_BUTTON(14)
795 #define DIJOFS_BUTTON15         DIJOFS_BUTTON(15)
796 #define DIJOFS_BUTTON16         DIJOFS_BUTTON(16)
797 #define DIJOFS_BUTTON17         DIJOFS_BUTTON(17)
798 #define DIJOFS_BUTTON18         DIJOFS_BUTTON(18)
799 #define DIJOFS_BUTTON19         DIJOFS_BUTTON(19)
800 #define DIJOFS_BUTTON20         DIJOFS_BUTTON(20)
801 #define DIJOFS_BUTTON21         DIJOFS_BUTTON(21)
802 #define DIJOFS_BUTTON22         DIJOFS_BUTTON(22)
803 #define DIJOFS_BUTTON23         DIJOFS_BUTTON(23)
804 #define DIJOFS_BUTTON24         DIJOFS_BUTTON(24)
805 #define DIJOFS_BUTTON25         DIJOFS_BUTTON(25)
806 #define DIJOFS_BUTTON26         DIJOFS_BUTTON(26)
807 #define DIJOFS_BUTTON27         DIJOFS_BUTTON(27)
808 #define DIJOFS_BUTTON28         DIJOFS_BUTTON(28)
809 #define DIJOFS_BUTTON29         DIJOFS_BUTTON(29)
810 #define DIJOFS_BUTTON30         DIJOFS_BUTTON(30)
811 #define DIJOFS_BUTTON31         DIJOFS_BUTTON(31)
812
813 /* DInput 7 structures, types */
814 typedef struct DIFILEEFFECT {
815   DWORD       dwSize;
816   GUID        GuidEffect;
817   LPCDIEFFECT lpDiEffect;
818   CHAR        szFriendlyName[MAX_PATH];
819 } DIFILEEFFECT, *LPDIFILEEFFECT;
820
821 typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
822 typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
823
824 /* DInput 8 structures and types */
825 #if DIRECTINPUT_VERSION >= 0x0800
826 typedef struct _DIACTIONA {
827         UINT_PTR        uAppData;
828         DWORD           dwSemantics;
829         DWORD           dwFlags;
830         union {
831                 LPCSTR  lptszActionName;
832                 UINT    uResIdString;
833         } DUMMYUNIONNAME;
834         GUID            guidInstance;
835         DWORD           dwObjID;
836         DWORD           dwHow;
837 } DIACTIONA, *LPDIACTIONA;
838 typedef const DIACTIONA *LPCDIACTIONA;
839
840 typedef struct _DIACTIONW {
841         UINT_PTR        uAppData;
842         DWORD           dwSemantics;
843         DWORD           dwFlags;
844         union {
845                 LPCWSTR lptszActionName;
846                 UINT    uResIdString;
847         } DUMMYUNIONNAME;
848         GUID            guidInstance;
849         DWORD           dwObjID;
850         DWORD           dwHow;
851 } DIACTIONW, *LPDIACTIONW;
852 typedef const DIACTIONW *LPCDIACTIONW;
853
854 DECL_WINELIB_TYPE_AW(DIACTION)
855 DECL_WINELIB_TYPE_AW(LPDIACTION)
856 DECL_WINELIB_TYPE_AW(LPCDIACTION)
857
858 #define DIA_FORCEFEEDBACK       0x00000001
859 #define DIA_APPMAPPED           0x00000002
860 #define DIA_APPNOMAP            0x00000004
861 #define DIA_NORANGE             0x00000008
862 #define DIA_APPFIXED            0x00000010
863
864 #define DIAH_UNMAPPED           0x00000000
865 #define DIAH_USERCONFIG         0x00000001
866 #define DIAH_APPREQUESTED       0x00000002
867 #define DIAH_HWAPP              0x00000004
868 #define DIAH_HWDEFAULT          0x00000008
869 #define DIAH_DEFAULT            0x00000020
870 #define DIAH_ERROR              0x80000000
871
872 typedef struct _DIACTIONFORMATA {
873         DWORD           dwSize;
874         DWORD           dwActionSize;
875         DWORD           dwDataSize;
876         DWORD           dwNumActions;
877         LPDIACTIONA     rgoAction;
878         GUID            guidActionMap;
879         DWORD           dwGenre;
880         DWORD           dwBufferSize;
881         LONG            lAxisMin;
882         LONG            lAxisMax;
883         HINSTANCE       hInstString;
884         FILETIME        ftTimeStamp;
885         DWORD           dwCRC;
886         CHAR            tszActionMap[MAX_PATH];
887 } DIACTIONFORMATA, *LPDIACTIONFORMATA;
888 typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
889
890 typedef struct _DIACTIONFORMATW {
891         DWORD           dwSize;
892         DWORD           dwActionSize;
893         DWORD           dwDataSize;
894         DWORD           dwNumActions;
895         LPDIACTIONW     rgoAction;
896         GUID            guidActionMap;
897         DWORD           dwGenre;
898         DWORD           dwBufferSize;
899         LONG            lAxisMin;
900         LONG            lAxisMax;
901         HINSTANCE       hInstString;
902         FILETIME        ftTimeStamp;
903         DWORD           dwCRC;
904         WCHAR           tszActionMap[MAX_PATH];
905 } DIACTIONFORMATW, *LPDIACTIONFORMATW;
906 typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
907
908 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
909 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
910 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
911
912 #define DIAFTS_NEWDEVICELOW     0xFFFFFFFF
913 #define DIAFTS_NEWDEVICEHIGH    0xFFFFFFFF
914 #define DIAFTS_UNUSEDDEVICELOW  0x00000000
915 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
916
917 #define DIDBAM_DEFAULT          0x00000000
918 #define DIDBAM_PRESERVE         0x00000001
919 #define DIDBAM_INITIALIZE       0x00000002
920 #define DIDBAM_HWDEFAULTS       0x00000004
921
922 #define DIDSAM_DEFAULT          0x00000000
923 #define DIDSAM_NOUSER           0x00000001
924 #define DIDSAM_FORCESAVE        0x00000002
925
926 #define DICD_DEFAULT            0x00000000
927 #define DICD_EDIT               0x00000001
928
929 #ifndef D3DCOLOR_DEFINED
930 typedef DWORD D3DCOLOR;
931 #define D3DCOLOR_DEFINED
932 #endif
933
934 typedef struct _DICOLORSET {
935         DWORD           dwSize;
936         D3DCOLOR        cTextFore;
937         D3DCOLOR        cTextHighlight;
938         D3DCOLOR        cCalloutLine;
939         D3DCOLOR        cCalloutHighlight;
940         D3DCOLOR        cBorder;
941         D3DCOLOR        cControlFill;
942         D3DCOLOR        cHighlightFill;
943         D3DCOLOR        cAreaFill;
944 } DICOLORSET, *LPDICOLORSET;
945 typedef const DICOLORSET *LPCDICOLORSET;
946
947 typedef struct _DICONFIGUREDEVICESPARAMSA {
948         DWORD                   dwSize;
949         DWORD                   dwcUsers;
950         LPSTR                   lptszUserNames;
951         DWORD                   dwcFormats;
952         LPDIACTIONFORMATA       lprgFormats;
953         HWND                    hwnd;
954         DICOLORSET              dics;
955         LPUNKNOWN               lpUnkDDSTarget;
956 } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
957 typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
958
959 typedef struct _DICONFIGUREDEVICESPARAMSW {
960         DWORD                   dwSize;
961         DWORD                   dwcUsers;
962         LPWSTR                  lptszUserNames;
963         DWORD                   dwcFormats;
964         LPDIACTIONFORMATW       lprgFormats;
965         HWND                    hwnd;
966         DICOLORSET              dics;
967         LPUNKNOWN               lpUnkDDSTarget;
968 } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
969 typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
970
971 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
972 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
973 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
974
975 #define DIDIFT_CONFIGURATION    0x00000001
976 #define DIDIFT_OVERLAY          0x00000002
977
978 #define DIDAL_CENTERED          0x00000000
979 #define DIDAL_LEFTALIGNED       0x00000001
980 #define DIDAL_RIGHTALIGNED      0x00000002
981 #define DIDAL_MIDDLE            0x00000000
982 #define DIDAL_TOPALIGNED        0x00000004
983 #define DIDAL_BOTTOMALIGNED     0x00000008
984
985 typedef struct _DIDEVICEIMAGEINFOA {
986         CHAR    tszImagePath[MAX_PATH];
987         DWORD   dwFlags;
988         DWORD   dwViewID;
989         RECT    rcOverlay;
990         DWORD   dwObjID;
991         DWORD   dwcValidPts;
992         POINT   rgptCalloutLine[5];
993         RECT    rcCalloutRect;
994         DWORD   dwTextAlign;
995 } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
996 typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
997
998 typedef struct _DIDEVICEIMAGEINFOW {
999         WCHAR   tszImagePath[MAX_PATH];
1000         DWORD   dwFlags;
1001         DWORD   dwViewID;
1002         RECT    rcOverlay;
1003         DWORD   dwObjID;
1004         DWORD   dwcValidPts;
1005         POINT   rgptCalloutLine[5];
1006         RECT    rcCalloutRect;
1007         DWORD   dwTextAlign;
1008 } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
1009 typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
1010
1011 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
1012 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
1013 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
1014
1015 typedef struct _DIDEVICEIMAGEINFOHEADERA {
1016         DWORD   dwSize;
1017         DWORD   dwSizeImageInfo;
1018         DWORD   dwcViews;
1019         DWORD   dwcButtons;
1020         DWORD   dwcAxes;
1021         DWORD   dwcPOVs;
1022         DWORD   dwBufferSize;
1023         DWORD   dwBufferUsed;
1024         LPDIDEVICEIMAGEINFOA    lprgImageInfoArray;
1025 } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
1026 typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
1027
1028 typedef struct _DIDEVICEIMAGEINFOHEADERW {
1029         DWORD   dwSize;
1030         DWORD   dwSizeImageInfo;
1031         DWORD   dwcViews;
1032         DWORD   dwcButtons;
1033         DWORD   dwcAxes;
1034         DWORD   dwcPOVs;
1035         DWORD   dwBufferSize;
1036         DWORD   dwBufferUsed;
1037         LPDIDEVICEIMAGEINFOW    lprgImageInfoArray;
1038 } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
1039 typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
1040
1041 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
1042 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
1043 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
1044
1045 #endif /* DI8 */
1046
1047
1048 /*****************************************************************************
1049  * IDirectInputEffect interface
1050  */
1051 #define ICOM_INTERFACE IDirectInputEffect
1052 #define IDirectInputEffect_METHODS \
1053     ICOM_METHOD3(HRESULT,Initialize,      HINSTANCE,, DWORD,, REFGUID,) \
1054     ICOM_METHOD1(HRESULT,GetEffectGuid,   LPGUID,) \
1055     ICOM_METHOD2(HRESULT,GetParameters,   LPDIEFFECT,, DWORD,) \
1056     ICOM_METHOD2(HRESULT,SetParameters,   LPCDIEFFECT,, DWORD,) \
1057     ICOM_METHOD2(HRESULT,Start,           DWORD,, DWORD,) \
1058     ICOM_METHOD (HRESULT,Stop) \
1059     ICOM_METHOD1(HRESULT,GetEffectStatus, LPDWORD,) \
1060     ICOM_METHOD (HRESULT,Download) \
1061     ICOM_METHOD (HRESULT,Unload) \
1062     ICOM_METHOD1(HRESULT,Escape,          LPDIEFFESCAPE,)
1063 #define IDirectInputEffect_IMETHODS \
1064     IUnknown_IMETHODS \
1065     IDirectInputEffect_METHODS
1066 ICOM_DEFINE(IDirectInputEffect,IUnknown)
1067 #undef ICOM_INTERFACE
1068
1069     /*** IUnknown methods ***/
1070 #define IDirectInputEffect_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1071 #define IDirectInputEffect_AddRef(p)             ICOM_CALL (AddRef,p)
1072 #define IDirectInputEffect_Release(p)            ICOM_CALL (Release,p)
1073     /*** IDirectInputEffect methods ***/
1074 #define IDirectInputEffect_Initialize(p,a,b,c)    ICOM_CALL3(Initialize,p,a,b,c)
1075 #define IDirectInputEffect_GetEffectGuid(p,a)     ICOM_CALL1(GetEffectGuid,p,a)
1076 #define IDirectInputEffect_GetParameters(p,a,b)   ICOM_CALL2(GetParameters,p,a,b)
1077 #define IDirectInputEffect_SetParameters(p,a,b)   ICOM_CALL2(SetParameters,p,a,b)
1078 #define IDirectInputEffect_Start(p,a,b)           ICOM_CALL2(Start,p,a,b)
1079 #define IDirectInputEffect_Stop(p)                ICOM_CALL (Stop,p)
1080 #define IDirectInputEffect_GetEffectStatus(p,a,b) ICOM_CALL1(GetEffectStatus,p,a)
1081 #define IDirectInputEffect_Download(p)            ICOM_CALL (Download,p)
1082 #define IDirectInputEffect_Unload(p)              ICOM_CALL (Unload,p)
1083 #define IDirectInputEffect_Escape(p,a)            ICOM_CALL1(Escape,p,a)
1084
1085
1086 /*****************************************************************************
1087  * IDirectInputDeviceA interface
1088  */
1089 #define ICOM_INTERFACE IDirectInputDeviceA
1090 #define IDirectInputDeviceA_METHODS \
1091     ICOM_METHOD1(HRESULT,GetCapabilities, LPDIDEVCAPS,lpDIDevCaps) \
1092     ICOM_METHOD3(HRESULT,EnumObjects, LPDIENUMDEVICEOBJECTSCALLBACKA,lpCallback, LPVOID,pvRef, DWORD,dwFlags) \
1093     ICOM_METHOD2(HRESULT,GetProperty, REFGUID,rguidProp, LPDIPROPHEADER,pdiph) \
1094     ICOM_METHOD2(HRESULT,SetProperty, REFGUID,rguidProp, LPCDIPROPHEADER,pdiph) \
1095     ICOM_METHOD (HRESULT,Acquire) \
1096     ICOM_METHOD (HRESULT,Unacquire) \
1097     ICOM_METHOD2(HRESULT,GetDeviceState, DWORD,cbData, LPVOID,lpvData) \
1098     ICOM_METHOD4(HRESULT,GetDeviceData, DWORD,cbObjectData, LPDIDEVICEOBJECTDATA,rgdod, LPDWORD,pdwInOut, DWORD,dwFlags) \
1099     ICOM_METHOD1(HRESULT,SetDataFormat, LPCDIDATAFORMAT,lpdf) \
1100     ICOM_METHOD1(HRESULT,SetEventNotification, HANDLE,hEvent) \
1101     ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hwnd, DWORD,dwFlags) \
1102     ICOM_METHOD3(HRESULT,GetObjectInfo, LPDIDEVICEOBJECTINSTANCEA,pdidoi, DWORD,dwObj, DWORD,dwHow) \
1103     ICOM_METHOD1(HRESULT,GetDeviceInfo, LPDIDEVICEINSTANCEA,pdidi) \
1104     ICOM_METHOD2(HRESULT,RunControlPanel, HWND,hwndOwner, DWORD,dwFlags) \
1105     ICOM_METHOD3(HRESULT,Initialize, HINSTANCE,hinst, DWORD,dwVersion, REFGUID,rguid)
1106 #define IDirectInputDeviceA_IMETHODS \
1107     IUnknown_IMETHODS \
1108     IDirectInputDeviceA_METHODS
1109 ICOM_DEFINE(IDirectInputDeviceA,IUnknown)
1110 #undef ICOM_INTERFACE
1111
1112     /*** IUnknown methods ***/
1113 #define IDirectInputDevice_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1114 #define IDirectInputDevice_AddRef(p)             ICOM_CALL (AddRef,p)
1115 #define IDirectInputDevice_Release(p)            ICOM_CALL (Release,p)
1116 /*** IDirectInputDevice methods ***/
1117 #define IDirectInputDevice_GetCapabilities(p,a)       ICOM_CALL1(GetCapabilities,p,a)
1118 #define IDirectInputDevice_EnumObjects(p,a,b,c)       ICOM_CALL3(EnumObjects,p,a,b,c)
1119 #define IDirectInputDevice_GetProperty(p,a,b)         ICOM_CALL2(GetProperty,p,a,b)
1120 #define IDirectInputDevice_SetProperty(p,a,b)         ICOM_CALL2(SetProperty,p,a,b)
1121 #define IDirectInputDevice_Acquire(p)                 ICOM_CALL (Acquire,p)
1122 #define IDirectInputDevice_Unacquire(p)               ICOM_CALL (Unacquire,p)
1123 #define IDirectInputDevice_GetDeviceState(p,a,b)      ICOM_CALL2(GetDeviceState,p,a,b)
1124 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   ICOM_CALL4(GetDeviceData,p,a,b,c,d)
1125 #define IDirectInputDevice_SetDataFormat(p,a)         ICOM_CALL1(SetDataFormat,p,a)
1126 #define IDirectInputDevice_SetEventNotification(p,a)  ICOM_CALL1(SetEventNotification,p,a)
1127 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1128 #define IDirectInputDevice_GetObjectInfo(p,a,b,c)     ICOM_CALL3(GetObjectInfo,p,a,b,c)
1129 #define IDirectInputDevice_GetDeviceInfo(p,a)         ICOM_CALL1(GetDeviceInfo,p,a)
1130 #define IDirectInputDevice_RunControlPanel(p,a,b)     ICOM_CALL2(RunControlPanel,p,a,b)
1131 #define IDirectInputDevice_Initialize(p,a,b,c)        ICOM_CALL3(Initialize,p,a,b,c)
1132
1133
1134 /*****************************************************************************
1135  * IDirectInputDevice2A interface
1136  */
1137 #define ICOM_INTERFACE IDirectInputDevice2A
1138 #define IDirectInputDevice2A_METHODS \
1139     ICOM_METHOD4(HRESULT,CreateEffect, REFGUID,rguid, LPCDIEFFECT,lpeff, LPDIRECTINPUTEFFECT*,ppdeff, LPUNKNOWN,punkOuter) \
1140     ICOM_METHOD3(HRESULT,EnumEffects, LPDIENUMEFFECTSCALLBACKA,lpCallback, LPVOID,pvRef, DWORD,dwEffType) \
1141     ICOM_METHOD2(HRESULT,GetEffectInfo, LPDIEFFECTINFOA,pdei, REFGUID,rguid) \
1142     ICOM_METHOD1(HRESULT,GetForceFeedbackState, LPDWORD,pdwOut) \
1143     ICOM_METHOD1(HRESULT,SendForceFeedbackCommand, DWORD,dwFlags) \
1144     ICOM_METHOD3(HRESULT,EnumCreatedEffectObjects, LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,lpCallback, LPVOID,pvRef, DWORD,fl) \
1145     ICOM_METHOD1(HRESULT,Escape, LPDIEFFESCAPE,pesc) \
1146     ICOM_METHOD (HRESULT,Poll) \
1147     ICOM_METHOD4(HRESULT,SendDeviceData, DWORD,cbObjectData, LPCDIDEVICEOBJECTDATA,rgdod, LPDWORD,pdwInOut, DWORD,fl)
1148 #define IDirectInputDevice2A_IMETHODS \
1149     IDirectInputDeviceA_IMETHODS \
1150     IDirectInputDevice2A_METHODS
1151 ICOM_DEFINE(IDirectInputDevice2A,IDirectInputDeviceA)
1152 #undef ICOM_INTERFACE
1153
1154 /*** IUnknown methods ***/
1155 #define IDirectInputDevice2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1156 #define IDirectInputDevice2_AddRef(p)             ICOM_CALL (AddRef,p)
1157 #define IDirectInputDevice2_Release(p)            ICOM_CALL (Release,p)
1158 /*** IDirectInputDevice methods ***/
1159 #define IDirectInputDevice2_GetCapabilities(p,a)       ICOM_CALL1(GetCapabilities,p,a)
1160 #define IDirectInputDevice2_EnumObjects(p,a,b,c)       ICOM_CALL3(EnumObjects,p,a,b,c)
1161 #define IDirectInputDevice2_GetProperty(p,a,b)         ICOM_CALL2(GetProperty,p,a,b)
1162 #define IDirectInputDevice2_SetProperty(p,a,b)         ICOM_CALL2(SetProperty,p,a,b)
1163 #define IDirectInputDevice2_Acquire(p)                 ICOM_CALL (Acquire,p)
1164 #define IDirectInputDevice2_Unacquire(p)               ICOM_CALL (Unacquire,p)
1165 #define IDirectInputDevice2_GetDeviceState(p,a,b)      ICOM_CALL2(GetDeviceState,p,a,b)
1166 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   ICOM_CALL4(GetDeviceData,p,a,b,c,d)
1167 #define IDirectInputDevice2_SetDataFormat(p,a)         ICOM_CALL1(SetDataFormat,p,a)
1168 #define IDirectInputDevice2_SetEventNotification(p,a)  ICOM_CALL1(SetEventNotification,p,a)
1169 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1170 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     ICOM_CALL3(GetObjectInfo,p,a,b,c)
1171 #define IDirectInputDevice2_GetDeviceInfo(p,a)         ICOM_CALL1(GetDeviceInfo,p,a)
1172 #define IDirectInputDevice2_RunControlPanel(p,a,b)     ICOM_CALL2(RunControlPanel,p,a,b)
1173 #define IDirectInputDevice2_Initialize(p,a,b,c)        ICOM_CALL3(Initialize,p,a,b,c)
1174 /*** IDirectInputDevice2 methods ***/
1175 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           ICOM_CALL4(CreateEffect,p,a,b,c,d)
1176 #define IDirectInputDevice2_EnumEffects(p,a,b,c)              ICOM_CALL3(EnumEffects,p,a,b,c)
1177 #define IDirectInputDevice2_GetEffectInfo(p,a,b)              ICOM_CALL2(GetEffectInfo,p,a,b)
1178 #define IDirectInputDevice2_GetForceFeedbackState(p,a)        ICOM_CALL1(GetForceFeedbackState,p,a)
1179 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     ICOM_CALL1(SendForceFeedbackCommand,p,a)
1180 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) ICOM_CALL3(EnumCreatedEffectObjects,p,a,b,c)
1181 #define IDirectInputDevice2_Escape(p,a)                       ICOM_CALL1(Escape,p,a)
1182 #define IDirectInputDevice2_Poll(p)                           ICOM_CALL (Poll,p)
1183 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         ICOM_CALL4(SendDeviceData,p,a,b,c,d)
1184
1185 #if DIRECTINPUT_VERSION >= 0x0700
1186 /*****************************************************************************
1187  * IDirectInputDevice7A interface
1188  */
1189 #define ICOM_INTERFACE IDirectInputDevice7A
1190 #define IDirectInputDevice7A_METHODS \
1191     ICOM_METHOD4(HRESULT,EnumEffectsInFile,LPCSTR,lpszFileName,LPDIENUMEFFECTSINFILECALLBACK,pec,LPVOID,pvRef,DWORD,dwFlags) \
1192     ICOM_METHOD4(HRESULT,WriteEffectToFile,LPCSTR,lpszFileName,DWORD,dwEntries,LPDIFILEEFFECT,rgDiFileEft,DWORD,dwFlags)
1193 #define IDirectInputDevice7A_IMETHODS \
1194     IDirectInputDevice2A_IMETHODS \
1195     IDirectInputDevice7A_METHODS
1196 ICOM_DEFINE(IDirectInputDevice7A,IDirectInputDevice2A)
1197 #undef ICOM_INTERFACE
1198
1199 /*** IUnknown methods ***/
1200 #define IDirectInputDevice7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1201 #define IDirectInputDevice7_AddRef(p)             ICOM_CALL (AddRef,p)
1202 #define IDirectInputDevice7_Release(p)            ICOM_CALL (Release,p)
1203 /*** IDirectInputDevice methods ***/
1204 #define IDirectInputDevice7_GetCapabilities(p,a)       ICOM_CALL1(GetCapabilities,p,a)
1205 #define IDirectInputDevice7_EnumObjects(p,a,b,c)       ICOM_CALL3(EnumObjects,p,a,b,c)
1206 #define IDirectInputDevice7_GetProperty(p,a,b)         ICOM_CALL2(GetProperty,p,a,b)
1207 #define IDirectInputDevice7_SetProperty(p,a,b)         ICOM_CALL2(SetProperty,p,a,b)
1208 #define IDirectInputDevice7_Acquire(p)                 ICOM_CALL (Acquire,p)
1209 #define IDirectInputDevice7_Unacquire(p)               ICOM_CALL (Unacquire,p)
1210 #define IDirectInputDevice7_GetDeviceState(p,a,b)      ICOM_CALL2(GetDeviceState,p,a,b)
1211 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   ICOM_CALL4(GetDeviceData,p,a,b,c,d)
1212 #define IDirectInputDevice7_SetDataFormat(p,a)         ICOM_CALL1(SetDataFormat,p,a)
1213 #define IDirectInputDevice7_SetEventNotification(p,a)  ICOM_CALL1(SetEventNotification,p,a)
1214 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1215 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     ICOM_CALL3(GetObjectInfo,p,a,b,c)
1216 #define IDirectInputDevice7_GetDeviceInfo(p,a)         ICOM_CALL1(GetDeviceInfo,p,a)
1217 #define IDirectInputDevice7_RunControlPanel(p,a,b)     ICOM_CALL2(RunControlPanel,p,a,b)
1218 #define IDirectInputDevice7_Initialize(p,a,b,c)        ICOM_CALL3(Initialize,p,a,b,c)
1219 /*** IDirectInputDevice2 methods ***/
1220 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           ICOM_CALL4(CreateEffect,p,a,b,c,d)
1221 #define IDirectInputDevice7_EnumEffects(p,a,b,c)              ICOM_CALL3(EnumEffects,p,a,b,c)
1222 #define IDirectInputDevice7_GetEffectInfo(p,a,b)              ICOM_CALL2(GetEffectInfo,p,a,b)
1223 #define IDirectInputDevice7_GetForceFeedbackState(p,a)        ICOM_CALL1(GetForceFeedbackState,p,a)
1224 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     ICOM_CALL1(SendForceFeedbackCommand,p,a)
1225 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) ICOM_CALL3(EnumCreatedEffectObjects,p,a,b,c)
1226 #define IDirectInputDevice7_Escape(p,a)                       ICOM_CALL1(Escape,p,a)
1227 #define IDirectInputDevice7_Poll(p)                           ICOM_CALL (Poll,p)
1228 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         ICOM_CALL4(SendDeviceData,p,a,b,c,d)
1229 /*** IDirectInputDevice7 methods ***/
1230 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) ICOM_CALL4(EnumEffectsInFile,p,a,b,c,d)
1231 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) ICOM_CALL4(WriteEffectToFile,p,a,b,c,d)
1232 #endif /* DI7 */
1233
1234 #if DIRECTINPUT_VERSION >= 0x0800
1235 /*****************************************************************************
1236  * IDirectInputDevice8A interface
1237  */
1238 #define ICOM_INTERFACE IDirectInputDevice8A
1239 #define IDirectInputDevice8A_METHODS \
1240     ICOM_METHOD3(HRESULT,BuildActionMap, LPDIACTIONFORMATA,lpdiaf, LPCSTR,lpszUserName, DWORD,dwFlags) \
1241     ICOM_METHOD3(HRESULT,SetActionMap, LPDIACTIONFORMATA,lpdiaf, LPCSTR,lpszUserName, DWORD,dwFlags) \
1242     ICOM_METHOD1(HRESULT,GetImageInfo, LPDIDEVICEIMAGEINFOHEADERA,lpdiDevImageInfoHeader)
1243 #define IDirectInputDevice8A_IMETHODS \
1244     IDirectInputDevice7A_IMETHODS \
1245     IDirectInputDevice8A_METHODS
1246 ICOM_DEFINE(IDirectInputDevice8A,IDirectInputDevice7A)
1247 #undef ICOM_INTERFACE
1248
1249 /*** IUnknown methods ***/
1250 #define IDirectInputDevice8_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1251 #define IDirectInputDevice8_AddRef(p)             ICOM_CALL (AddRef,p)
1252 #define IDirectInputDevice8_Release(p)            ICOM_CALL (Release,p)
1253 /*** IDirectInputDevice methods ***/
1254 #define IDirectInputDevice8_GetCapabilities(p,a)       ICOM_CALL1(GetCapabilities,p,a)
1255 #define IDirectInputDevice8_EnumObjects(p,a,b,c)       ICOM_CALL3(EnumObjects,p,a,b,c)
1256 #define IDirectInputDevice8_GetProperty(p,a,b)         ICOM_CALL2(GetProperty,p,a,b)
1257 #define IDirectInputDevice8_SetProperty(p,a,b)         ICOM_CALL2(SetProperty,p,a,b)
1258 #define IDirectInputDevice8_Acquire(p)                 ICOM_CALL (Acquire,p)
1259 #define IDirectInputDevice8_Unacquire(p)               ICOM_CALL (Unacquire,p)
1260 #define IDirectInputDevice8_GetDeviceState(p,a,b)      ICOM_CALL2(GetDeviceState,p,a,b)
1261 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   ICOM_CALL4(GetDeviceData,p,a,b,c,d)
1262 #define IDirectInputDevice8_SetDataFormat(p,a)         ICOM_CALL1(SetDataFormat,p,a)
1263 #define IDirectInputDevice8_SetEventNotification(p,a)  ICOM_CALL1(SetEventNotification,p,a)
1264 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
1265 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     ICOM_CALL3(GetObjectInfo,p,a,b,c)
1266 #define IDirectInputDevice8_GetDeviceInfo(p,a)         ICOM_CALL1(GetDeviceInfo,p,a)
1267 #define IDirectInputDevice8_RunControlPanel(p,a,b)     ICOM_CALL2(RunControlPanel,p,a,b)
1268 #define IDirectInputDevice8_Initialize(p,a,b,c)        ICOM_CALL3(Initialize,p,a,b,c)
1269 /*** IDirectInputDevice2 methods ***/
1270 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           ICOM_CALL4(CreateEffect,p,a,b,c,d)
1271 #define IDirectInputDevice8_EnumEffects(p,a,b,c)              ICOM_CALL3(EnumEffects,p,a,b,c)
1272 #define IDirectInputDevice8_GetEffectInfo(p,a,b)              ICOM_CALL2(GetEffectInfo,p,a,b)
1273 #define IDirectInputDevice8_GetForceFeedbackState(p,a)        ICOM_CALL1(GetForceFeedbackState,p,a)
1274 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     ICOM_CALL1(SendForceFeedbackCommand,p,a)
1275 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) ICOM_CALL3(EnumCreatedEffectObjects,p,a,b,c)
1276 #define IDirectInputDevice8_Escape(p,a)                       ICOM_CALL1(Escape,p,a)
1277 #define IDirectInputDevice8_Poll(p)                           ICOM_CALL (Poll,p)
1278 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         ICOM_CALL4(SendDeviceData,p,a,b,c,d)
1279 /*** IDirectInputDevice7 methods ***/
1280 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) ICOM_CALL4(EnumEffectsInFile,p,a,b,c,d)
1281 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) ICOM_CALL4(WriteEffectToFile,p,a,b,c,d)
1282 /*** IDirectInputDevice8 methods ***/
1283 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) ICOM_CALL3(BuildActionMap,p,a,b,c)
1284 #define IDirectInputDevice8_SetActionMap(p,a,b,c)   ICOM_CALL3(SetActionMap,p,a,b,c)
1285 #define IDirectInputDevice8_GetImageInfo(p,a)       ICOM_CALL1(GetImageInfo,p,a)
1286 #endif /* DI8 */
1287
1288 /* "Standard" Mouse report... */
1289 typedef struct DIMOUSESTATE {
1290   LONG lX;
1291   LONG lY;
1292   LONG lZ;
1293   BYTE rgbButtons[4];
1294 } DIMOUSESTATE;
1295
1296 /* "Standard" Mouse report for DInput 7... */
1297 typedef struct DIMOUSESTATE2 {
1298   LONG lX;
1299   LONG lY;
1300   LONG lZ;
1301   BYTE rgbButtons[8];
1302 } DIMOUSESTATE2;
1303
1304 #define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
1305 #define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
1306 #define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
1307 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1308 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1309 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1310 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1311
1312 #ifdef __cplusplus
1313 extern "C" {
1314 #endif
1315 extern const DIDATAFORMAT c_dfDIMouse;
1316 extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
1317 extern const DIDATAFORMAT c_dfDIKeyboard;
1318 extern const DIDATAFORMAT c_dfDIJoystick;
1319 extern const DIDATAFORMAT c_dfDIJoystick2;
1320 #ifdef __cplusplus
1321 };
1322 #endif
1323
1324 /*****************************************************************************
1325  * IDirectInputA interface
1326  */
1327 #define ICOM_INTERFACE IDirectInputA
1328 #define IDirectInputA_METHODS \
1329     ICOM_METHOD3(HRESULT,CreateDevice,    REFGUID,rguid, LPDIRECTINPUTDEVICEA*,lplpDirectInputDevice, LPUNKNOWN,pUnkOuter) \
1330     ICOM_METHOD4(HRESULT,EnumDevices,     DWORD,dwDevType, LPDIENUMDEVICESCALLBACKA,lpCallback, LPVOID,pvRef, DWORD,dwFlags) \
1331     ICOM_METHOD1(HRESULT,GetDeviceStatus, REFGUID,rguidInstance) \
1332     ICOM_METHOD2(HRESULT,RunControlPanel, HWND,hwndOwner, DWORD,dwFlags) \
1333     ICOM_METHOD2(HRESULT,Initialize,      HINSTANCE,hinst, DWORD,dwVersion)
1334 #define IDirectInputA_IMETHODS \
1335     IUnknown_IMETHODS \
1336     IDirectInputA_METHODS
1337 ICOM_DEFINE(IDirectInputA,IUnknown)
1338 #undef ICOM_INTERFACE
1339
1340 /*** IUnknown methods ***/
1341 #define IDirectInputA_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1342 #define IDirectInputA_AddRef(p)             ICOM_CALL (AddRef,p)
1343 #define IDirectInputA_Release(p)            ICOM_CALL (Release,p)
1344         /*** IDirectInputA methods ***/
1345 #define IDirectInputA_CreateDevice(p,a,b,c)  ICOM_CALL3(CreateDevice,p,a,b,c)
1346 #define IDirectInputA_EnumDevices(p,a,b,c,d) ICOM_CALL4(EnumDevices,p,a,b,c,d)
1347 #define IDirectInputA_GetDeviceStatus(p,a)   ICOM_CALL1(GetDeviceStatus,p,a)
1348 #define IDirectInputA_RunControlPanel(p,a,b) ICOM_CALL2(RunControlPanel,p,a,b)
1349 #define IDirectInputA_Initialize(p,a,b)      ICOM_CALL2(Initialize,p,a,b)
1350
1351 /*****************************************************************************
1352  * IDirectInput2A interface
1353  */
1354 #define ICOM_INTERFACE IDirectInput2A
1355 #define IDirectInput2A_METHODS \
1356     ICOM_METHOD3(HRESULT,FindDevice,      REFGUID,rguid, LPCSTR,pszName, LPGUID,pguidInstance)
1357 #define IDirectInput2A_IMETHODS \
1358     IDirectInputA_IMETHODS \
1359     IDirectInput2A_METHODS
1360 ICOM_DEFINE(IDirectInput2A,IDirectInputA)
1361 #undef ICOM_INTERFACE
1362
1363 /*** IUnknown methods ***/
1364 #define IDirectInput2A_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1365 #define IDirectInput2A_AddRef(p)             ICOM_CALL (AddRef,p)
1366 #define IDirectInput2A_Release(p)            ICOM_CALL (Release,p)
1367         /*** IDirectInputA methods ***/
1368 #define IDirectInput2A_CreateDevice(p,a,b,c)  ICOM_CALL3(CreateDevice,p,a,b,c)
1369 #define IDirectInput2A_EnumDevices(p,a,b,c,d) ICOM_CALL4(EnumDevices,p,a,b,c,d)
1370 #define IDirectInput2A_GetDeviceStatus(p,a)   ICOM_CALL1(GetDeviceStatus,p,a)
1371 #define IDirectInput2A_RunControlPanel(p,a,b) ICOM_CALL2(RunControlPanel,p,a,b)
1372 #define IDirectInput2A_Initialize(p,a,b)      ICOM_CALL2(Initialize,p,a,b)
1373         /*** IDirectInput2A methods ***/
1374 #define IDirectInput2A_FindDevice(p,a,b,c)    ICOM_CALL3(FindDevice,p,a,b,c)
1375
1376 #if DIRECTINPUT_VERSION >= 0x0700
1377 /*****************************************************************************
1378  * IDirectInput7A interface
1379  */
1380 #define ICOM_INTERFACE IDirectInput7A
1381 #define IDirectInput7A_METHODS \
1382     ICOM_METHOD4(HRESULT,CreateDeviceEx,  REFGUID,rguid, REFIID,riid, LPVOID*,pvOut, LPUNKNOWN,lpUnknownOuter)
1383 #define IDirectInput7A_IMETHODS \
1384     IDirectInput2A_IMETHODS \
1385     IDirectInput7A_METHODS
1386 ICOM_DEFINE(IDirectInput7A,IDirectInput2A)
1387 #undef ICOM_INTERFACE
1388
1389 /*** IUnknown methods ***/
1390 #define IDirectInput7A_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1391 #define IDirectInput7A_AddRef(p)             ICOM_CALL (AddRef,p)
1392 #define IDirectInput7A_Release(p)            ICOM_CALL (Release,p)
1393         /*** IDirectInputA methods ***/
1394 #define IDirectInput7A_CreateDevice(p,a,b,c)  ICOM_CALL3(CreateDevice,p,a,b,c)
1395 #define IDirectInput7A_EnumDevices(p,a,b,c,d) ICOM_CALL4(EnumDevices,p,a,b,c,d)
1396 #define IDirectInput7A_GetDeviceStatus(p,a)   ICOM_CALL1(GetDeviceStatus,p,a)
1397 #define IDirectInput7A_RunControlPanel(p,a,b) ICOM_CALL2(RunControlPanel,p,a,b)
1398 #define IDirectInput7A_Initialize(p,a,b)      ICOM_CALL2(Initialize,p,a,b)
1399         /*** IDirectInput2A methods ***/
1400 #define IDirectInput7A_FindDevice(p,a,b,c)    ICOM_CALL3(FindDevice,p,a,b,c)
1401         /*** IDirectInput7A methods ***/
1402 #define IDirectInput7A_CreateDeviceEx(p,a,b,c,d) ICOM_CALL4(CreateDeviceEx,p,a,b,c,d)
1403 #endif /* DI7 */
1404
1405 #if DIRECTINPUT_VERSION >= 0x0800
1406 /*****************************************************************************
1407  * IDirectInput8A interface
1408  */
1409 #define ICOM_INTERFACE IDirectInput8A
1410 #define IDirectInput8A_METHODS \
1411     ICOM_METHOD3(HRESULT,CreateDevice,    REFGUID,rguid, LPDIRECTINPUTDEVICE8A*,lplpDirectInputDevice, LPUNKNOWN,pUnkOuter) \
1412     ICOM_METHOD4(HRESULT,EnumDevices,     DWORD,dwDevType, LPDIENUMDEVICESCALLBACKA,lpCallback, LPVOID,pvRef, DWORD,dwFlags) \
1413     ICOM_METHOD1(HRESULT,GetDeviceStatus, REFGUID,rguidInstance) \
1414     ICOM_METHOD2(HRESULT,RunControlPanel, HWND,hwndOwner, DWORD,dwFlags) \
1415     ICOM_METHOD2(HRESULT,Initialize,      HINSTANCE,hinst, DWORD,dwVersion) \
1416     ICOM_METHOD3(HRESULT,FindDevice,      REFGUID,rguid, LPCSTR,pszName, LPGUID,pguidInstance) \
1417     ICOM_METHOD5(HRESULT,EnumDevicesBySemantics, LPCSTR,ptszUserName, LPDIACTIONFORMATA,lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA,lpCallback, LPVOID,pvRef, DWORD,dwFlags) \
1418     ICOM_METHOD4(HRESULT,ConfigureDevices,LPDICONFIGUREDEVICESCALLBACK,lpdiCallback, LPDICONFIGUREDEVICESPARAMSA,lpdiCDParams, DWORD,dwFlags, LPVOID,pvRefData)
1419 #define IDirectInput8A_IMETHODS \
1420     IUnknown_IMETHODS \
1421     IDirectInput8A_METHODS
1422 ICOM_DEFINE(IDirectInput8A,IUnknown)
1423 #undef ICOM_INTERFACE
1424
1425 /*** IUnknown methods ***/
1426 #define IDirectInput8A_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1427 #define IDirectInput8A_AddRef(p)             ICOM_CALL (AddRef,p)
1428 #define IDirectInput8A_Release(p)            ICOM_CALL (Release,p)
1429       /*** IDirectInput8A methods ***/
1430 #define IDirectInput8A_CreateDevice(p,a,b,c)       ICOM_CALL3(CreateDevice,p,a,b,c)
1431 #define IDirectInput8A_EnumDevices(p,a,b,c,d)      ICOM_CALL4(EnumDevices,p,a,b,c,d)
1432 #define IDirectInput8A_GetDeviceStatus(p,a)        ICOM_CALL1(GetDeviceStatus,p,a)
1433 #define IDirectInput8A_RunControlPanel(p,a,b)      ICOM_CALL2(RunControlPanel,p,a,b)
1434 #define IDirectInput8A_Initialize(p,a,b)           ICOM_CALL2(Initialize,p,a,b)
1435 #define IDirectInput8A_FindDevice(p,a,b,c)         ICOM_CALL3(FindDevice,p,a,b,c)
1436 #define IDirectInput8A_EnumDevicesBySemantics(p,a,b,c,d,e) ICOM_CALL5(EnumDevicesBySemantics,p,a,b,c,d,e)
1437 #define IDirectInput8A_ConfigureDevices(p,a,b,c,d) ICOM_CALL4(ConfigureDevices,p,a,b,c,d)
1438 #endif /* DI8 */
1439
1440 /* Export functions */
1441
1442 #ifdef __cplusplus
1443 extern "C" {
1444 #endif
1445
1446 #if DIRECTINPUT_VERSION >= 0x0800
1447 HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
1448 #endif
1449
1450 HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
1451 HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
1452 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
1453
1454 HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
1455
1456 #ifdef __cplusplus
1457 };
1458 #endif
1459
1460 #endif /* __WINE_DINPUT_H */