comparison lib/legacy_dx/dinput.h @ 0:9c0607679772

init
author Ritor1
date Sat, 12 Jan 2013 09:45:18 +0600
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9c0607679772
1 /****************************************************************************
2 *
3 * Copyright (C) 1996-2000 Microsoft Corporation. All Rights Reserved.
4 *
5 * File: dinput.h
6 * Content: DirectInput include file
7 *
8 ****************************************************************************/
9
10 #ifndef __DINPUT_INCLUDED__
11 #define __DINPUT_INCLUDED__
12
13 #ifndef DIJ_RINGZERO
14
15 #ifdef _WIN32
16 #define COM_NO_WINDOWS_H
17 #include <objbase.h>
18 #endif
19
20 #endif /* DIJ_RINGZERO */
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26
27
28
29
30 /*
31 * To build applications for older versions of DirectInput
32 *
33 * #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]
34 *
35 * before #include <dinput.h>. By default, #include <dinput.h>
36 * will produce a DirectX 8-compatible header file.
37 *
38 */
39
40 #define DIRECTINPUT_HEADER_VERSION 0x0800
41 #ifndef DIRECTINPUT_VERSION
42 #define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
43 #pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
44 #endif
45
46 #ifndef DIJ_RINGZERO
47
48 /****************************************************************************
49 *
50 * Class IDs
51 *
52 ****************************************************************************/
53
54 DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
55 DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
56
57 DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
58 DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
59
60 /****************************************************************************
61 *
62 * Interfaces
63 *
64 ****************************************************************************/
65
66 DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
67 DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
68 DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
69 DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
70 DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
71 DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
72 DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
73 DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
74 DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
75 DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
76 DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
77 DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
78 DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
79 DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
80 DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
81 DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
82 DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
83
84 /****************************************************************************
85 *
86 * Predefined object types
87 *
88 ****************************************************************************/
89
90 DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
91 DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
92 DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
93 DEFINE_GUID(GUID_RxAxis, 0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
94 DEFINE_GUID(GUID_RyAxis, 0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
95 DEFINE_GUID(GUID_RzAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
96 DEFINE_GUID(GUID_Slider, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
97
98 DEFINE_GUID(GUID_Button, 0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
99 DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
100
101 DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
102
103 DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
104
105 /****************************************************************************
106 *
107 * Predefined product GUIDs
108 *
109 ****************************************************************************/
110
111 DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
112 DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
113 DEFINE_GUID(GUID_Joystick ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
114 DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
115 DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
116 DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
117 DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
118
119 /****************************************************************************
120 *
121 * Predefined force feedback effects
122 *
123 ****************************************************************************/
124
125 DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
126 DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
127 DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
128 DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
129 DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
130 DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
131 DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
132 DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
133 DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
134 DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
135 DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
136 DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
137
138 #endif /* DIJ_RINGZERO */
139
140 /****************************************************************************
141 *
142 * Interfaces and Structures...
143 *
144 ****************************************************************************/
145
146 #if(DIRECTINPUT_VERSION >= 0x0500)
147
148 /****************************************************************************
149 *
150 * IDirectInputEffect
151 *
152 ****************************************************************************/
153
154 #define DIEFT_ALL 0x00000000
155
156 #define DIEFT_CONSTANTFORCE 0x00000001
157 #define DIEFT_RAMPFORCE 0x00000002
158 #define DIEFT_PERIODIC 0x00000003
159 #define DIEFT_CONDITION 0x00000004
160 #define DIEFT_CUSTOMFORCE 0x00000005
161 #define DIEFT_HARDWARE 0x000000FF
162 #define DIEFT_FFATTACK 0x00000200
163 #define DIEFT_FFFADE 0x00000400
164 #define DIEFT_SATURATION 0x00000800
165 #define DIEFT_POSNEGCOEFFICIENTS 0x00001000
166 #define DIEFT_POSNEGSATURATION 0x00002000
167 #define DIEFT_DEADBAND 0x00004000
168 #define DIEFT_STARTDELAY 0x00008000
169 #define DIEFT_GETTYPE(n) LOBYTE(n)
170
171 #define DI_DEGREES 100
172 #define DI_FFNOMINALMAX 10000
173 #define DI_SECONDS 1000000
174
175 typedef struct DICONSTANTFORCE {
176 LONG lMagnitude;
177 } DICONSTANTFORCE, *LPDICONSTANTFORCE;
178 typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
179
180 typedef struct DIRAMPFORCE {
181 LONG lStart;
182 LONG lEnd;
183 } DIRAMPFORCE, *LPDIRAMPFORCE;
184 typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
185
186 typedef struct DIPERIODIC {
187 DWORD dwMagnitude;
188 LONG lOffset;
189 DWORD dwPhase;
190 DWORD dwPeriod;
191 } DIPERIODIC, *LPDIPERIODIC;
192 typedef const DIPERIODIC *LPCDIPERIODIC;
193
194 typedef struct DICONDITION {
195 LONG lOffset;
196 LONG lPositiveCoefficient;
197 LONG lNegativeCoefficient;
198 DWORD dwPositiveSaturation;
199 DWORD dwNegativeSaturation;
200 LONG lDeadBand;
201 } DICONDITION, *LPDICONDITION;
202 typedef const DICONDITION *LPCDICONDITION;
203
204 typedef struct DICUSTOMFORCE {
205 DWORD cChannels;
206 DWORD dwSamplePeriod;
207 DWORD cSamples;
208 LPLONG rglForceData;
209 } DICUSTOMFORCE, *LPDICUSTOMFORCE;
210 typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
211
212
213 typedef struct DIENVELOPE {
214 DWORD dwSize; /* sizeof(DIENVELOPE) */
215 DWORD dwAttackLevel;
216 DWORD dwAttackTime; /* Microseconds */
217 DWORD dwFadeLevel;
218 DWORD dwFadeTime; /* Microseconds */
219 } DIENVELOPE, *LPDIENVELOPE;
220 typedef const DIENVELOPE *LPCDIENVELOPE;
221
222
223 /* This structure is defined for DirectX 5.0 compatibility */
224 typedef struct DIEFFECT_DX5 {
225 DWORD dwSize; /* sizeof(DIEFFECT_DX5) */
226 DWORD dwFlags; /* DIEFF_* */
227 DWORD dwDuration; /* Microseconds */
228 DWORD dwSamplePeriod; /* Microseconds */
229 DWORD dwGain;
230 DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */
231 DWORD dwTriggerRepeatInterval; /* Microseconds */
232 DWORD cAxes; /* Number of axes */
233 LPDWORD rgdwAxes; /* Array of axes */
234 LPLONG rglDirection; /* Array of directions */
235 LPDIENVELOPE lpEnvelope; /* Optional */
236 DWORD cbTypeSpecificParams; /* Size of params */
237 LPVOID lpvTypeSpecificParams; /* Pointer to params */
238 } DIEFFECT_DX5, *LPDIEFFECT_DX5;
239 typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
240
241 typedef struct DIEFFECT {
242 DWORD dwSize; /* sizeof(DIEFFECT) */
243 DWORD dwFlags; /* DIEFF_* */
244 DWORD dwDuration; /* Microseconds */
245 DWORD dwSamplePeriod; /* Microseconds */
246 DWORD dwGain;
247 DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */
248 DWORD dwTriggerRepeatInterval; /* Microseconds */
249 DWORD cAxes; /* Number of axes */
250 LPDWORD rgdwAxes; /* Array of axes */
251 LPLONG rglDirection; /* Array of directions */
252 LPDIENVELOPE lpEnvelope; /* Optional */
253 DWORD cbTypeSpecificParams; /* Size of params */
254 LPVOID lpvTypeSpecificParams; /* Pointer to params */
255 #if(DIRECTINPUT_VERSION >= 0x0600)
256 DWORD dwStartDelay; /* Microseconds */
257 #endif /* DIRECTINPUT_VERSION >= 0x0600 */
258 } DIEFFECT, *LPDIEFFECT;
259 typedef DIEFFECT DIEFFECT_DX6;
260 typedef LPDIEFFECT LPDIEFFECT_DX6;
261 typedef const DIEFFECT *LPCDIEFFECT;
262
263
264 #if(DIRECTINPUT_VERSION >= 0x0700)
265 #ifndef DIJ_RINGZERO
266 typedef struct DIFILEEFFECT{
267 DWORD dwSize;
268 GUID GuidEffect;
269 LPCDIEFFECT lpDiEffect;
270 CHAR szFriendlyName[MAX_PATH];
271 }DIFILEEFFECT, *LPDIFILEEFFECT;
272 typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
273 typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
274 #endif /* DIJ_RINGZERO */
275 #endif /* DIRECTINPUT_VERSION >= 0x0700 */
276
277 #define DIEFF_OBJECTIDS 0x00000001
278 #define DIEFF_OBJECTOFFSETS 0x00000002
279 #define DIEFF_CARTESIAN 0x00000010
280 #define DIEFF_POLAR 0x00000020
281 #define DIEFF_SPHERICAL 0x00000040
282
283 #define DIEP_DURATION 0x00000001
284 #define DIEP_SAMPLEPERIOD 0x00000002
285 #define DIEP_GAIN 0x00000004
286 #define DIEP_TRIGGERBUTTON 0x00000008
287 #define DIEP_TRIGGERREPEATINTERVAL 0x00000010
288 #define DIEP_AXES 0x00000020
289 #define DIEP_DIRECTION 0x00000040
290 #define DIEP_ENVELOPE 0x00000080
291 #define DIEP_TYPESPECIFICPARAMS 0x00000100
292 #if(DIRECTINPUT_VERSION >= 0x0600)
293 #define DIEP_STARTDELAY 0x00000200
294 #define DIEP_ALLPARAMS_DX5 0x000001FF
295 #define DIEP_ALLPARAMS 0x000003FF
296 #else /* DIRECTINPUT_VERSION < 0x0600 */
297 #define DIEP_ALLPARAMS 0x000001FF
298 #endif /* DIRECTINPUT_VERSION < 0x0600 */
299 #define DIEP_START 0x20000000
300 #define DIEP_NORESTART 0x40000000
301 #define DIEP_NODOWNLOAD 0x80000000
302 #define DIEB_NOTRIGGER 0xFFFFFFFF
303
304 #define DIES_SOLO 0x00000001
305 #define DIES_NODOWNLOAD 0x80000000
306
307 #define DIEGES_PLAYING 0x00000001
308 #define DIEGES_EMULATED 0x00000002
309
310 typedef struct DIEFFESCAPE {
311 DWORD dwSize;
312 DWORD dwCommand;
313 LPVOID lpvInBuffer;
314 DWORD cbInBuffer;
315 LPVOID lpvOutBuffer;
316 DWORD cbOutBuffer;
317 } DIEFFESCAPE, *LPDIEFFESCAPE;
318
319 #ifndef DIJ_RINGZERO
320
321 #undef INTERFACE
322 #define INTERFACE IDirectInputEffect
323
324 DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
325 {
326 /*** IUnknown methods ***/
327 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
328 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
329 STDMETHOD_(ULONG,Release)(THIS) PURE;
330
331 /*** IDirectInputEffect methods ***/
332 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
333 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
334 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE;
335 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE;
336 STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE;
337 STDMETHOD(Stop)(THIS) PURE;
338 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
339 STDMETHOD(Download)(THIS) PURE;
340 STDMETHOD(Unload)(THIS) PURE;
341 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
342 };
343
344 typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
345
346 #if !defined(__cplusplus) || defined(CINTERFACE)
347 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
348 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
349 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
350 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
351 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
352 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
353 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
354 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
355 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
356 #define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
357 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
358 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
359 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
360 #else
361 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
362 #define IDirectInputEffect_AddRef(p) (p)->AddRef()
363 #define IDirectInputEffect_Release(p) (p)->Release()
364 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
365 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
366 #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
367 #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
368 #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
369 #define IDirectInputEffect_Stop(p) (p)->Stop()
370 #define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
371 #define IDirectInputEffect_Download(p) (p)->Download()
372 #define IDirectInputEffect_Unload(p) (p)->Unload()
373 #define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
374 #endif
375
376 #endif /* DIJ_RINGZERO */
377
378 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
379
380 /****************************************************************************
381 *
382 * IDirectInputDevice
383 *
384 ****************************************************************************/
385
386 #if DIRECTINPUT_VERSION <= 0x700
387 #define DIDEVTYPE_DEVICE 1
388 #define DIDEVTYPE_MOUSE 2
389 #define DIDEVTYPE_KEYBOARD 3
390 #define DIDEVTYPE_JOYSTICK 4
391
392 #else
393 #define DI8DEVCLASS_ALL 0
394 #define DI8DEVCLASS_DEVICE 1
395 #define DI8DEVCLASS_POINTER 2
396 #define DI8DEVCLASS_KEYBOARD 3
397 #define DI8DEVCLASS_GAMECTRL 4
398
399 #define DI8DEVTYPE_DEVICE 0x11
400 #define DI8DEVTYPE_MOUSE 0x12
401 #define DI8DEVTYPE_KEYBOARD 0x13
402 #define DI8DEVTYPE_JOYSTICK 0x14
403 #define DI8DEVTYPE_GAMEPAD 0x15
404 #define DI8DEVTYPE_DRIVING 0x16
405 #define DI8DEVTYPE_FLIGHT 0x17
406 #define DI8DEVTYPE_1STPERSON 0x18
407 #define DI8DEVTYPE_DEVICECTRL 0x19
408 #define DI8DEVTYPE_SCREENPOINTER 0x1A
409 #define DI8DEVTYPE_REMOTE 0x1B
410 #define DI8DEVTYPE_SUPPLEMENTAL 0x1C
411 #endif /* DIRECTINPUT_VERSION <= 0x700 */
412
413 #define DIDEVTYPE_HID 0x00010000
414
415 #if DIRECTINPUT_VERSION <= 0x700
416 #define DIDEVTYPEMOUSE_UNKNOWN 1
417 #define DIDEVTYPEMOUSE_TRADITIONAL 2
418 #define DIDEVTYPEMOUSE_FINGERSTICK 3
419 #define DIDEVTYPEMOUSE_TOUCHPAD 4
420 #define DIDEVTYPEMOUSE_TRACKBALL 5
421
422 #define DIDEVTYPEKEYBOARD_UNKNOWN 0
423 #define DIDEVTYPEKEYBOARD_PCXT 1
424 #define DIDEVTYPEKEYBOARD_OLIVETTI 2
425 #define DIDEVTYPEKEYBOARD_PCAT 3
426 #define DIDEVTYPEKEYBOARD_PCENH 4
427 #define DIDEVTYPEKEYBOARD_NOKIA1050 5
428 #define DIDEVTYPEKEYBOARD_NOKIA9140 6
429 #define DIDEVTYPEKEYBOARD_NEC98 7
430 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
431 #define DIDEVTYPEKEYBOARD_NEC98106 9
432 #define DIDEVTYPEKEYBOARD_JAPAN106 10
433 #define DIDEVTYPEKEYBOARD_JAPANAX 11
434 #define DIDEVTYPEKEYBOARD_J3100 12
435
436 #define DIDEVTYPEJOYSTICK_UNKNOWN 1
437 #define DIDEVTYPEJOYSTICK_TRADITIONAL 2
438 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
439 #define DIDEVTYPEJOYSTICK_GAMEPAD 4
440 #define DIDEVTYPEJOYSTICK_RUDDER 5
441 #define DIDEVTYPEJOYSTICK_WHEEL 6
442 #define DIDEVTYPEJOYSTICK_HEADTRACKER 7
443
444 #else
445 #define DI8DEVTYPEMOUSE_UNKNOWN 1
446 #define DI8DEVTYPEMOUSE_TRADITIONAL 2
447 #define DI8DEVTYPEMOUSE_FINGERSTICK 3
448 #define DI8DEVTYPEMOUSE_TOUCHPAD 4
449 #define DI8DEVTYPEMOUSE_TRACKBALL 5
450 #define DI8DEVTYPEMOUSE_ABSOLUTE 6
451
452 #define DI8DEVTYPEKEYBOARD_UNKNOWN 0
453 #define DI8DEVTYPEKEYBOARD_PCXT 1
454 #define DI8DEVTYPEKEYBOARD_OLIVETTI 2
455 #define DI8DEVTYPEKEYBOARD_PCAT 3
456 #define DI8DEVTYPEKEYBOARD_PCENH 4
457 #define DI8DEVTYPEKEYBOARD_NOKIA1050 5
458 #define DI8DEVTYPEKEYBOARD_NOKIA9140 6
459 #define DI8DEVTYPEKEYBOARD_NEC98 7
460 #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
461 #define DI8DEVTYPEKEYBOARD_NEC98106 9
462 #define DI8DEVTYPEKEYBOARD_JAPAN106 10
463 #define DI8DEVTYPEKEYBOARD_JAPANAX 11
464 #define DI8DEVTYPEKEYBOARD_J3100 12
465
466 #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
467
468 #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
469 #define DI8DEVTYPEJOYSTICK_STANDARD 2
470
471 #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
472 #define DI8DEVTYPEGAMEPAD_STANDARD 2
473 #define DI8DEVTYPEGAMEPAD_TILT 3
474
475 #define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
476 #define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
477 #define DI8DEVTYPEDRIVING_DUALPEDALS 3
478 #define DI8DEVTYPEDRIVING_THREEPEDALS 4
479 #define DI8DEVTYPEDRIVING_HANDHELD 5
480
481 #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
482 #define DI8DEVTYPEFLIGHT_STICK 2
483 #define DI8DEVTYPEFLIGHT_YOKE 3
484 #define DI8DEVTYPEFLIGHT_RC 4
485
486 #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
487 #define DI8DEVTYPE1STPERSON_UNKNOWN 2
488 #define DI8DEVTYPE1STPERSON_SIXDOF 3
489 #define DI8DEVTYPE1STPERSON_SHOOTER 4
490
491 #define DI8DEVTYPESCREENPTR_UNKNOWN 2
492 #define DI8DEVTYPESCREENPTR_LIGHTGUN 3
493 #define DI8DEVTYPESCREENPTR_LIGHTPEN 4
494 #define DI8DEVTYPESCREENPTR_TOUCH 5
495
496 #define DI8DEVTYPEREMOTE_UNKNOWN 2
497
498 #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
499 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
500 #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
501
502 #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
503 #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
504 #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
505 #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
506 #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
507 #define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
508 #define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
509 #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
510 #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
511 #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
512 #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
513 #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
514 #endif /* DIRECTINPUT_VERSION <= 0x700 */
515
516 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
517 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
518
519 #if(DIRECTINPUT_VERSION >= 0x0500)
520 /* This structure is defined for DirectX 3.0 compatibility */
521 typedef struct DIDEVCAPS_DX3 {
522 DWORD dwSize;
523 DWORD dwFlags;
524 DWORD dwDevType;
525 DWORD dwAxes;
526 DWORD dwButtons;
527 DWORD dwPOVs;
528 } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
529 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
530
531 typedef struct DIDEVCAPS {
532 DWORD dwSize;
533 DWORD dwFlags;
534 DWORD dwDevType;
535 DWORD dwAxes;
536 DWORD dwButtons;
537 DWORD dwPOVs;
538 #if(DIRECTINPUT_VERSION >= 0x0500)
539 DWORD dwFFSamplePeriod;
540 DWORD dwFFMinTimeResolution;
541 DWORD dwFirmwareRevision;
542 DWORD dwHardwareRevision;
543 DWORD dwFFDriverVersion;
544 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
545 } DIDEVCAPS, *LPDIDEVCAPS;
546
547 #define DIDC_ATTACHED 0x00000001
548 #define DIDC_POLLEDDEVICE 0x00000002
549 #define DIDC_EMULATED 0x00000004
550 #define DIDC_POLLEDDATAFORMAT 0x00000008
551 #if(DIRECTINPUT_VERSION >= 0x0500)
552 #define DIDC_FORCEFEEDBACK 0x00000100
553 #define DIDC_FFATTACK 0x00000200
554 #define DIDC_FFFADE 0x00000400
555 #define DIDC_SATURATION 0x00000800
556 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
557 #define DIDC_POSNEGSATURATION 0x00002000
558 #define DIDC_DEADBAND 0x00004000
559 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
560 #define DIDC_STARTDELAY 0x00008000
561 #if(DIRECTINPUT_VERSION >= 0x050a)
562 #define DIDC_ALIAS 0x00010000
563 #define DIDC_PHANTOM 0x00020000
564 #endif /* DIRECTINPUT_VERSION >= 0x050a */
565 #if(DIRECTINPUT_VERSION >= 0x0800)
566 #define DIDC_HIDDEN 0x00040000
567 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
568
569 #define DIDFT_ALL 0x00000000
570
571 #define DIDFT_RELAXIS 0x00000001
572 #define DIDFT_ABSAXIS 0x00000002
573 #define DIDFT_AXIS 0x00000003
574
575 #define DIDFT_PSHBUTTON 0x00000004
576 #define DIDFT_TGLBUTTON 0x00000008
577 #define DIDFT_BUTTON 0x0000000C
578
579 #define DIDFT_POV 0x00000010
580 #define DIDFT_COLLECTION 0x00000040
581 #define DIDFT_NODATA 0x00000080
582
583 #define DIDFT_ANYINSTANCE 0x00FFFF00
584 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
585 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
586 #define DIDFT_GETTYPE(n) LOBYTE(n)
587 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
588 #define DIDFT_FFACTUATOR 0x01000000
589 #define DIDFT_FFEFFECTTRIGGER 0x02000000
590 #if(DIRECTINPUT_VERSION >= 0x050a)
591 #define DIDFT_OUTPUT 0x10000000
592 #define DIDFT_VENDORDEFINED 0x04000000
593 #define DIDFT_ALIAS 0x08000000
594 #endif /* DIRECTINPUT_VERSION >= 0x050a */
595 #ifndef DIDFT_OPTIONAL
596 #define DIDFT_OPTIONAL 0x80000000
597 #endif
598
599 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
600 #define DIDFT_NOCOLLECTION 0x00FFFF00
601
602 #ifndef DIJ_RINGZERO
603
604 typedef struct _DIOBJECTDATAFORMAT {
605 const GUID *pguid;
606 DWORD dwOfs;
607 DWORD dwType;
608 DWORD dwFlags;
609 } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
610 typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
611
612 typedef struct _DIDATAFORMAT {
613 DWORD dwSize;
614 DWORD dwObjSize;
615 DWORD dwFlags;
616 DWORD dwDataSize;
617 DWORD dwNumObjs;
618 LPDIOBJECTDATAFORMAT rgodf;
619 } DIDATAFORMAT, *LPDIDATAFORMAT;
620 typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
621
622 #define DIDF_ABSAXIS 0x00000001
623 #define DIDF_RELAXIS 0x00000002
624
625 #ifdef __cplusplus
626 extern "C" {
627 #endif
628 extern const DIDATAFORMAT c_dfDIMouse;
629
630 #if(DIRECTINPUT_VERSION >= 0x0700)
631 extern const DIDATAFORMAT c_dfDIMouse2;
632 #endif /* DIRECTINPUT_VERSION >= 0x0700 */
633
634 extern const DIDATAFORMAT c_dfDIKeyboard;
635
636 #if(DIRECTINPUT_VERSION >= 0x0500)
637 extern const DIDATAFORMAT c_dfDIJoystick;
638 extern const DIDATAFORMAT c_dfDIJoystick2;
639 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
640
641 #ifdef __cplusplus
642 };
643 #endif
644
645
646 #if DIRECTINPUT_VERSION > 0x0700
647
648 typedef struct _DIACTIONA {
649 UINT_PTR uAppData;
650 DWORD dwSemantic;
651 OPTIONAL DWORD dwFlags;
652 OPTIONAL union {
653 LPCSTR lptszActionName;
654 UINT uResIdString;
655 };
656 OPTIONAL GUID guidInstance;
657 OPTIONAL DWORD dwObjID;
658 OPTIONAL DWORD dwHow;
659 } DIACTIONA, *LPDIACTIONA ;
660 typedef struct _DIACTIONW {
661 UINT_PTR uAppData;
662 DWORD dwSemantic;
663 OPTIONAL DWORD dwFlags;
664 OPTIONAL union {
665 LPCWSTR lptszActionName;
666 UINT uResIdString;
667 };
668 OPTIONAL GUID guidInstance;
669 OPTIONAL DWORD dwObjID;
670 OPTIONAL DWORD dwHow;
671 } DIACTIONW, *LPDIACTIONW ;
672 #ifdef UNICODE
673 typedef DIACTIONW DIACTION;
674 typedef LPDIACTIONW LPDIACTION;
675 #else
676 typedef DIACTIONA DIACTION;
677 typedef LPDIACTIONA LPDIACTION;
678 #endif // UNICODE
679
680 typedef const DIACTIONA *LPCDIACTIONA;
681 typedef const DIACTIONW *LPCDIACTIONW;
682 #ifdef UNICODE
683 typedef DIACTIONW DIACTION;
684 typedef LPCDIACTIONW LPCDIACTION;
685 #else
686 typedef DIACTIONA DIACTION;
687 typedef LPCDIACTIONA LPCDIACTION;
688 #endif // UNICODE
689 typedef const DIACTION *LPCDIACTION;
690
691
692 #define DIA_FORCEFEEDBACK 0x00000001
693 #define DIA_APPMAPPED 0x00000002
694 #define DIA_APPNOMAP 0x00000004
695 #define DIA_NORANGE 0x00000008
696 #define DIA_APPFIXED 0x00000010
697
698 #define DIAH_UNMAPPED 0x00000000
699 #define DIAH_USERCONFIG 0x00000001
700 #define DIAH_APPREQUESTED 0x00000002
701 #define DIAH_HWAPP 0x00000004
702 #define DIAH_HWDEFAULT 0x00000008
703 #define DIAH_DEFAULT 0x00000020
704 #define DIAH_ERROR 0x80000000
705
706 typedef struct _DIACTIONFORMATA {
707 DWORD dwSize;
708 DWORD dwActionSize;
709 DWORD dwDataSize;
710 DWORD dwNumActions;
711 LPDIACTIONA rgoAction;
712 GUID guidActionMap;
713 DWORD dwGenre;
714 DWORD dwBufferSize;
715 OPTIONAL LONG lAxisMin;
716 OPTIONAL LONG lAxisMax;
717 OPTIONAL HINSTANCE hInstString;
718 FILETIME ftTimeStamp;
719 DWORD dwCRC;
720 CHAR tszActionMap[MAX_PATH];
721 } DIACTIONFORMATA, *LPDIACTIONFORMATA;
722 typedef struct _DIACTIONFORMATW {
723 DWORD dwSize;
724 DWORD dwActionSize;
725 DWORD dwDataSize;
726 DWORD dwNumActions;
727 LPDIACTIONW rgoAction;
728 GUID guidActionMap;
729 DWORD dwGenre;
730 DWORD dwBufferSize;
731 OPTIONAL LONG lAxisMin;
732 OPTIONAL LONG lAxisMax;
733 OPTIONAL HINSTANCE hInstString;
734 FILETIME ftTimeStamp;
735 DWORD dwCRC;
736 WCHAR tszActionMap[MAX_PATH];
737 } DIACTIONFORMATW, *LPDIACTIONFORMATW;
738 #ifdef UNICODE
739 typedef DIACTIONFORMATW DIACTIONFORMAT;
740 typedef LPDIACTIONFORMATW LPDIACTIONFORMAT;
741 #else
742 typedef DIACTIONFORMATA DIACTIONFORMAT;
743 typedef LPDIACTIONFORMATA LPDIACTIONFORMAT;
744 #endif // UNICODE
745 typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
746 typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
747 #ifdef UNICODE
748 typedef DIACTIONFORMATW DIACTIONFORMAT;
749 typedef LPCDIACTIONFORMATW LPCDIACTIONFORMAT;
750 #else
751 typedef DIACTIONFORMATA DIACTIONFORMAT;
752 typedef LPCDIACTIONFORMATA LPCDIACTIONFORMAT;
753 #endif // UNICODE
754 typedef const DIACTIONFORMAT *LPCDIACTIONFORMAT;
755
756 #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
757 #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
758 #define DIAFTS_UNUSEDDEVICELOW 0x00000000
759 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
760
761 #define DIDBAM_DEFAULT 0x00000000
762 #define DIDBAM_PRESERVE 0x00000001
763 #define DIDBAM_INITIALIZE 0x00000002
764 #define DIDBAM_HWDEFAULTS 0x00000004
765
766 #define DIDSAM_DEFAULT 0x00000000
767 #define DIDSAM_NOUSER 0x00000001
768 #define DIDSAM_FORCESAVE 0x00000002
769
770 #define DICD_DEFAULT 0x00000000
771 #define DICD_EDIT 0x00000001
772
773 /*
774 * The following definition is normally defined in d3dtypes.h
775 */
776 #ifndef D3DCOLOR_DEFINED
777 typedef DWORD D3DCOLOR;
778 #define D3DCOLOR_DEFINED
779 #endif
780
781 typedef struct _DICOLORSET{
782 DWORD dwSize;
783 D3DCOLOR cTextFore;
784 D3DCOLOR cTextHighlight;
785 D3DCOLOR cCalloutLine;
786 D3DCOLOR cCalloutHighlight;
787 D3DCOLOR cBorder;
788 D3DCOLOR cControlFill;
789 D3DCOLOR cHighlightFill;
790 D3DCOLOR cAreaFill;
791 } DICOLORSET, *LPDICOLORSET;
792 typedef const DICOLORSET *LPCDICOLORSET;
793
794
795 typedef struct _DICONFIGUREDEVICESPARAMSA{
796 DWORD dwSize;
797 DWORD dwcUsers;
798 LPSTR lptszUserNames;
799 DWORD dwcFormats;
800 LPDIACTIONFORMATA lprgFormats;
801 HWND hwnd;
802 DICOLORSET dics;
803 IUnknown FAR * lpUnkDDSTarget;
804 } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
805 typedef struct _DICONFIGUREDEVICESPARAMSW{
806 DWORD dwSize;
807 DWORD dwcUsers;
808 LPWSTR lptszUserNames;
809 DWORD dwcFormats;
810 LPDIACTIONFORMATW lprgFormats;
811 HWND hwnd;
812 DICOLORSET dics;
813 IUnknown FAR * lpUnkDDSTarget;
814 } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
815 #ifdef UNICODE
816 typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
817 typedef LPDICONFIGUREDEVICESPARAMSW LPDICONFIGUREDEVICESPARAMS;
818 #else
819 typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
820 typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS;
821 #endif // UNICODE
822 typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
823 typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
824 #ifdef UNICODE
825 typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
826 typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS;
827 #else
828 typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
829 typedef LPCDICONFIGUREDEVICESPARAMSA LPCDICONFIGUREDEVICESPARAMS;
830 #endif // UNICODE
831 typedef const DICONFIGUREDEVICESPARAMS *LPCDICONFIGUREDEVICESPARAMS;
832
833
834 #define DIDIFT_CONFIGURATION 0x00000001
835 #define DIDIFT_OVERLAY 0x00000002
836
837 #define DIDAL_CENTERED 0x00000000
838 #define DIDAL_LEFTALIGNED 0x00000001
839 #define DIDAL_RIGHTALIGNED 0x00000002
840 #define DIDAL_MIDDLE 0x00000000
841 #define DIDAL_TOPALIGNED 0x00000004
842 #define DIDAL_BOTTOMALIGNED 0x00000008
843
844 typedef struct _DIDEVICEIMAGEINFOA {
845 CHAR tszImagePath[MAX_PATH];
846 DWORD dwFlags;
847 // These are valid if DIDIFT_OVERLAY is present in dwFlags.
848 DWORD dwViewID;
849 RECT rcOverlay;
850 DWORD dwObjID;
851 DWORD dwcValidPts;
852 POINT rgptCalloutLine[5];
853 RECT rcCalloutRect;
854 DWORD dwTextAlign;
855 } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
856 typedef struct _DIDEVICEIMAGEINFOW {
857 WCHAR tszImagePath[MAX_PATH];
858 DWORD dwFlags;
859 // These are valid if DIDIFT_OVERLAY is present in dwFlags.
860 DWORD dwViewID;
861 RECT rcOverlay;
862 DWORD dwObjID;
863 DWORD dwcValidPts;
864 POINT rgptCalloutLine[5];
865 RECT rcCalloutRect;
866 DWORD dwTextAlign;
867 } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
868 #ifdef UNICODE
869 typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
870 typedef LPDIDEVICEIMAGEINFOW LPDIDEVICEIMAGEINFO;
871 #else
872 typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
873 typedef LPDIDEVICEIMAGEINFOA LPDIDEVICEIMAGEINFO;
874 #endif // UNICODE
875 typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
876 typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
877 #ifdef UNICODE
878 typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
879 typedef LPCDIDEVICEIMAGEINFOW LPCDIDEVICEIMAGEINFO;
880 #else
881 typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
882 typedef LPCDIDEVICEIMAGEINFOA LPCDIDEVICEIMAGEINFO;
883 #endif // UNICODE
884 typedef const DIDEVICEIMAGEINFO *LPCDIDEVICEIMAGEINFO;
885
886 typedef struct _DIDEVICEIMAGEINFOHEADERA {
887 DWORD dwSize;
888 DWORD dwSizeImageInfo;
889 DWORD dwcViews;
890 DWORD dwcButtons;
891 DWORD dwcAxes;
892 DWORD dwcPOVs;
893 DWORD dwBufferSize;
894 DWORD dwBufferUsed;
895 LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
896 } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
897 typedef struct _DIDEVICEIMAGEINFOHEADERW {
898 DWORD dwSize;
899 DWORD dwSizeImageInfo;
900 DWORD dwcViews;
901 DWORD dwcButtons;
902 DWORD dwcAxes;
903 DWORD dwcPOVs;
904 DWORD dwBufferSize;
905 DWORD dwBufferUsed;
906 LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
907 } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
908 #ifdef UNICODE
909 typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
910 typedef LPDIDEVICEIMAGEINFOHEADERW LPDIDEVICEIMAGEINFOHEADER;
911 #else
912 typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
913 typedef LPDIDEVICEIMAGEINFOHEADERA LPDIDEVICEIMAGEINFOHEADER;
914 #endif // UNICODE
915 typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
916 typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
917 #ifdef UNICODE
918 typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
919 typedef LPCDIDEVICEIMAGEINFOHEADERW LPCDIDEVICEIMAGEINFOHEADER;
920 #else
921 typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
922 typedef LPCDIDEVICEIMAGEINFOHEADERA LPCDIDEVICEIMAGEINFOHEADER;
923 #endif // UNICODE
924 typedef const DIDEVICEIMAGEINFOHEADER *LPCDIDEVICEIMAGEINFOHEADER;
925
926 #endif /* DIRECTINPUT_VERSION > 0x0700 */
927
928 #if(DIRECTINPUT_VERSION >= 0x0500)
929 /* These structures are defined for DirectX 3.0 compatibility */
930
931 typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
932 DWORD dwSize;
933 GUID guidType;
934 DWORD dwOfs;
935 DWORD dwType;
936 DWORD dwFlags;
937 CHAR tszName[MAX_PATH];
938 } DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
939 typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
940 DWORD dwSize;
941 GUID guidType;
942 DWORD dwOfs;
943 DWORD dwType;
944 DWORD dwFlags;
945 WCHAR tszName[MAX_PATH];
946 } DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
947 #ifdef UNICODE
948 typedef DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3;
949 typedef LPDIDEVICEOBJECTINSTANCE_DX3W LPDIDEVICEOBJECTINSTANCE_DX3;
950 #else
951 typedef DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3;
952 typedef LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3;
953 #endif // UNICODE
954 typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
955 typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
956 typedef const DIDEVICEOBJECTINSTANCE_DX3 *LPCDIDEVICEOBJECTINSTANCE_DX3;
957 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
958
959 typedef struct DIDEVICEOBJECTINSTANCEA {
960 DWORD dwSize;
961 GUID guidType;
962 DWORD dwOfs;
963 DWORD dwType;
964 DWORD dwFlags;
965 CHAR tszName[MAX_PATH];
966 #if(DIRECTINPUT_VERSION >= 0x0500)
967 DWORD dwFFMaxForce;
968 DWORD dwFFForceResolution;
969 WORD wCollectionNumber;
970 WORD wDesignatorIndex;
971 WORD wUsagePage;
972 WORD wUsage;
973 DWORD dwDimension;
974 WORD wExponent;
975 WORD wReportId;
976 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
977 } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
978 typedef struct DIDEVICEOBJECTINSTANCEW {
979 DWORD dwSize;
980 GUID guidType;
981 DWORD dwOfs;
982 DWORD dwType;
983 DWORD dwFlags;
984 WCHAR tszName[MAX_PATH];
985 #if(DIRECTINPUT_VERSION >= 0x0500)
986 DWORD dwFFMaxForce;
987 DWORD dwFFForceResolution;
988 WORD wCollectionNumber;
989 WORD wDesignatorIndex;
990 WORD wUsagePage;
991 WORD wUsage;
992 DWORD dwDimension;
993 WORD wExponent;
994 WORD wReportId;
995 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
996 } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
997 #ifdef UNICODE
998 typedef DIDEVICEOBJECTINSTANCEW DIDEVICEOBJECTINSTANCE;
999 typedef LPDIDEVICEOBJECTINSTANCEW LPDIDEVICEOBJECTINSTANCE;
1000 #else
1001 typedef DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCE;
1002 typedef LPDIDEVICEOBJECTINSTANCEA LPDIDEVICEOBJECTINSTANCE;
1003 #endif // UNICODE
1004 typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
1005 typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
1006 typedef const DIDEVICEOBJECTINSTANCE *LPCDIDEVICEOBJECTINSTANCE;
1007
1008 typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
1009 typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW, LPVOID);
1010 #ifdef UNICODE
1011 #define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKW
1012 #else
1013 #define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKA
1014 #endif // !UNICODE
1015
1016 #if(DIRECTINPUT_VERSION >= 0x0500)
1017 #define DIDOI_FFACTUATOR 0x00000001
1018 #define DIDOI_FFEFFECTTRIGGER 0x00000002
1019 #define DIDOI_POLLED 0x00008000
1020 #define DIDOI_ASPECTPOSITION 0x00000100
1021 #define DIDOI_ASPECTVELOCITY 0x00000200
1022 #define DIDOI_ASPECTACCEL 0x00000300
1023 #define DIDOI_ASPECTFORCE 0x00000400
1024 #define DIDOI_ASPECTMASK 0x00000F00
1025 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
1026 #if(DIRECTINPUT_VERSION >= 0x050a)
1027 #define DIDOI_GUIDISUSAGE 0x00010000
1028 #endif /* DIRECTINPUT_VERSION >= 0x050a */
1029
1030 typedef struct DIPROPHEADER {
1031 DWORD dwSize;
1032 DWORD dwHeaderSize;
1033 DWORD dwObj;
1034 DWORD dwHow;
1035 } DIPROPHEADER, *LPDIPROPHEADER;
1036 typedef const DIPROPHEADER *LPCDIPROPHEADER;
1037
1038 #define DIPH_DEVICE 0
1039 #define DIPH_BYOFFSET 1
1040 #define DIPH_BYID 2
1041 #if(DIRECTINPUT_VERSION >= 0x050a)
1042 #define DIPH_BYUSAGE 3
1043 #endif /* DIRECTINPUT_VERSION >= 0x050a */
1044
1045 #if(DIRECTINPUT_VERSION >= 0x050a)
1046 #define DIMAKEUSAGEDWORD(UsagePage, Usage) \
1047 (DWORD)MAKELONG(Usage, UsagePage)
1048 #endif /* DIRECTINPUT_VERSION >= 0x050a */
1049
1050 typedef struct DIPROPDWORD {
1051 DIPROPHEADER diph;
1052 DWORD dwData;
1053 } DIPROPDWORD, *LPDIPROPDWORD;
1054 typedef const DIPROPDWORD *LPCDIPROPDWORD;
1055
1056 #if(DIRECTINPUT_VERSION >= 0x0800)
1057 typedef struct DIPROPPOINTER {
1058 DIPROPHEADER diph;
1059 UINT_PTR uData;
1060 } DIPROPPOINTER, *LPDIPROPPOINTER;
1061 typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
1062 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
1063
1064 typedef struct DIPROPRANGE {
1065 DIPROPHEADER diph;
1066 LONG lMin;
1067 LONG lMax;
1068 } DIPROPRANGE, *LPDIPROPRANGE;
1069 typedef const DIPROPRANGE *LPCDIPROPRANGE;
1070
1071 #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
1072 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
1073
1074 #if(DIRECTINPUT_VERSION >= 0x050a)
1075 typedef struct DIPROPCAL {
1076 DIPROPHEADER diph;
1077 LONG lMin;
1078 LONG lCenter;
1079 LONG lMax;
1080 } DIPROPCAL, *LPDIPROPCAL;
1081 typedef const DIPROPCAL *LPCDIPROPCAL;
1082
1083 typedef struct DIPROPCALPOV {
1084 DIPROPHEADER diph;
1085 LONG lMin[5];
1086 LONG lMax[5];
1087 } DIPROPCALPOV, *LPDIPROPCALPOV;
1088 typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
1089
1090 typedef struct DIPROPGUIDANDPATH {
1091 DIPROPHEADER diph;
1092 GUID guidClass;
1093 WCHAR wszPath[MAX_PATH];
1094 } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
1095 typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
1096
1097 typedef struct DIPROPSTRING {
1098 DIPROPHEADER diph;
1099 WCHAR wsz[MAX_PATH];
1100 } DIPROPSTRING, *LPDIPROPSTRING;
1101 typedef const DIPROPSTRING *LPCDIPROPSTRING;
1102
1103 #endif /* DIRECTINPUT_VERSION >= 0x050a */
1104
1105 #if(DIRECTINPUT_VERSION >= 0x0800)
1106 #define MAXCPOINTSNUM 8
1107
1108 typedef struct _CPOINT
1109 {
1110 LONG lP; // raw value
1111 DWORD dwLog; // logical_value / max_logical_value * 10000
1112 } CPOINT, *PCPOINT;
1113
1114 typedef struct DIPROPCPOINTS {
1115 DIPROPHEADER diph;
1116 DWORD dwCPointsNum;
1117 CPOINT cp[MAXCPOINTSNUM];
1118 } DIPROPCPOINTS, *LPDIPROPCPOINTS;
1119 typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
1120 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
1121
1122
1123 #ifdef __cplusplus
1124 #define MAKEDIPROP(prop) (*(const GUID *)(prop))
1125 #else
1126 #define MAKEDIPROP(prop) ((REFGUID)(prop))
1127 #endif
1128
1129 #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
1130
1131 #define DIPROP_AXISMODE MAKEDIPROP(2)
1132
1133 #define DIPROPAXISMODE_ABS 0
1134 #define DIPROPAXISMODE_REL 1
1135
1136 #define DIPROP_GRANULARITY MAKEDIPROP(3)
1137
1138 #define DIPROP_RANGE MAKEDIPROP(4)
1139
1140 #define DIPROP_DEADZONE MAKEDIPROP(5)
1141
1142 #define DIPROP_SATURATION MAKEDIPROP(6)
1143
1144 #define DIPROP_FFGAIN MAKEDIPROP(7)
1145
1146 #define DIPROP_FFLOAD MAKEDIPROP(8)
1147
1148 #define DIPROP_AUTOCENTER MAKEDIPROP(9)
1149
1150 #define DIPROPAUTOCENTER_OFF 0
1151 #define DIPROPAUTOCENTER_ON 1
1152
1153 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
1154
1155 #define DIPROPCALIBRATIONMODE_COOKED 0
1156 #define DIPROPCALIBRATIONMODE_RAW 1
1157
1158 #if(DIRECTINPUT_VERSION >= 0x050a)
1159 #define DIPROP_CALIBRATION MAKEDIPROP(11)
1160
1161 #define DIPROP_GUIDANDPATH MAKEDIPROP(12)
1162
1163 #define DIPROP_INSTANCENAME MAKEDIPROP(13)
1164
1165 #define DIPROP_PRODUCTNAME MAKEDIPROP(14)
1166 #endif /* DIRECTINPUT_VERSION >= 0x050a */
1167
1168 #if(DIRECTINPUT_VERSION >= 0x05b2)
1169 #define DIPROP_JOYSTICKID MAKEDIPROP(15)
1170
1171 #define DIPROP_GETPORTDISPLAYNAME MAKEDIPROP(16)
1172
1173 #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
1174
1175 #if(DIRECTINPUT_VERSION >= 0x0700)
1176 #define DIPROP_PHYSICALRANGE MAKEDIPROP(18)
1177
1178 #define DIPROP_LOGICALRANGE MAKEDIPROP(19)
1179 #endif /* DIRECTINPUT_VERSION >= 0x0700 */
1180
1181 #if(DIRECTINPUT_VERSION >= 0x0800)
1182 #define DIPROP_KEYNAME MAKEDIPROP(20)
1183
1184 #define DIPROP_CPOINTS MAKEDIPROP(21)
1185
1186 #define DIPROP_APPDATA MAKEDIPROP(22)
1187
1188 #define DIPROP_SCANCODE MAKEDIPROP(23)
1189
1190 #define DIPROP_VIDPID MAKEDIPROP(24)
1191
1192 #define DIPROP_USERNAME MAKEDIPROP(25)
1193
1194 #define DIPROP_TYPENAME MAKEDIPROP(26)
1195 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
1196
1197
1198 typedef struct DIDEVICEOBJECTDATA_DX3 {
1199 DWORD dwOfs;
1200 DWORD dwData;
1201 DWORD dwTimeStamp;
1202 DWORD dwSequence;
1203 } DIDEVICEOBJECTDATA_DX3, *LPDIDEVICEOBJECTDATA_DX3;
1204 typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX;
1205
1206 typedef struct DIDEVICEOBJECTDATA {
1207 DWORD dwOfs;
1208 DWORD dwData;
1209 DWORD dwTimeStamp;
1210 DWORD dwSequence;
1211 #if(DIRECTINPUT_VERSION >= 0x0800)
1212 UINT_PTR uAppData;
1213 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
1214 } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
1215 typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
1216
1217 #define DIGDD_PEEK 0x00000001
1218
1219 #define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
1220 ((int)((dwSequence1) - (dwSequence2)) cmp 0)
1221 #define DISCL_EXCLUSIVE 0x00000001
1222 #define DISCL_NONEXCLUSIVE 0x00000002
1223 #define DISCL_FOREGROUND 0x00000004
1224 #define DISCL_BACKGROUND 0x00000008
1225 #define DISCL_NOWINKEY 0x00000010
1226
1227 #if(DIRECTINPUT_VERSION >= 0x0500)
1228 /* These structures are defined for DirectX 3.0 compatibility */
1229
1230 typedef struct DIDEVICEINSTANCE_DX3A {
1231 DWORD dwSize;
1232 GUID guidInstance;
1233 GUID guidProduct;
1234 DWORD dwDevType;
1235 CHAR tszInstanceName[MAX_PATH];
1236 CHAR tszProductName[MAX_PATH];
1237 } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
1238 typedef struct DIDEVICEINSTANCE_DX3W {
1239 DWORD dwSize;
1240 GUID guidInstance;
1241 GUID guidProduct;
1242 DWORD dwDevType;
1243 WCHAR tszInstanceName[MAX_PATH];
1244 WCHAR tszProductName[MAX_PATH];
1245 } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
1246 #ifdef UNICODE
1247 typedef DIDEVICEINSTANCE_DX3W DIDEVICEINSTANCE_DX3;
1248 typedef LPDIDEVICEINSTANCE_DX3W LPDIDEVICEINSTANCE_DX3;
1249 #else
1250 typedef DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3;
1251 typedef LPDIDEVICEINSTANCE_DX3A LPDIDEVICEINSTANCE_DX3;
1252 #endif // UNICODE
1253 typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
1254 typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
1255 typedef const DIDEVICEINSTANCE_DX3 *LPCDIDEVICEINSTANCE_DX3;
1256 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
1257
1258 typedef struct DIDEVICEINSTANCEA {
1259 DWORD dwSize;
1260 GUID guidInstance;
1261 GUID guidProduct;
1262 DWORD dwDevType;
1263 CHAR tszInstanceName[MAX_PATH];
1264 CHAR tszProductName[MAX_PATH];
1265 #if(DIRECTINPUT_VERSION >= 0x0500)
1266 GUID guidFFDriver;
1267 WORD wUsagePage;
1268 WORD wUsage;
1269 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
1270 } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
1271 typedef struct DIDEVICEINSTANCEW {
1272 DWORD dwSize;
1273 GUID guidInstance;
1274 GUID guidProduct;
1275 DWORD dwDevType;
1276 WCHAR tszInstanceName[MAX_PATH];
1277 WCHAR tszProductName[MAX_PATH];
1278 #if(DIRECTINPUT_VERSION >= 0x0500)
1279 GUID guidFFDriver;
1280 WORD wUsagePage;
1281 WORD wUsage;
1282 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
1283 } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
1284 #ifdef UNICODE
1285 typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
1286 typedef LPDIDEVICEINSTANCEW LPDIDEVICEINSTANCE;
1287 #else
1288 typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
1289 typedef LPDIDEVICEINSTANCEA LPDIDEVICEINSTANCE;
1290 #endif // UNICODE
1291
1292 typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
1293 typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
1294 #ifdef UNICODE
1295 typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
1296 typedef LPCDIDEVICEINSTANCEW LPCDIDEVICEINSTANCE;
1297 #else
1298 typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
1299 typedef LPCDIDEVICEINSTANCEA LPCDIDEVICEINSTANCE;
1300 #endif // UNICODE
1301 typedef const DIDEVICEINSTANCE *LPCDIDEVICEINSTANCE;
1302
1303 #undef INTERFACE
1304 #define INTERFACE IDirectInputDeviceW
1305
1306 DECLARE_INTERFACE_(IDirectInputDeviceW, IUnknown)
1307 {
1308 /*** IUnknown methods ***/
1309 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1310 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1311 STDMETHOD_(ULONG,Release)(THIS) PURE;
1312
1313 /*** IDirectInputDeviceW methods ***/
1314 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1315 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
1316 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1317 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1318 STDMETHOD(Acquire)(THIS) PURE;
1319 STDMETHOD(Unacquire)(THIS) PURE;
1320 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1321 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1322 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1323 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1324 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1325 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
1326 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
1327 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1328 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1329 };
1330
1331 typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
1332
1333 #undef INTERFACE
1334 #define INTERFACE IDirectInputDeviceA
1335
1336 DECLARE_INTERFACE_(IDirectInputDeviceA, IUnknown)
1337 {
1338 /*** IUnknown methods ***/
1339 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1340 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1341 STDMETHOD_(ULONG,Release)(THIS) PURE;
1342
1343 /*** IDirectInputDeviceA methods ***/
1344 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1345 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
1346 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1347 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1348 STDMETHOD(Acquire)(THIS) PURE;
1349 STDMETHOD(Unacquire)(THIS) PURE;
1350 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1351 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1352 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1353 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1354 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1355 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
1356 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
1357 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1358 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1359 };
1360
1361 typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
1362
1363 #ifdef UNICODE
1364 #define IID_IDirectInputDevice IID_IDirectInputDeviceW
1365 #define IDirectInputDevice IDirectInputDeviceW
1366 #define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl
1367 #else
1368 #define IID_IDirectInputDevice IID_IDirectInputDeviceA
1369 #define IDirectInputDevice IDirectInputDeviceA
1370 #define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl
1371 #endif
1372 typedef struct IDirectInputDevice *LPDIRECTINPUTDEVICE;
1373
1374 #if !defined(__cplusplus) || defined(CINTERFACE)
1375 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1376 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
1377 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
1378 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1379 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1380 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1381 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1382 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
1383 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1384 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1385 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1386 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1387 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1388 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1389 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1390 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1391 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1392 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1393 #else
1394 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1395 #define IDirectInputDevice_AddRef(p) (p)->AddRef()
1396 #define IDirectInputDevice_Release(p) (p)->Release()
1397 #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
1398 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1399 #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
1400 #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
1401 #define IDirectInputDevice_Acquire(p) (p)->Acquire()
1402 #define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
1403 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1404 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1405 #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
1406 #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
1407 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1408 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1409 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1410 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1411 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1412 #endif
1413
1414 #endif /* DIJ_RINGZERO */
1415
1416
1417 #if(DIRECTINPUT_VERSION >= 0x0500)
1418
1419 #define DISFFC_RESET 0x00000001
1420 #define DISFFC_STOPALL 0x00000002
1421 #define DISFFC_PAUSE 0x00000004
1422 #define DISFFC_CONTINUE 0x00000008
1423 #define DISFFC_SETACTUATORSON 0x00000010
1424 #define DISFFC_SETACTUATORSOFF 0x00000020
1425
1426 #define DIGFFS_EMPTY 0x00000001
1427 #define DIGFFS_STOPPED 0x00000002
1428 #define DIGFFS_PAUSED 0x00000004
1429 #define DIGFFS_ACTUATORSON 0x00000010
1430 #define DIGFFS_ACTUATORSOFF 0x00000020
1431 #define DIGFFS_POWERON 0x00000040
1432 #define DIGFFS_POWEROFF 0x00000080
1433 #define DIGFFS_SAFETYSWITCHON 0x00000100
1434 #define DIGFFS_SAFETYSWITCHOFF 0x00000200
1435 #define DIGFFS_USERFFSWITCHON 0x00000400
1436 #define DIGFFS_USERFFSWITCHOFF 0x00000800
1437 #define DIGFFS_DEVICELOST 0x80000000
1438
1439 #ifndef DIJ_RINGZERO
1440
1441 typedef struct DIEFFECTINFOA {
1442 DWORD dwSize;
1443 GUID guid;
1444 DWORD dwEffType;
1445 DWORD dwStaticParams;
1446 DWORD dwDynamicParams;
1447 CHAR tszName[MAX_PATH];
1448 } DIEFFECTINFOA, *LPDIEFFECTINFOA;
1449 typedef struct DIEFFECTINFOW {
1450 DWORD dwSize;
1451 GUID guid;
1452 DWORD dwEffType;
1453 DWORD dwStaticParams;
1454 DWORD dwDynamicParams;
1455 WCHAR tszName[MAX_PATH];
1456 } DIEFFECTINFOW, *LPDIEFFECTINFOW;
1457 #ifdef UNICODE
1458 typedef DIEFFECTINFOW DIEFFECTINFO;
1459 typedef LPDIEFFECTINFOW LPDIEFFECTINFO;
1460 #else
1461 typedef DIEFFECTINFOA DIEFFECTINFO;
1462 typedef LPDIEFFECTINFOA LPDIEFFECTINFO;
1463 #endif // UNICODE
1464 typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
1465 typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
1466 typedef const DIEFFECTINFO *LPCDIEFFECTINFO;
1467
1468 #define DISDD_CONTINUE 0x00000001
1469
1470 typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
1471 typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
1472 #ifdef UNICODE
1473 #define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKW
1474 #else
1475 #define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKA
1476 #endif // !UNICODE
1477 typedef BOOL (FAR PASCAL * LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
1478
1479 #undef INTERFACE
1480 #define INTERFACE IDirectInputDevice2W
1481
1482 DECLARE_INTERFACE_(IDirectInputDevice2W, IDirectInputDeviceW)
1483 {
1484 /*** IUnknown methods ***/
1485 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1486 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1487 STDMETHOD_(ULONG,Release)(THIS) PURE;
1488
1489 /*** IDirectInputDeviceW methods ***/
1490 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1491 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
1492 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1493 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1494 STDMETHOD(Acquire)(THIS) PURE;
1495 STDMETHOD(Unacquire)(THIS) PURE;
1496 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1497 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1498 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1499 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1500 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1501 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
1502 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
1503 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1504 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1505
1506 /*** IDirectInputDevice2W methods ***/
1507 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
1508 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
1509 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
1510 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
1511 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
1512 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
1513 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1514 STDMETHOD(Poll)(THIS) PURE;
1515 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1516 };
1517
1518 typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
1519
1520 #undef INTERFACE
1521 #define INTERFACE IDirectInputDevice2A
1522
1523 DECLARE_INTERFACE_(IDirectInputDevice2A, IDirectInputDeviceA)
1524 {
1525 /*** IUnknown methods ***/
1526 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1527 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1528 STDMETHOD_(ULONG,Release)(THIS) PURE;
1529
1530 /*** IDirectInputDeviceA methods ***/
1531 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1532 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
1533 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1534 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1535 STDMETHOD(Acquire)(THIS) PURE;
1536 STDMETHOD(Unacquire)(THIS) PURE;
1537 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1538 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1539 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1540 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1541 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1542 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
1543 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
1544 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1545 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1546
1547 /*** IDirectInputDevice2A methods ***/
1548 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
1549 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
1550 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
1551 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
1552 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
1553 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
1554 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1555 STDMETHOD(Poll)(THIS) PURE;
1556 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1557 };
1558
1559 typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
1560
1561 #ifdef UNICODE
1562 #define IID_IDirectInputDevice2 IID_IDirectInputDevice2W
1563 #define IDirectInputDevice2 IDirectInputDevice2W
1564 #define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl
1565 #else
1566 #define IID_IDirectInputDevice2 IID_IDirectInputDevice2A
1567 #define IDirectInputDevice2 IDirectInputDevice2A
1568 #define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl
1569 #endif
1570 typedef struct IDirectInputDevice2 *LPDIRECTINPUTDEVICE2;
1571
1572 #if !defined(__cplusplus) || defined(CINTERFACE)
1573 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1574 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
1575 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
1576 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1577 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1578 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1579 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1580 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
1581 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1582 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1583 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1584 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1585 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1586 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1587 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1588 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1589 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1590 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1591 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1592 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1593 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1594 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1595 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1596 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1597 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1598 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
1599 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1600 #else
1601 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1602 #define IDirectInputDevice2_AddRef(p) (p)->AddRef()
1603 #define IDirectInputDevice2_Release(p) (p)->Release()
1604 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
1605 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1606 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
1607 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
1608 #define IDirectInputDevice2_Acquire(p) (p)->Acquire()
1609 #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
1610 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1611 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1612 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
1613 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
1614 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1615 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1616 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1617 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1618 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1619 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1620 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1621 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1622 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1623 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1624 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1625 #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
1626 #define IDirectInputDevice2_Poll(p) (p)->Poll()
1627 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1628 #endif
1629
1630 #endif /* DIJ_RINGZERO */
1631
1632 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
1633
1634 #if(DIRECTINPUT_VERSION >= 0x0700)
1635 #define DIFEF_DEFAULT 0x00000000
1636 #define DIFEF_INCLUDENONSTANDARD 0x00000001
1637 #define DIFEF_MODIFYIFNEEDED 0x00000010
1638
1639 #ifndef DIJ_RINGZERO
1640
1641 #undef INTERFACE
1642 #define INTERFACE IDirectInputDevice7W
1643
1644 DECLARE_INTERFACE_(IDirectInputDevice7W, IDirectInputDevice2W)
1645 {
1646 /*** IUnknown methods ***/
1647 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1648 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1649 STDMETHOD_(ULONG,Release)(THIS) PURE;
1650
1651 /*** IDirectInputDevice2W methods ***/
1652 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1653 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
1654 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1655 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1656 STDMETHOD(Acquire)(THIS) PURE;
1657 STDMETHOD(Unacquire)(THIS) PURE;
1658 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1659 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1660 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1661 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1662 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1663 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
1664 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
1665 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1666 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1667 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
1668 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
1669 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
1670 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
1671 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
1672 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
1673 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1674 STDMETHOD(Poll)(THIS) PURE;
1675 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1676
1677 /*** IDirectInputDevice7W methods ***/
1678 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
1679 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
1680 };
1681
1682 typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
1683
1684 #undef INTERFACE
1685 #define INTERFACE IDirectInputDevice7A
1686
1687 DECLARE_INTERFACE_(IDirectInputDevice7A, IDirectInputDevice2A)
1688 {
1689 /*** IUnknown methods ***/
1690 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1691 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1692 STDMETHOD_(ULONG,Release)(THIS) PURE;
1693
1694 /*** IDirectInputDevice2A methods ***/
1695 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1696 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
1697 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1698 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1699 STDMETHOD(Acquire)(THIS) PURE;
1700 STDMETHOD(Unacquire)(THIS) PURE;
1701 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1702 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1703 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1704 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1705 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1706 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
1707 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
1708 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1709 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1710 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
1711 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
1712 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
1713 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
1714 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
1715 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
1716 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1717 STDMETHOD(Poll)(THIS) PURE;
1718 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1719
1720 /*** IDirectInputDevice7A methods ***/
1721 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
1722 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
1723 };
1724
1725 typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
1726
1727 #ifdef UNICODE
1728 #define IID_IDirectInputDevice7 IID_IDirectInputDevice7W
1729 #define IDirectInputDevice7 IDirectInputDevice7W
1730 #define IDirectInputDevice7Vtbl IDirectInputDevice7WVtbl
1731 #else
1732 #define IID_IDirectInputDevice7 IID_IDirectInputDevice7A
1733 #define IDirectInputDevice7 IDirectInputDevice7A
1734 #define IDirectInputDevice7Vtbl IDirectInputDevice7AVtbl
1735 #endif
1736 typedef struct IDirectInputDevice7 *LPDIRECTINPUTDEVICE7;
1737
1738 #if !defined(__cplusplus) || defined(CINTERFACE)
1739 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1740 #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
1741 #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
1742 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1743 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1744 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1745 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1746 #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
1747 #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1748 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1749 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1750 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1751 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1752 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1753 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1754 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1755 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1756 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1757 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1758 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1759 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1760 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1761 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1762 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1763 #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1764 #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
1765 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1766 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1767 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1768 #else
1769 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1770 #define IDirectInputDevice7_AddRef(p) (p)->AddRef()
1771 #define IDirectInputDevice7_Release(p) (p)->Release()
1772 #define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
1773 #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1774 #define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
1775 #define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
1776 #define IDirectInputDevice7_Acquire(p) (p)->Acquire()
1777 #define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
1778 #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1779 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1780 #define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
1781 #define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
1782 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1783 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1784 #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1785 #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1786 #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1787 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1788 #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1789 #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1790 #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1791 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1792 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1793 #define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
1794 #define IDirectInputDevice7_Poll(p) (p)->Poll()
1795 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1796 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
1797 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
1798 #endif
1799
1800 #endif /* DIJ_RINGZERO */
1801
1802 #endif /* DIRECTINPUT_VERSION >= 0x0700 */
1803
1804 #if(DIRECTINPUT_VERSION >= 0x0800)
1805
1806 #ifndef DIJ_RINGZERO
1807
1808 #undef INTERFACE
1809 #define INTERFACE IDirectInputDevice8W
1810
1811 DECLARE_INTERFACE_(IDirectInputDevice8W, IUnknown)
1812 {
1813 /*** IUnknown methods ***/
1814 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1815 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1816 STDMETHOD_(ULONG,Release)(THIS) PURE;
1817
1818 /*** IDirectInputDevice8W methods ***/
1819 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1820 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
1821 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1822 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1823 STDMETHOD(Acquire)(THIS) PURE;
1824 STDMETHOD(Unacquire)(THIS) PURE;
1825 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1826 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1827 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1828 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1829 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1830 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
1831 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
1832 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1833 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1834 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
1835 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
1836 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
1837 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
1838 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
1839 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
1840 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1841 STDMETHOD(Poll)(THIS) PURE;
1842 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1843 STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
1844 STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
1845 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
1846 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
1847 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW) PURE;
1848 };
1849
1850 typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
1851
1852 #undef INTERFACE
1853 #define INTERFACE IDirectInputDevice8A
1854
1855 DECLARE_INTERFACE_(IDirectInputDevice8A, IUnknown)
1856 {
1857 /*** IUnknown methods ***/
1858 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1859 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1860 STDMETHOD_(ULONG,Release)(THIS) PURE;
1861
1862 /*** IDirectInputDevice8A methods ***/
1863 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
1864 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
1865 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
1866 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
1867 STDMETHOD(Acquire)(THIS) PURE;
1868 STDMETHOD(Unacquire)(THIS) PURE;
1869 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
1870 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1871 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
1872 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
1873 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
1874 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
1875 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
1876 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
1877 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
1878 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
1879 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
1880 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
1881 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
1882 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
1883 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
1884 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1885 STDMETHOD(Poll)(THIS) PURE;
1886 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
1887 STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
1888 STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
1889 STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
1890 STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
1891 STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA) PURE;
1892 };
1893
1894 typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
1895
1896 #ifdef UNICODE
1897 #define IID_IDirectInputDevice8 IID_IDirectInputDevice8W
1898 #define IDirectInputDevice8 IDirectInputDevice8W
1899 #define IDirectInputDevice8Vtbl IDirectInputDevice8WVtbl
1900 #else
1901 #define IID_IDirectInputDevice8 IID_IDirectInputDevice8A
1902 #define IDirectInputDevice8 IDirectInputDevice8A
1903 #define IDirectInputDevice8Vtbl IDirectInputDevice8AVtbl
1904 #endif
1905 typedef struct IDirectInputDevice8 *LPDIRECTINPUTDEVICE8;
1906
1907 #if !defined(__cplusplus) || defined(CINTERFACE)
1908 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1909 #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
1910 #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
1911 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
1912 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
1913 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
1914 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
1915 #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
1916 #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
1917 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
1918 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1919 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
1920 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
1921 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1922 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1923 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
1924 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1925 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
1926 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1927 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
1928 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
1929 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
1930 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1931 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1932 #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
1933 #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
1934 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1935 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1936 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1937 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
1938 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
1939 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
1940 #else
1941 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1942 #define IDirectInputDevice8_AddRef(p) (p)->AddRef()
1943 #define IDirectInputDevice8_Release(p) (p)->Release()
1944 #define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
1945 #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
1946 #define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
1947 #define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
1948 #define IDirectInputDevice8_Acquire(p) (p)->Acquire()
1949 #define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
1950 #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1951 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1952 #define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
1953 #define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
1954 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1955 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1956 #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1957 #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1958 #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1959 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1960 #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1961 #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1962 #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1963 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1964 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1965 #define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
1966 #define IDirectInputDevice8_Poll(p) (p)->Poll()
1967 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1968 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
1969 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
1970 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
1971 #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
1972 #define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
1973 #endif
1974
1975 #endif /* DIJ_RINGZERO */
1976
1977 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
1978
1979 /****************************************************************************
1980 *
1981 * Mouse
1982 *
1983 ****************************************************************************/
1984
1985 #ifndef DIJ_RINGZERO
1986
1987 typedef struct _DIMOUSESTATE {
1988 LONG lX;
1989 LONG lY;
1990 LONG lZ;
1991 BYTE rgbButtons[4];
1992 } DIMOUSESTATE, *LPDIMOUSESTATE;
1993
1994 #if DIRECTINPUT_VERSION >= 0x0700
1995 typedef struct _DIMOUSESTATE2 {
1996 LONG lX;
1997 LONG lY;
1998 LONG lZ;
1999 BYTE rgbButtons[8];
2000 } DIMOUSESTATE2, *LPDIMOUSESTATE2;
2001 #endif
2002
2003
2004 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
2005 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
2006 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
2007 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
2008 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
2009 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
2010 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
2011 #if (DIRECTINPUT_VERSION >= 0x0700)
2012 #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
2013 #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
2014 #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
2015 #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
2016 #endif
2017 #endif /* DIJ_RINGZERO */
2018
2019 /****************************************************************************
2020 *
2021 * Keyboard
2022 *
2023 ****************************************************************************/
2024
2025 #ifndef DIJ_RINGZERO
2026
2027 /****************************************************************************
2028 *
2029 * DirectInput keyboard scan codes
2030 *
2031 ****************************************************************************/
2032 #define DIK_ESCAPE 0x01
2033 #define DIK_1 0x02
2034 #define DIK_2 0x03
2035 #define DIK_3 0x04
2036 #define DIK_4 0x05
2037 #define DIK_5 0x06
2038 #define DIK_6 0x07
2039 #define DIK_7 0x08
2040 #define DIK_8 0x09
2041 #define DIK_9 0x0A
2042 #define DIK_0 0x0B
2043 #define DIK_MINUS 0x0C /* - on main keyboard */
2044 #define DIK_EQUALS 0x0D
2045 #define DIK_BACK 0x0E /* backspace */
2046 #define DIK_TAB 0x0F
2047 #define DIK_Q 0x10
2048 #define DIK_W 0x11
2049 #define DIK_E 0x12
2050 #define DIK_R 0x13
2051 #define DIK_T 0x14
2052 #define DIK_Y 0x15
2053 #define DIK_U 0x16
2054 #define DIK_I 0x17
2055 #define DIK_O 0x18
2056 #define DIK_P 0x19
2057 #define DIK_LBRACKET 0x1A
2058 #define DIK_RBRACKET 0x1B
2059 #define DIK_RETURN 0x1C /* Enter on main keyboard */
2060 #define DIK_LCONTROL 0x1D
2061 #define DIK_A 0x1E
2062 #define DIK_S 0x1F
2063 #define DIK_D 0x20
2064 #define DIK_F 0x21
2065 #define DIK_G 0x22
2066 #define DIK_H 0x23
2067 #define DIK_J 0x24
2068 #define DIK_K 0x25
2069 #define DIK_L 0x26
2070 #define DIK_SEMICOLON 0x27
2071 #define DIK_APOSTROPHE 0x28
2072 #define DIK_GRAVE 0x29 /* accent grave */
2073 #define DIK_LSHIFT 0x2A
2074 #define DIK_BACKSLASH 0x2B
2075 #define DIK_Z 0x2C
2076 #define DIK_X 0x2D
2077 #define DIK_C 0x2E
2078 #define DIK_V 0x2F
2079 #define DIK_B 0x30
2080 #define DIK_N 0x31
2081 #define DIK_M 0x32
2082 #define DIK_COMMA 0x33
2083 #define DIK_PERIOD 0x34 /* . on main keyboard */
2084 #define DIK_SLASH 0x35 /* / on main keyboard */
2085 #define DIK_RSHIFT 0x36
2086 #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
2087 #define DIK_LMENU 0x38 /* left Alt */
2088 #define DIK_SPACE 0x39
2089 #define DIK_CAPITAL 0x3A
2090 #define DIK_F1 0x3B
2091 #define DIK_F2 0x3C
2092 #define DIK_F3 0x3D
2093 #define DIK_F4 0x3E
2094 #define DIK_F5 0x3F
2095 #define DIK_F6 0x40
2096 #define DIK_F7 0x41
2097 #define DIK_F8 0x42
2098 #define DIK_F9 0x43
2099 #define DIK_F10 0x44
2100 #define DIK_NUMLOCK 0x45
2101 #define DIK_SCROLL 0x46 /* Scroll Lock */
2102 #define DIK_NUMPAD7 0x47
2103 #define DIK_NUMPAD8 0x48
2104 #define DIK_NUMPAD9 0x49
2105 #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
2106 #define DIK_NUMPAD4 0x4B
2107 #define DIK_NUMPAD5 0x4C
2108 #define DIK_NUMPAD6 0x4D
2109 #define DIK_ADD 0x4E /* + on numeric keypad */
2110 #define DIK_NUMPAD1 0x4F
2111 #define DIK_NUMPAD2 0x50
2112 #define DIK_NUMPAD3 0x51
2113 #define DIK_NUMPAD0 0x52
2114 #define DIK_DECIMAL 0x53 /* . on numeric keypad */
2115 #define DIK_OEM_102 0x56 /* <> or \| on RT 102-key keyboard (Non-U.S.) */
2116 #define DIK_F11 0x57
2117 #define DIK_F12 0x58
2118 #define DIK_F13 0x64 /* (NEC PC98) */
2119 #define DIK_F14 0x65 /* (NEC PC98) */
2120 #define DIK_F15 0x66 /* (NEC PC98) */
2121 #define DIK_KANA 0x70 /* (Japanese keyboard) */
2122 #define DIK_ABNT_C1 0x73 /* /? on Brazilian keyboard */
2123 #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
2124 #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
2125 #define DIK_YEN 0x7D /* (Japanese keyboard) */
2126 #define DIK_ABNT_C2 0x7E /* Numpad . on Brazilian keyboard */
2127 #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
2128 #define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
2129 #define DIK_AT 0x91 /* (NEC PC98) */
2130 #define DIK_COLON 0x92 /* (NEC PC98) */
2131 #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
2132 #define DIK_KANJI 0x94 /* (Japanese keyboard) */
2133 #define DIK_STOP 0x95 /* (NEC PC98) */
2134 #define DIK_AX 0x96 /* (Japan AX) */
2135 #define DIK_UNLABELED 0x97 /* (J3100) */
2136 #define DIK_NEXTTRACK 0x99 /* Next Track */
2137 #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
2138 #define DIK_RCONTROL 0x9D
2139 #define DIK_MUTE 0xA0 /* Mute */
2140 #define DIK_CALCULATOR 0xA1 /* Calculator */
2141 #define DIK_PLAYPAUSE 0xA2 /* Play / Pause */
2142 #define DIK_MEDIASTOP 0xA4 /* Media Stop */
2143 #define DIK_VOLUMEDOWN 0xAE /* Volume - */
2144 #define DIK_VOLUMEUP 0xB0 /* Volume + */
2145 #define DIK_WEBHOME 0xB2 /* Web home */
2146 #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
2147 #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
2148 #define DIK_SYSRQ 0xB7
2149 #define DIK_RMENU 0xB8 /* right Alt */
2150 #define DIK_PAUSE 0xC5 /* Pause */
2151 #define DIK_HOME 0xC7 /* Home on arrow keypad */
2152 #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
2153 #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
2154 #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
2155 #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
2156 #define DIK_END 0xCF /* End on arrow keypad */
2157 #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
2158 #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
2159 #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
2160 #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
2161 #define DIK_LWIN 0xDB /* Left Windows key */
2162 #define DIK_RWIN 0xDC /* Right Windows key */
2163 #define DIK_APPS 0xDD /* AppMenu key */
2164 #define DIK_POWER 0xDE /* System Power */
2165 #define DIK_SLEEP 0xDF /* System Sleep */
2166 #define DIK_WAKE 0xE3 /* System Wake */
2167 #define DIK_WEBSEARCH 0xE5 /* Web Search */
2168 #define DIK_WEBFAVORITES 0xE6 /* Web Favorites */
2169 #define DIK_WEBREFRESH 0xE7 /* Web Refresh */
2170 #define DIK_WEBSTOP 0xE8 /* Web Stop */
2171 #define DIK_WEBFORWARD 0xE9 /* Web Forward */
2172 #define DIK_WEBBACK 0xEA /* Web Back */
2173 #define DIK_MYCOMPUTER 0xEB /* My Computer */
2174 #define DIK_MAIL 0xEC /* Mail */
2175 #define DIK_MEDIASELECT 0xED /* Media Select */
2176
2177 /*
2178 * Alternate names for keys, to facilitate transition from DOS.
2179 */
2180 #define DIK_BACKSPACE DIK_BACK /* backspace */
2181 #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
2182 #define DIK_LALT DIK_LMENU /* left Alt */
2183 #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
2184 #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
2185 #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
2186 #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
2187 #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
2188 #define DIK_RALT DIK_RMENU /* right Alt */
2189 #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
2190 #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
2191 #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
2192 #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
2193 #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
2194 #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
2195
2196 /*
2197 * Alternate names for keys originally not used on US keyboards.
2198 */
2199 #define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */
2200
2201 #endif /* DIJ_RINGZERO */
2202
2203 /****************************************************************************
2204 *
2205 * Joystick
2206 *
2207 ****************************************************************************/
2208
2209 #ifndef DIJ_RINGZERO
2210
2211 typedef struct DIJOYSTATE {
2212 LONG lX; /* x-axis position */
2213 LONG lY; /* y-axis position */
2214 LONG lZ; /* z-axis position */
2215 LONG lRx; /* x-axis rotation */
2216 LONG lRy; /* y-axis rotation */
2217 LONG lRz; /* z-axis rotation */
2218 LONG rglSlider[2]; /* extra axes positions */
2219 DWORD rgdwPOV[4]; /* POV directions */
2220 BYTE rgbButtons[32]; /* 32 buttons */
2221 } DIJOYSTATE, *LPDIJOYSTATE;
2222
2223 typedef struct DIJOYSTATE2 {
2224 LONG lX; /* x-axis position */
2225 LONG lY; /* y-axis position */
2226 LONG lZ; /* z-axis position */
2227 LONG lRx; /* x-axis rotation */
2228 LONG lRy; /* y-axis rotation */
2229 LONG lRz; /* z-axis rotation */
2230 LONG rglSlider[2]; /* extra axes positions */
2231 DWORD rgdwPOV[4]; /* POV directions */
2232 BYTE rgbButtons[128]; /* 128 buttons */
2233 LONG lVX; /* x-axis velocity */
2234 LONG lVY; /* y-axis velocity */
2235 LONG lVZ; /* z-axis velocity */
2236 LONG lVRx; /* x-axis angular velocity */
2237 LONG lVRy; /* y-axis angular velocity */
2238 LONG lVRz; /* z-axis angular velocity */
2239 LONG rglVSlider[2]; /* extra axes velocities */
2240 LONG lAX; /* x-axis acceleration */
2241 LONG lAY; /* y-axis acceleration */
2242 LONG lAZ; /* z-axis acceleration */
2243 LONG lARx; /* x-axis angular acceleration */
2244 LONG lARy; /* y-axis angular acceleration */
2245 LONG lARz; /* z-axis angular acceleration */
2246 LONG rglASlider[2]; /* extra axes accelerations */
2247 LONG lFX; /* x-axis force */
2248 LONG lFY; /* y-axis force */
2249 LONG lFZ; /* z-axis force */
2250 LONG lFRx; /* x-axis torque */
2251 LONG lFRy; /* y-axis torque */
2252 LONG lFRz; /* z-axis torque */
2253 LONG rglFSlider[2]; /* extra axes forces */
2254 } DIJOYSTATE2, *LPDIJOYSTATE2;
2255
2256 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
2257 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
2258 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
2259 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
2260 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
2261 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
2262 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
2263 (n) * sizeof(LONG))
2264 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
2265 (n) * sizeof(DWORD))
2266 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
2267 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
2268 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
2269 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
2270 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
2271 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
2272 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
2273 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
2274 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
2275 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
2276 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
2277 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
2278 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
2279 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
2280 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
2281 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
2282 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
2283 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
2284 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
2285 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
2286 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
2287 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
2288 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
2289 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
2290 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
2291 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
2292 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
2293 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
2294 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
2295 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
2296 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
2297 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
2298 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
2299
2300
2301 #endif /* DIJ_RINGZERO */
2302
2303 /****************************************************************************
2304 *
2305 * IDirectInput
2306 *
2307 ****************************************************************************/
2308
2309 #ifndef DIJ_RINGZERO
2310
2311 #define DIENUM_STOP 0
2312 #define DIENUM_CONTINUE 1
2313
2314 typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA, LPVOID);
2315 typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW, LPVOID);
2316 #ifdef UNICODE
2317 #define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKW
2318 #else
2319 #define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKA
2320 #endif // !UNICODE
2321 typedef BOOL (FAR PASCAL * LPDICONFIGUREDEVICESCALLBACK)(IUnknown FAR *, LPVOID);
2322
2323 #define DIEDFL_ALLDEVICES 0x00000000
2324 #define DIEDFL_ATTACHEDONLY 0x00000001
2325 #if(DIRECTINPUT_VERSION >= 0x0500)
2326 #define DIEDFL_FORCEFEEDBACK 0x00000100
2327 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
2328 #if(DIRECTINPUT_VERSION >= 0x050a)
2329 #define DIEDFL_INCLUDEALIASES 0x00010000
2330 #define DIEDFL_INCLUDEPHANTOMS 0x00020000
2331 #endif /* DIRECTINPUT_VERSION >= 0x050a */
2332 #if(DIRECTINPUT_VERSION >= 0x0800)
2333 #define DIEDFL_INCLUDEHIDDEN 0x00040000
2334 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
2335
2336
2337 #if(DIRECTINPUT_VERSION >= 0x0800)
2338 typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA, LPDIRECTINPUTDEVICE8A, DWORD, DWORD, LPVOID);
2339 typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW, LPDIRECTINPUTDEVICE8W, DWORD, DWORD, LPVOID);
2340 #ifdef UNICODE
2341 #define LPDIENUMDEVICESBYSEMANTICSCB LPDIENUMDEVICESBYSEMANTICSCBW
2342 #else
2343 #define LPDIENUMDEVICESBYSEMANTICSCB LPDIENUMDEVICESBYSEMANTICSCBA
2344 #endif // !UNICODE
2345 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
2346
2347 #if(DIRECTINPUT_VERSION >= 0x0800)
2348 #define DIEDBS_MAPPEDPRI1 0x00000001
2349 #define DIEDBS_MAPPEDPRI2 0x00000002
2350 #define DIEDBS_RECENTDEVICE 0x00000010
2351 #define DIEDBS_NEWDEVICE 0x00000020
2352 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
2353
2354 #if(DIRECTINPUT_VERSION >= 0x0800)
2355 #define DIEDBSFL_ATTACHEDONLY 0x00000000
2356 #define DIEDBSFL_THISUSER 0x00000010
2357 #define DIEDBSFL_FORCEFEEDBACK DIEDFL_FORCEFEEDBACK
2358 #define DIEDBSFL_AVAILABLEDEVICES 0x00001000
2359 #define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000
2360 #define DIEDBSFL_NONGAMINGDEVICES 0x00004000
2361 #define DIEDBSFL_VALID 0x00007110
2362 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
2363
2364 #undef INTERFACE
2365 #define INTERFACE IDirectInputW
2366
2367 DECLARE_INTERFACE_(IDirectInputW, IUnknown)
2368 {
2369 /*** IUnknown methods ***/
2370 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2371 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2372 STDMETHOD_(ULONG,Release)(THIS) PURE;
2373
2374 /*** IDirectInputW methods ***/
2375 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
2376 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
2377 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2378 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2379 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2380 };
2381
2382 typedef struct IDirectInputW *LPDIRECTINPUTW;
2383
2384 #undef INTERFACE
2385 #define INTERFACE IDirectInputA
2386
2387 DECLARE_INTERFACE_(IDirectInputA, IUnknown)
2388 {
2389 /*** IUnknown methods ***/
2390 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2391 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2392 STDMETHOD_(ULONG,Release)(THIS) PURE;
2393
2394 /*** IDirectInputA methods ***/
2395 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
2396 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
2397 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2398 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2399 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2400 };
2401
2402 typedef struct IDirectInputA *LPDIRECTINPUTA;
2403
2404 #ifdef UNICODE
2405 #define IID_IDirectInput IID_IDirectInputW
2406 #define IDirectInput IDirectInputW
2407 #define IDirectInputVtbl IDirectInputWVtbl
2408 #else
2409 #define IID_IDirectInput IID_IDirectInputA
2410 #define IDirectInput IDirectInputA
2411 #define IDirectInputVtbl IDirectInputAVtbl
2412 #endif
2413 typedef struct IDirectInput *LPDIRECTINPUT;
2414
2415 #if !defined(__cplusplus) || defined(CINTERFACE)
2416 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2417 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
2418 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
2419 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2420 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2421 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2422 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2423 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2424 #else
2425 #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2426 #define IDirectInput_AddRef(p) (p)->AddRef()
2427 #define IDirectInput_Release(p) (p)->Release()
2428 #define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2429 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2430 #define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2431 #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2432 #define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
2433 #endif
2434
2435 #undef INTERFACE
2436 #define INTERFACE IDirectInput2W
2437
2438 DECLARE_INTERFACE_(IDirectInput2W, IDirectInputW)
2439 {
2440 /*** IUnknown methods ***/
2441 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2442 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2443 STDMETHOD_(ULONG,Release)(THIS) PURE;
2444
2445 /*** IDirectInputW methods ***/
2446 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
2447 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
2448 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2449 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2450 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2451
2452 /*** IDirectInput2W methods ***/
2453 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
2454 };
2455
2456 typedef struct IDirectInput2W *LPDIRECTINPUT2W;
2457
2458 #undef INTERFACE
2459 #define INTERFACE IDirectInput2A
2460
2461 DECLARE_INTERFACE_(IDirectInput2A, IDirectInputA)
2462 {
2463 /*** IUnknown methods ***/
2464 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2465 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2466 STDMETHOD_(ULONG,Release)(THIS) PURE;
2467
2468 /*** IDirectInputA methods ***/
2469 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
2470 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
2471 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2472 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2473 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2474
2475 /*** IDirectInput2A methods ***/
2476 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
2477 };
2478
2479 typedef struct IDirectInput2A *LPDIRECTINPUT2A;
2480
2481 #ifdef UNICODE
2482 #define IID_IDirectInput2 IID_IDirectInput2W
2483 #define IDirectInput2 IDirectInput2W
2484 #define IDirectInput2Vtbl IDirectInput2WVtbl
2485 #else
2486 #define IID_IDirectInput2 IID_IDirectInput2A
2487 #define IDirectInput2 IDirectInput2A
2488 #define IDirectInput2Vtbl IDirectInput2AVtbl
2489 #endif
2490 typedef struct IDirectInput2 *LPDIRECTINPUT2;
2491
2492 #if !defined(__cplusplus) || defined(CINTERFACE)
2493 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2494 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
2495 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
2496 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2497 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2498 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2499 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2500 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2501 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
2502 #else
2503 #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2504 #define IDirectInput2_AddRef(p) (p)->AddRef()
2505 #define IDirectInput2_Release(p) (p)->Release()
2506 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2507 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2508 #define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2509 #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2510 #define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
2511 #define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
2512 #endif
2513
2514
2515 #undef INTERFACE
2516 #define INTERFACE IDirectInput7W
2517
2518 DECLARE_INTERFACE_(IDirectInput7W, IDirectInput2W)
2519 {
2520 /*** IUnknown methods ***/
2521 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2522 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2523 STDMETHOD_(ULONG,Release)(THIS) PURE;
2524
2525 /*** IDirectInput2W methods ***/
2526 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
2527 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
2528 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2529 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2530 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2531 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
2532
2533 /*** IDirectInput7W methods ***/
2534 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE;
2535 };
2536
2537 typedef struct IDirectInput7W *LPDIRECTINPUT7W;
2538
2539 #undef INTERFACE
2540 #define INTERFACE IDirectInput7A
2541
2542 DECLARE_INTERFACE_(IDirectInput7A, IDirectInput2A)
2543 {
2544 /*** IUnknown methods ***/
2545 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2546 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2547 STDMETHOD_(ULONG,Release)(THIS) PURE;
2548
2549 /*** IDirectInput2A methods ***/
2550 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
2551 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
2552 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2553 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2554 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2555 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
2556
2557 /*** IDirectInput7A methods ***/
2558 STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE;
2559 };
2560
2561 typedef struct IDirectInput7A *LPDIRECTINPUT7A;
2562
2563 #ifdef UNICODE
2564 #define IID_IDirectInput7 IID_IDirectInput7W
2565 #define IDirectInput7 IDirectInput7W
2566 #define IDirectInput7Vtbl IDirectInput7WVtbl
2567 #else
2568 #define IID_IDirectInput7 IID_IDirectInput7A
2569 #define IDirectInput7 IDirectInput7A
2570 #define IDirectInput7Vtbl IDirectInput7AVtbl
2571 #endif
2572 typedef struct IDirectInput7 *LPDIRECTINPUT7;
2573
2574 #if !defined(__cplusplus) || defined(CINTERFACE)
2575 #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2576 #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
2577 #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
2578 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2579 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2580 #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2581 #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2582 #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2583 #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
2584 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
2585 #else
2586 #define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2587 #define IDirectInput7_AddRef(p) (p)->AddRef()
2588 #define IDirectInput7_Release(p) (p)->Release()
2589 #define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2590 #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2591 #define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2592 #define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2593 #define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b)
2594 #define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
2595 #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
2596 #endif
2597
2598 #if(DIRECTINPUT_VERSION >= 0x0800)
2599 #undef INTERFACE
2600 #define INTERFACE IDirectInput8W
2601
2602 DECLARE_INTERFACE_(IDirectInput8W, IUnknown)
2603 {
2604 /*** IUnknown methods ***/
2605 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2606 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2607 STDMETHOD_(ULONG,Release)(THIS) PURE;
2608
2609 /*** IDirectInput8W methods ***/
2610 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8W *,LPUNKNOWN) PURE;
2611 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
2612 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2613 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2614 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2615 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
2616 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR,LPDIACTIONFORMATW,LPDIENUMDEVICESBYSEMANTICSCBW,LPVOID,DWORD) PURE;
2617 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSW,DWORD,LPVOID) PURE;
2618 };
2619
2620 typedef struct IDirectInput8W *LPDIRECTINPUT8W;
2621
2622 #undef INTERFACE
2623 #define INTERFACE IDirectInput8A
2624
2625 DECLARE_INTERFACE_(IDirectInput8A, IUnknown)
2626 {
2627 /*** IUnknown methods ***/
2628 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
2629 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2630 STDMETHOD_(ULONG,Release)(THIS) PURE;
2631
2632 /*** IDirectInput8A methods ***/
2633 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8A *,LPUNKNOWN) PURE;
2634 STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
2635 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
2636 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
2637 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
2638 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
2639 STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR,LPDIACTIONFORMATA,LPDIENUMDEVICESBYSEMANTICSCBA,LPVOID,DWORD) PURE;
2640 STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSA,DWORD,LPVOID) PURE;
2641 };
2642
2643 typedef struct IDirectInput8A *LPDIRECTINPUT8A;
2644
2645 #ifdef UNICODE
2646 #define IID_IDirectInput8 IID_IDirectInput8W
2647 #define IDirectInput8 IDirectInput8W
2648 #define IDirectInput8Vtbl IDirectInput8WVtbl
2649 #else
2650 #define IID_IDirectInput8 IID_IDirectInput8A
2651 #define IDirectInput8 IDirectInput8A
2652 #define IDirectInput8Vtbl IDirectInput8AVtbl
2653 #endif
2654 typedef struct IDirectInput8 *LPDIRECTINPUT8;
2655
2656 #if !defined(__cplusplus) || defined(CINTERFACE)
2657 #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2658 #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
2659 #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
2660 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
2661 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2662 #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
2663 #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2664 #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
2665 #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
2666 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
2667 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
2668 #else
2669 #define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2670 #define IDirectInput8_AddRef(p) (p)->AddRef()
2671 #define IDirectInput8_Release(p) (p)->Release()
2672 #define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
2673 #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2674 #define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
2675 #define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2676 #define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b)
2677 #define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
2678 #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
2679 #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
2680 #endif
2681 #endif /* DIRECTINPUT_VERSION >= 0x0800 */
2682
2683 #if DIRECTINPUT_VERSION > 0x0700
2684
2685 extern HRESULT WINAPI DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);
2686
2687 #else
2688 extern HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter);
2689 extern HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter);
2690 #ifdef UNICODE
2691 #define DirectInputCreate DirectInputCreateW
2692 #else
2693 #define DirectInputCreate DirectInputCreateA
2694 #endif // !UNICODE
2695
2696 extern HRESULT WINAPI DirectInputCreateEx(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);
2697
2698 #endif /* DIRECTINPUT_VERSION > 0x700 */
2699
2700 #endif /* DIJ_RINGZERO */
2701
2702
2703 /****************************************************************************
2704 *
2705 * Return Codes
2706 *
2707 ****************************************************************************/
2708
2709 /*
2710 * The operation completed successfully.
2711 */
2712 #define DI_OK S_OK
2713
2714 /*
2715 * The device exists but is not currently attached.
2716 */
2717 #define DI_NOTATTACHED S_FALSE
2718
2719 /*
2720 * The device buffer overflowed. Some input was lost.
2721 */
2722 #define DI_BUFFEROVERFLOW S_FALSE
2723
2724 /*
2725 * The change in device properties had no effect.
2726 */
2727 #define DI_PROPNOEFFECT S_FALSE
2728
2729 /*
2730 * The operation had no effect.
2731 */
2732 #define DI_NOEFFECT S_FALSE
2733
2734 /*
2735 * The device is a polled device. As a result, device buffering
2736 * will not collect any data and event notifications will not be
2737 * signalled until GetDeviceState is called.
2738 */
2739 #define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
2740
2741 /*
2742 * The parameters of the effect were successfully updated by
2743 * IDirectInputEffect::SetParameters, but the effect was not
2744 * downloaded because the device is not exclusively acquired
2745 * or because the DIEP_NODOWNLOAD flag was passed.
2746 */
2747 #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
2748
2749 /*
2750 * The parameters of the effect were successfully updated by
2751 * IDirectInputEffect::SetParameters, but in order to change
2752 * the parameters, the effect needed to be restarted.
2753 */
2754 #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
2755
2756 /*
2757 * The parameters of the effect were successfully updated by
2758 * IDirectInputEffect::SetParameters, but some of them were
2759 * beyond the capabilities of the device and were truncated.
2760 */
2761 #define DI_TRUNCATED ((HRESULT)0x00000008L)
2762
2763 /*
2764 * The settings have been successfully applied but could not be
2765 * persisted.
2766 */
2767 #define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000BL)
2768
2769 /*
2770 * Equal to DI_EFFECTRESTARTED | DI_TRUNCATED.
2771 */
2772 #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
2773
2774 /*
2775 * A SUCCESS code indicating that settings cannot be modified.
2776 */
2777 #define DI_WRITEPROTECT ((HRESULT)0x00000013L)
2778
2779 /*
2780 * The application requires a newer version of DirectInput.
2781 */
2782 #define DIERR_OLDDIRECTINPUTVERSION \
2783 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
2784
2785 /*
2786 * The application was written for an unsupported prerelease version
2787 * of DirectInput.
2788 */
2789 #define DIERR_BETADIRECTINPUTVERSION \
2790 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
2791
2792 /*
2793 * The object could not be created due to an incompatible driver version
2794 * or mismatched or incomplete driver components.
2795 */
2796 #define DIERR_BADDRIVERVER \
2797 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
2798
2799 /*
2800 * The device or device instance or effect is not registered with DirectInput.
2801 */
2802 #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
2803
2804 /*
2805 * The requested object does not exist.
2806 */
2807 #define DIERR_NOTFOUND \
2808 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
2809
2810 /*
2811 * The requested object does not exist.
2812 */
2813 #define DIERR_OBJECTNOTFOUND \
2814 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
2815
2816 /*
2817 * An invalid parameter was passed to the returning function,
2818 * or the object was not in a state that admitted the function
2819 * to be called.
2820 */
2821 #define DIERR_INVALIDPARAM E_INVALIDARG
2822
2823 /*
2824 * The specified interface is not supported by the object
2825 */
2826 #define DIERR_NOINTERFACE E_NOINTERFACE
2827
2828 /*
2829 * An undetermined error occured inside the DInput subsystem
2830 */
2831 #define DIERR_GENERIC E_FAIL
2832
2833 /*
2834 * The DInput subsystem couldn't allocate sufficient memory to complete the
2835 * caller's request.
2836 */
2837 #define DIERR_OUTOFMEMORY E_OUTOFMEMORY
2838
2839 /*
2840 * The function called is not supported at this time
2841 */
2842 #define DIERR_UNSUPPORTED E_NOTIMPL
2843
2844 /*
2845 * This object has not been initialized
2846 */
2847 #define DIERR_NOTINITIALIZED \
2848 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
2849
2850 /*
2851 * This object is already initialized
2852 */
2853 #define DIERR_ALREADYINITIALIZED \
2854 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
2855
2856 /*
2857 * This object does not support aggregation
2858 */
2859 #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
2860
2861 /*
2862 * Another app has a higher priority level, preventing this call from
2863 * succeeding.
2864 */
2865 #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
2866
2867 /*
2868 * Access to the device has been lost. It must be re-acquired.
2869 */
2870 #define DIERR_INPUTLOST \
2871 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
2872
2873 /*
2874 * The operation cannot be performed while the device is acquired.
2875 */
2876 #define DIERR_ACQUIRED \
2877 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
2878
2879 /*
2880 * The operation cannot be performed unless the device is acquired.
2881 */
2882 #define DIERR_NOTACQUIRED \
2883 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
2884
2885 /*
2886 * The specified property cannot be changed.
2887 */
2888 #define DIERR_READONLY E_ACCESSDENIED
2889
2890 /*
2891 * The device already has an event notification associated with it.
2892 */
2893 #define DIERR_HANDLEEXISTS E_ACCESSDENIED
2894
2895 /*
2896 * Data is not yet available.
2897 */
2898 #ifndef E_PENDING
2899 #define E_PENDING 0x8000000AL
2900 #endif
2901
2902 /*
2903 * Unable to IDirectInputJoyConfig_Acquire because the user
2904 * does not have sufficient privileges to change the joystick
2905 * configuration.
2906 */
2907 #define DIERR_INSUFFICIENTPRIVS 0x80040200L
2908
2909 /*
2910 * The device is full.
2911 */
2912 #define DIERR_DEVICEFULL 0x80040201L
2913
2914 /*
2915 * Not all the requested information fit into the buffer.
2916 */
2917 #define DIERR_MOREDATA 0x80040202L
2918
2919 /*
2920 * The effect is not downloaded.
2921 */
2922 #define DIERR_NOTDOWNLOADED 0x80040203L
2923
2924 /*
2925 * The device cannot be reinitialized because there are still effects
2926 * attached to it.
2927 */
2928 #define DIERR_HASEFFECTS 0x80040204L
2929
2930 /*
2931 * The operation cannot be performed unless the device is acquired
2932 * in DISCL_EXCLUSIVE mode.
2933 */
2934 #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
2935
2936 /*
2937 * The effect could not be downloaded because essential information
2938 * is missing. For example, no axes have been associated with the
2939 * effect, or no type-specific information has been created.
2940 */
2941 #define DIERR_INCOMPLETEEFFECT 0x80040206L
2942
2943 /*
2944 * Attempted to read buffered device data from a device that is
2945 * not buffered.
2946 */
2947 #define DIERR_NOTBUFFERED 0x80040207L
2948
2949 /*
2950 * An attempt was made to modify parameters of an effect while it is
2951 * playing. Not all hardware devices support altering the parameters
2952 * of an effect while it is playing.
2953 */
2954 #define DIERR_EFFECTPLAYING 0x80040208L
2955
2956 /*
2957 * The operation could not be completed because the device is not
2958 * plugged in.
2959 */
2960 #define DIERR_UNPLUGGED 0x80040209L
2961
2962 /*
2963 * SendDeviceData failed because more information was requested
2964 * to be sent than can be sent to the device. Some devices have
2965 * restrictions on how much data can be sent to them. (For example,
2966 * there might be a limit on the number of buttons that can be
2967 * pressed at once.)
2968 */
2969 #define DIERR_REPORTFULL 0x8004020AL
2970
2971
2972 /*
2973 * A mapper file function failed because reading or writing the user or IHV
2974 * settings file failed.
2975 */
2976 #define DIERR_MAPFILEFAIL 0x8004020BL
2977
2978
2979 /*--- DINPUT Mapper Definitions: New for Dx8 ---*/
2980
2981
2982 /*--- Keyboard
2983 Physical Keyboard Device ---*/
2984
2985 #define DIKEYBOARD_ESCAPE 0x81000401
2986 #define DIKEYBOARD_1 0x81000402
2987 #define DIKEYBOARD_2 0x81000403
2988 #define DIKEYBOARD_3 0x81000404
2989 #define DIKEYBOARD_4 0x81000405
2990 #define DIKEYBOARD_5 0x81000406
2991 #define DIKEYBOARD_6 0x81000407
2992 #define DIKEYBOARD_7 0x81000408
2993 #define DIKEYBOARD_8 0x81000409
2994 #define DIKEYBOARD_9 0x8100040A
2995 #define DIKEYBOARD_0 0x8100040B
2996 #define DIKEYBOARD_MINUS 0x8100040C /* - on main keyboard */
2997 #define DIKEYBOARD_EQUALS 0x8100040D
2998 #define DIKEYBOARD_BACK 0x8100040E /* backspace */
2999 #define DIKEYBOARD_TAB 0x8100040F
3000 #define DIKEYBOARD_Q 0x81000410
3001 #define DIKEYBOARD_W 0x81000411
3002 #define DIKEYBOARD_E 0x81000412
3003 #define DIKEYBOARD_R 0x81000413
3004 #define DIKEYBOARD_T 0x81000414
3005 #define DIKEYBOARD_Y 0x81000415
3006 #define DIKEYBOARD_U 0x81000416
3007 #define DIKEYBOARD_I 0x81000417
3008 #define DIKEYBOARD_O 0x81000418
3009 #define DIKEYBOARD_P 0x81000419
3010 #define DIKEYBOARD_LBRACKET 0x8100041A
3011 #define DIKEYBOARD_RBRACKET 0x8100041B
3012 #define DIKEYBOARD_RETURN 0x8100041C /* Enter on main keyboard */
3013 #define DIKEYBOARD_LCONTROL 0x8100041D
3014 #define DIKEYBOARD_A 0x8100041E
3015 #define DIKEYBOARD_S 0x8100041F
3016 #define DIKEYBOARD_D 0x81000420
3017 #define DIKEYBOARD_F 0x81000421
3018 #define DIKEYBOARD_G 0x81000422
3019 #define DIKEYBOARD_H 0x81000423
3020 #define DIKEYBOARD_J 0x81000424
3021 #define DIKEYBOARD_K 0x81000425
3022 #define DIKEYBOARD_L 0x81000426
3023 #define DIKEYBOARD_SEMICOLON 0x81000427
3024 #define DIKEYBOARD_APOSTROPHE 0x81000428
3025 #define DIKEYBOARD_GRAVE 0x81000429 /* accent grave */
3026 #define DIKEYBOARD_LSHIFT 0x8100042A
3027 #define DIKEYBOARD_BACKSLASH 0x8100042B
3028 #define DIKEYBOARD_Z 0x8100042C
3029 #define DIKEYBOARD_X 0x8100042D
3030 #define DIKEYBOARD_C 0x8100042E
3031 #define DIKEYBOARD_V 0x8100042F
3032 #define DIKEYBOARD_B 0x81000430
3033 #define DIKEYBOARD_N 0x81000431
3034 #define DIKEYBOARD_M 0x81000432
3035 #define DIKEYBOARD_COMMA 0x81000433
3036 #define DIKEYBOARD_PERIOD 0x81000434 /* . on main keyboard */
3037 #define DIKEYBOARD_SLASH 0x81000435 /* / on main keyboard */
3038 #define DIKEYBOARD_RSHIFT 0x81000436
3039 #define DIKEYBOARD_MULTIPLY 0x81000437 /* * on numeric keypad */
3040 #define DIKEYBOARD_LMENU 0x81000438 /* left Alt */
3041 #define DIKEYBOARD_SPACE 0x81000439
3042 #define DIKEYBOARD_CAPITAL 0x8100043A
3043 #define DIKEYBOARD_F1 0x8100043B
3044 #define DIKEYBOARD_F2 0x8100043C
3045 #define DIKEYBOARD_F3 0x8100043D
3046 #define DIKEYBOARD_F4 0x8100043E
3047 #define DIKEYBOARD_F5 0x8100043F
3048 #define DIKEYBOARD_F6 0x81000440
3049 #define DIKEYBOARD_F7 0x81000441
3050 #define DIKEYBOARD_F8 0x81000442
3051 #define DIKEYBOARD_F9 0x81000443
3052 #define DIKEYBOARD_F10 0x81000444
3053 #define DIKEYBOARD_NUMLOCK 0x81000445
3054 #define DIKEYBOARD_SCROLL 0x81000446 /* Scroll Lock */
3055 #define DIKEYBOARD_NUMPAD7 0x81000447
3056 #define DIKEYBOARD_NUMPAD8 0x81000448
3057 #define DIKEYBOARD_NUMPAD9 0x81000449
3058 #define DIKEYBOARD_SUBTRACT 0x8100044A /* - on numeric keypad */
3059 #define DIKEYBOARD_NUMPAD4 0x8100044B
3060 #define DIKEYBOARD_NUMPAD5 0x8100044C
3061 #define DIKEYBOARD_NUMPAD6 0x8100044D
3062 #define DIKEYBOARD_ADD 0x8100044E /* + on numeric keypad */
3063 #define DIKEYBOARD_NUMPAD1 0x8100044F
3064 #define DIKEYBOARD_NUMPAD2 0x81000450
3065 #define DIKEYBOARD_NUMPAD3 0x81000451
3066 #define DIKEYBOARD_NUMPAD0 0x81000452
3067 #define DIKEYBOARD_DECIMAL 0x81000453 /* . on numeric keypad */
3068 #define DIKEYBOARD_OEM_102 0x81000456 /* <> or \| on RT 102-key keyboard (Non-U.S.) */
3069 #define DIKEYBOARD_F11 0x81000457
3070 #define DIKEYBOARD_F12 0x81000458
3071 #define DIKEYBOARD_F13 0x81000464 /* (NEC PC98) */
3072 #define DIKEYBOARD_F14 0x81000465 /* (NEC PC98) */
3073 #define DIKEYBOARD_F15 0x81000466 /* (NEC PC98) */
3074 #define DIKEYBOARD_KANA 0x81000470 /* (Japanese keyboard) */
3075 #define DIKEYBOARD_ABNT_C1 0x81000473 /* /? on Brazilian keyboard */
3076 #define DIKEYBOARD_CONVERT 0x81000479 /* (Japanese keyboard) */
3077 #define DIKEYBOARD_NOCONVERT 0x8100047B /* (Japanese keyboard) */
3078 #define DIKEYBOARD_YEN 0x8100047D /* (Japanese keyboard) */
3079 #define DIKEYBOARD_ABNT_C2 0x8100047E /* Numpad . on Brazilian keyboard */
3080 #define DIKEYBOARD_NUMPADEQUALS 0x8100048D /* = on numeric keypad (NEC PC98) */
3081 #define DIKEYBOARD_PREVTRACK 0x81000490 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
3082 #define DIKEYBOARD_AT 0x81000491 /* (NEC PC98) */
3083 #define DIKEYBOARD_COLON 0x81000492 /* (NEC PC98) */
3084 #define DIKEYBOARD_UNDERLINE 0x81000493 /* (NEC PC98) */
3085 #define DIKEYBOARD_KANJI 0x81000494 /* (Japanese keyboard) */
3086 #define DIKEYBOARD_STOP 0x81000495 /* (NEC PC98) */
3087 #define DIKEYBOARD_AX 0x81000496 /* (Japan AX) */
3088 #define DIKEYBOARD_UNLABELED 0x81000497 /* (J3100) */
3089 #define DIKEYBOARD_NEXTTRACK 0x81000499 /* Next Track */
3090 #define DIKEYBOARD_NUMPADENTER 0x8100049C /* Enter on numeric keypad */
3091 #define DIKEYBOARD_RCONTROL 0x8100049D
3092 #define DIKEYBOARD_MUTE 0x810004A0 /* Mute */
3093 #define DIKEYBOARD_CALCULATOR 0x810004A1 /* Calculator */
3094 #define DIKEYBOARD_PLAYPAUSE 0x810004A2 /* Play / Pause */
3095 #define DIKEYBOARD_MEDIASTOP 0x810004A4 /* Media Stop */
3096 #define DIKEYBOARD_VOLUMEDOWN 0x810004AE /* Volume - */
3097 #define DIKEYBOARD_VOLUMEUP 0x810004B0 /* Volume + */
3098 #define DIKEYBOARD_WEBHOME 0x810004B2 /* Web home */
3099 #define DIKEYBOARD_NUMPADCOMMA 0x810004B3 /* , on numeric keypad (NEC PC98) */
3100 #define DIKEYBOARD_DIVIDE 0x810004B5 /* / on numeric keypad */
3101 #define DIKEYBOARD_SYSRQ 0x810004B7
3102 #define DIKEYBOARD_RMENU 0x810004B8 /* right Alt */
3103 #define DIKEYBOARD_PAUSE 0x810004C5 /* Pause */
3104 #define DIKEYBOARD_HOME 0x810004C7 /* Home on arrow keypad */
3105 #define DIKEYBOARD_UP 0x810004C8 /* UpArrow on arrow keypad */
3106 #define DIKEYBOARD_PRIOR 0x810004C9 /* PgUp on arrow keypad */
3107 #define DIKEYBOARD_LEFT 0x810004CB /* LeftArrow on arrow keypad */
3108 #define DIKEYBOARD_RIGHT 0x810004CD /* RightArrow on arrow keypad */
3109 #define DIKEYBOARD_END 0x810004CF /* End on arrow keypad */
3110 #define DIKEYBOARD_DOWN 0x810004D0 /* DownArrow on arrow keypad */
3111 #define DIKEYBOARD_NEXT 0x810004D1 /* PgDn on arrow keypad */
3112 #define DIKEYBOARD_INSERT 0x810004D2 /* Insert on arrow keypad */
3113 #define DIKEYBOARD_DELETE 0x810004D3 /* Delete on arrow keypad */
3114 #define DIKEYBOARD_LWIN 0x810004DB /* Left Windows key */
3115 #define DIKEYBOARD_RWIN 0x810004DC /* Right Windows key */
3116 #define DIKEYBOARD_APPS 0x810004DD /* AppMenu key */
3117 #define DIKEYBOARD_POWER 0x810004DE /* System Power */
3118 #define DIKEYBOARD_SLEEP 0x810004DF /* System Sleep */
3119 #define DIKEYBOARD_WAKE 0x810004E3 /* System Wake */
3120 #define DIKEYBOARD_WEBSEARCH 0x810004E5 /* Web Search */
3121 #define DIKEYBOARD_WEBFAVORITES 0x810004E6 /* Web Favorites */
3122 #define DIKEYBOARD_WEBREFRESH 0x810004E7 /* Web Refresh */
3123 #define DIKEYBOARD_WEBSTOP 0x810004E8 /* Web Stop */
3124 #define DIKEYBOARD_WEBFORWARD 0x810004E9 /* Web Forward */
3125 #define DIKEYBOARD_WEBBACK 0x810004EA /* Web Back */
3126 #define DIKEYBOARD_MYCOMPUTER 0x810004EB /* My Computer */
3127 #define DIKEYBOARD_MAIL 0x810004EC /* Mail */
3128 #define DIKEYBOARD_MEDIASELECT 0x810004ED /* Media Select */
3129
3130
3131 /*--- MOUSE
3132 Physical Mouse Device ---*/
3133
3134 #define DIMOUSE_XAXISAB (0x82000200 |DIMOFS_X ) /* X Axis-absolute: Some mice natively report absolute coordinates */
3135 #define DIMOUSE_YAXISAB (0x82000200 |DIMOFS_Y ) /* Y Axis-absolute: Some mice natively report absolute coordinates */
3136 #define DIMOUSE_XAXIS (0x82000300 |DIMOFS_X ) /* X Axis */
3137 #define DIMOUSE_YAXIS (0x82000300 |DIMOFS_Y ) /* Y Axis */
3138 #define DIMOUSE_WHEEL (0x82000300 |DIMOFS_Z ) /* Z Axis */
3139 #define DIMOUSE_BUTTON0 (0x82000400 |DIMOFS_BUTTON0) /* Button 0 */
3140 #define DIMOUSE_BUTTON1 (0x82000400 |DIMOFS_BUTTON1) /* Button 1 */
3141 #define DIMOUSE_BUTTON2 (0x82000400 |DIMOFS_BUTTON2) /* Button 2 */
3142 #define DIMOUSE_BUTTON3 (0x82000400 |DIMOFS_BUTTON3) /* Button 3 */
3143 #define DIMOUSE_BUTTON4 (0x82000400 |DIMOFS_BUTTON4) /* Button 4 */
3144 #define DIMOUSE_BUTTON5 (0x82000400 |DIMOFS_BUTTON5) /* Button 5 */
3145 #define DIMOUSE_BUTTON6 (0x82000400 |DIMOFS_BUTTON6) /* Button 6 */
3146 #define DIMOUSE_BUTTON7 (0x82000400 |DIMOFS_BUTTON7) /* Button 7 */
3147
3148
3149 /*--- VOICE
3150 Physical Dplay Voice Device ---*/
3151
3152 #define DIVOICE_CHANNEL1 0x83000401
3153 #define DIVOICE_CHANNEL2 0x83000402
3154 #define DIVOICE_CHANNEL3 0x83000403
3155 #define DIVOICE_CHANNEL4 0x83000404
3156 #define DIVOICE_CHANNEL5 0x83000405
3157 #define DIVOICE_CHANNEL6 0x83000406
3158 #define DIVOICE_CHANNEL7 0x83000407
3159 #define DIVOICE_CHANNEL8 0x83000408
3160 #define DIVOICE_TEAM 0x83000409
3161 #define DIVOICE_ALL 0x8300040A
3162 #define DIVOICE_RECORDMUTE 0x8300040B
3163 #define DIVOICE_PLAYBACKMUTE 0x8300040C
3164 #define DIVOICE_TRANSMIT 0x8300040D
3165
3166 #define DIVOICE_VOICECOMMAND 0x83000410
3167
3168
3169 /*--- Driving Simulator - Racing
3170 Vehicle control is primary objective ---*/
3171 #define DIVIRTUAL_DRIVING_RACE 0x01000000
3172 #define DIAXIS_DRIVINGR_STEER 0x01008A01 /* Steering */
3173 #define DIAXIS_DRIVINGR_ACCELERATE 0x01039202 /* Accelerate */
3174 #define DIAXIS_DRIVINGR_BRAKE 0x01041203 /* Brake-Axis */
3175 #define DIBUTTON_DRIVINGR_SHIFTUP 0x01000C01 /* Shift to next higher gear */
3176 #define DIBUTTON_DRIVINGR_SHIFTDOWN 0x01000C02 /* Shift to next lower gear */
3177 #define DIBUTTON_DRIVINGR_VIEW 0x01001C03 /* Cycle through view options */
3178 #define DIBUTTON_DRIVINGR_MENU 0x010004FD /* Show menu options */
3179 /*--- Priority 2 controls ---*/
3180
3181 #define DIAXIS_DRIVINGR_ACCEL_AND_BRAKE 0x01014A04 /* Some devices combine accelerate and brake in a single axis */
3182 #define DIHATSWITCH_DRIVINGR_GLANCE 0x01004601 /* Look around */
3183 #define DIBUTTON_DRIVINGR_BRAKE 0x01004C04 /* Brake-button */
3184 #define DIBUTTON_DRIVINGR_DASHBOARD 0x01004405 /* Select next dashboard option */
3185 #define DIBUTTON_DRIVINGR_AIDS 0x01004406 /* Driver correction aids */
3186 #define DIBUTTON_DRIVINGR_MAP 0x01004407 /* Display Driving Map */
3187 #define DIBUTTON_DRIVINGR_BOOST 0x01004408 /* Turbo Boost */
3188 #define DIBUTTON_DRIVINGR_PIT 0x01004409 /* Pit stop notification */
3189 #define DIBUTTON_DRIVINGR_ACCELERATE_LINK 0x0103D4E0 /* Fallback Accelerate button */
3190 #define DIBUTTON_DRIVINGR_STEER_LEFT_LINK 0x0100CCE4 /* Fallback Steer Left button */
3191 #define DIBUTTON_DRIVINGR_STEER_RIGHT_LINK 0x0100CCEC /* Fallback Steer Right button */
3192 #define DIBUTTON_DRIVINGR_GLANCE_LEFT_LINK 0x0107C4E4 /* Fallback Glance Left button */
3193 #define DIBUTTON_DRIVINGR_GLANCE_RIGHT_LINK 0x0107C4EC /* Fallback Glance Right button */
3194 #define DIBUTTON_DRIVINGR_DEVICE 0x010044FE /* Show input device and controls */
3195 #define DIBUTTON_DRIVINGR_PAUSE 0x010044FC /* Start / Pause / Restart game */
3196
3197 /*--- Driving Simulator - Combat
3198 Combat from within a vehicle is primary objective ---*/
3199 #define DIVIRTUAL_DRIVING_COMBAT 0x02000000
3200 #define DIAXIS_DRIVINGC_STEER 0x02008A01 /* Steering */
3201 #define DIAXIS_DRIVINGC_ACCELERATE 0x02039202 /* Accelerate */
3202 #define DIAXIS_DRIVINGC_BRAKE 0x02041203 /* Brake-axis */
3203 #define DIBUTTON_DRIVINGC_FIRE 0x02000C01 /* Fire */
3204 #define DIBUTTON_DRIVINGC_WEAPONS 0x02000C02 /* Select next weapon */
3205 #define DIBUTTON_DRIVINGC_TARGET 0x02000C03 /* Select next available target */
3206 #define DIBUTTON_DRIVINGC_MENU 0x020004FD /* Show menu options */
3207 /*--- Priority 2 controls ---*/
3208
3209 #define DIAXIS_DRIVINGC_ACCEL_AND_BRAKE 0x02014A04 /* Some devices combine accelerate and brake in a single axis */
3210 #define DIHATSWITCH_DRIVINGC_GLANCE 0x02004601 /* Look around */
3211 #define DIBUTTON_DRIVINGC_SHIFTUP 0x02004C04 /* Shift to next higher gear */
3212 #define DIBUTTON_DRIVINGC_SHIFTDOWN 0x02004C05 /* Shift to next lower gear */
3213 #define DIBUTTON_DRIVINGC_DASHBOARD 0x02004406 /* Select next dashboard option */
3214 #define DIBUTTON_DRIVINGC_AIDS 0x02004407 /* Driver correction aids */
3215 #define DIBUTTON_DRIVINGC_BRAKE 0x02004C08 /* Brake-button */
3216 #define DIBUTTON_DRIVINGC_FIRESECONDARY 0x02004C09 /* Alternative fire button */
3217 #define DIBUTTON_DRIVINGC_ACCELERATE_LINK 0x0203D4E0 /* Fallback Accelerate button */
3218 #define DIBUTTON_DRIVINGC_STEER_LEFT_LINK 0x0200CCE4 /* Fallback Steer Left button */
3219 #define DIBUTTON_DRIVINGC_STEER_RIGHT_LINK 0x0200CCEC /* Fallback Steer Right button */
3220 #define DIBUTTON_DRIVINGC_GLANCE_LEFT_LINK 0x0207C4E4 /* Fallback Glance Left button */
3221 #define DIBUTTON_DRIVINGC_GLANCE_RIGHT_LINK 0x0207C4EC /* Fallback Glance Right button */
3222 #define DIBUTTON_DRIVINGC_DEVICE 0x020044FE /* Show input device and controls */
3223 #define DIBUTTON_DRIVINGC_PAUSE 0x020044FC /* Start / Pause / Restart game */
3224
3225 /*--- Driving Simulator - Tank
3226 Combat from withing a tank is primary objective ---*/
3227 #define DIVIRTUAL_DRIVING_TANK 0x03000000
3228 #define DIAXIS_DRIVINGT_STEER 0x03008A01 /* Turn tank left / right */
3229 #define DIAXIS_DRIVINGT_BARREL 0x03010202 /* Raise / lower barrel */
3230 #define DIAXIS_DRIVINGT_ACCELERATE 0x03039203 /* Accelerate */
3231 #define DIAXIS_DRIVINGT_ROTATE 0x03020204 /* Turn barrel left / right */
3232 #define DIBUTTON_DRIVINGT_FIRE 0x03000C01 /* Fire */
3233 #define DIBUTTON_DRIVINGT_WEAPONS 0x03000C02 /* Select next weapon */
3234 #define DIBUTTON_DRIVINGT_TARGET 0x03000C03 /* Selects next available target */
3235 #define DIBUTTON_DRIVINGT_MENU 0x030004FD /* Show menu options */
3236 /*--- Priority 2 controls ---*/
3237
3238 #define DIHATSWITCH_DRIVINGT_GLANCE 0x03004601 /* Look around */
3239 #define DIAXIS_DRIVINGT_BRAKE 0x03045205 /* Brake-axis */
3240 #define DIAXIS_DRIVINGT_ACCEL_AND_BRAKE 0x03014A06 /* Some devices combine accelerate and brake in a single axis */
3241 #define DIBUTTON_DRIVINGT_VIEW 0x03005C04 /* Cycle through view options */
3242 #define DIBUTTON_DRIVINGT_DASHBOARD 0x03005C05 /* Select next dashboard option */
3243 #define DIBUTTON_DRIVINGT_BRAKE 0x03004C06 /* Brake-button */
3244 #define DIBUTTON_DRIVINGT_FIRESECONDARY 0x03004C07 /* Alternative fire button */
3245 #define DIBUTTON_DRIVINGT_ACCELERATE_LINK 0x0303D4E0 /* Fallback Accelerate button */
3246 #define DIBUTTON_DRIVINGT_STEER_LEFT_LINK 0x0300CCE4 /* Fallback Steer Left button */
3247 #define DIBUTTON_DRIVINGT_STEER_RIGHT_LINK 0x0300CCEC /* Fallback Steer Right button */
3248 #define DIBUTTON_DRIVINGT_BARREL_UP_LINK 0x030144E0 /* Fallback Barrel up button */
3249 #define DIBUTTON_DRIVINGT_BARREL_DOWN_LINK 0x030144E8 /* Fallback Barrel down button */
3250 #define DIBUTTON_DRIVINGT_ROTATE_LEFT_LINK 0x030244E4 /* Fallback Rotate left button */
3251 #define DIBUTTON_DRIVINGT_ROTATE_RIGHT_LINK 0x030244EC /* Fallback Rotate right button */
3252 #define DIBUTTON_DRIVINGT_GLANCE_LEFT_LINK 0x0307C4E4 /* Fallback Glance Left button */
3253 #define DIBUTTON_DRIVINGT_GLANCE_RIGHT_LINK 0x0307C4EC /* Fallback Glance Right button */
3254 #define DIBUTTON_DRIVINGT_DEVICE 0x030044FE /* Show input device and controls */
3255 #define DIBUTTON_DRIVINGT_PAUSE 0x030044FC /* Start / Pause / Restart game */
3256
3257 /*--- Flight Simulator - Civilian
3258 Plane control is the primary objective ---*/
3259 #define DIVIRTUAL_FLYING_CIVILIAN 0x04000000
3260 #define DIAXIS_FLYINGC_BANK 0x04008A01 /* Roll ship left / right */
3261 #define DIAXIS_FLYINGC_PITCH 0x04010A02 /* Nose up / down */
3262 #define DIAXIS_FLYINGC_THROTTLE 0x04039203 /* Throttle */
3263 #define DIBUTTON_FLYINGC_VIEW 0x04002401 /* Cycle through view options */
3264 #define DIBUTTON_FLYINGC_DISPLAY 0x04002402 /* Select next dashboard / heads up display option */
3265 #define DIBUTTON_FLYINGC_GEAR 0x04002C03 /* Gear up / down */
3266 #define DIBUTTON_FLYINGC_MENU 0x040004FD /* Show menu options */
3267 /*--- Priority 2 controls ---*/
3268
3269 #define DIHATSWITCH_FLYINGC_GLANCE 0x04004601 /* Look around */
3270 #define DIAXIS_FLYINGC_BRAKE 0x04046A04 /* Apply Brake */
3271 #define DIAXIS_FLYINGC_RUDDER 0x04025205 /* Yaw ship left/right */
3272 #define DIAXIS_FLYINGC_FLAPS 0x04055A06 /* Flaps */
3273 #define DIBUTTON_FLYINGC_FLAPSUP 0x04006404 /* Increment stepping up until fully retracted */
3274 #define DIBUTTON_FLYINGC_FLAPSDOWN 0x04006405 /* Decrement stepping down until fully extended */
3275 #define DIBUTTON_FLYINGC_BRAKE_LINK 0x04046CE0 /* Fallback brake button */
3276 #define DIBUTTON_FLYINGC_FASTER_LINK 0x0403D4E0 /* Fallback throttle up button */
3277 #define DIBUTTON_FLYINGC_SLOWER_LINK 0x0403D4E8 /* Fallback throttle down button */
3278 #define DIBUTTON_FLYINGC_GLANCE_LEFT_LINK 0x0407C4E4 /* Fallback Glance Left button */
3279 #define DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK 0x0407C4EC /* Fallback Glance Right button */
3280 #define DIBUTTON_FLYINGC_GLANCE_UP_LINK 0x0407C4E0 /* Fallback Glance Up button */
3281 #define DIBUTTON_FLYINGC_GLANCE_DOWN_LINK 0x0407C4E8 /* Fallback Glance Down button */
3282 #define DIBUTTON_FLYINGC_DEVICE 0x040044FE /* Show input device and controls */
3283 #define DIBUTTON_FLYINGC_PAUSE 0x040044FC /* Start / Pause / Restart game */
3284
3285 /*--- Flight Simulator - Military
3286 Aerial combat is the primary objective ---*/
3287 #define DIVIRTUAL_FLYING_MILITARY 0x05000000
3288 #define DIAXIS_FLYINGM_BANK 0x05008A01 /* Bank - Roll ship left / right */
3289 #define DIAXIS_FLYINGM_PITCH 0x05010A02 /* Pitch - Nose up / down */
3290 #define DIAXIS_FLYINGM_THROTTLE 0x05039203 /* Throttle - faster / slower */
3291 #define DIBUTTON_FLYINGM_FIRE 0x05000C01 /* Fire */
3292 #define DIBUTTON_FLYINGM_WEAPONS 0x05000C02 /* Select next weapon */
3293 #define DIBUTTON_FLYINGM_TARGET 0x05000C03 /* Selects next available target */
3294 #define DIBUTTON_FLYINGM_MENU 0x050004FD /* Show menu options */
3295 /*--- Priority 2 controls ---*/
3296
3297 #define DIHATSWITCH_FLYINGM_GLANCE 0x05004601 /* Look around */
3298 #define DIBUTTON_FLYINGM_COUNTER 0x05005C04 /* Activate counter measures */
3299 #define DIAXIS_FLYINGM_RUDDER 0x05024A04 /* Rudder - Yaw ship left/right */
3300 #define DIAXIS_FLYINGM_BRAKE 0x05046205 /* Brake-axis */
3301 #define DIBUTTON_FLYINGM_VIEW 0x05006405 /* Cycle through view options */
3302 #define DIBUTTON_FLYINGM_DISPLAY 0x05006406 /* Select next dashboard option */
3303 #define DIAXIS_FLYINGM_FLAPS 0x05055206 /* Flaps */
3304 #define DIBUTTON_FLYINGM_FLAPSUP 0x05005407 /* Increment stepping up until fully retracted */
3305 #define DIBUTTON_FLYINGM_FLAPSDOWN 0x05005408 /* Decrement stepping down until fully extended */
3306 #define DIBUTTON_FLYINGM_FIRESECONDARY 0x05004C09 /* Alternative fire button */
3307 #define DIBUTTON_FLYINGM_GEAR 0x0500640A /* Gear up / down */
3308 #define DIBUTTON_FLYINGM_BRAKE_LINK 0x050464E0 /* Fallback brake button */
3309 #define DIBUTTON_FLYINGM_FASTER_LINK 0x0503D4E0 /* Fallback throttle up button */
3310 #define DIBUTTON_FLYINGM_SLOWER_LINK 0x0503D4E8 /* Fallback throttle down button */
3311 #define DIBUTTON_FLYINGM_GLANCE_LEFT_LINK 0x0507C4E4 /* Fallback Glance Left button */
3312 #define DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK 0x0507C4EC /* Fallback Glance Right button */
3313 #define DIBUTTON_FLYINGM_GLANCE_UP_LINK 0x0507C4E0 /* Fallback Glance Up button */
3314 #define DIBUTTON_FLYINGM_GLANCE_DOWN_LINK 0x0507C4E8 /* Fallback Glance Down button */
3315 #define DIBUTTON_FLYINGM_DEVICE 0x050044FE /* Show input device and controls */
3316 #define DIBUTTON_FLYINGM_PAUSE 0x050044FC /* Start / Pause / Restart game */
3317
3318 /*--- Flight Simulator - Combat Helicopter
3319 Combat from helicopter is primary objective ---*/
3320 #define DIVIRTUAL_FLYING_HELICOPTER 0x06000000
3321 #define DIAXIS_FLYINGH_BANK 0x06008A01 /* Bank - Roll ship left / right */
3322 #define DIAXIS_FLYINGH_PITCH 0x06010A02 /* Pitch - Nose up / down */
3323 #define DIAXIS_FLYINGH_COLLECTIVE 0x06018A03 /* Collective - Blade pitch/power */
3324 #define DIBUTTON_FLYINGH_FIRE 0x06001401 /* Fire */
3325 #define DIBUTTON_FLYINGH_WEAPONS 0x06001402 /* Select next weapon */
3326 #define DIBUTTON_FLYINGH_TARGET 0x06001403 /* Selects next available target */
3327 #define DIBUTTON_FLYINGH_MENU 0x060004FD /* Show menu options */
3328 /*--- Priority 2 controls ---*/
3329
3330 #define DIHATSWITCH_FLYINGH_GLANCE 0x06004601 /* Look around */
3331 #define DIAXIS_FLYINGH_TORQUE 0x06025A04 /* Torque - Rotate ship around left / right axis */
3332 #define DIAXIS_FLYINGH_THROTTLE 0x0603DA05 /* Throttle */
3333 #define DIBUTTON_FLYINGH_COUNTER 0x06005404 /* Activate counter measures */
3334 #define DIBUTTON_FLYINGH_VIEW 0x06006405 /* Cycle through view options */
3335 #define DIBUTTON_FLYINGH_GEAR 0x06006406 /* Gear up / down */
3336 #define DIBUTTON_FLYINGH_FIRESECONDARY 0x06004C07 /* Alternative fire button */
3337 #define DIBUTTON_FLYINGH_FASTER_LINK 0x0603DCE0 /* Fallback throttle up button */
3338 #define DIBUTTON_FLYINGH_SLOWER_LINK 0x0603DCE8 /* Fallback throttle down button */
3339 #define DIBUTTON_FLYINGH_GLANCE_LEFT_LINK 0x0607C4E4 /* Fallback Glance Left button */
3340 #define DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK 0x0607C4EC /* Fallback Glance Right button */
3341 #define DIBUTTON_FLYINGH_GLANCE_UP_LINK 0x0607C4E0 /* Fallback Glance Up button */
3342 #define DIBUTTON_FLYINGH_GLANCE_DOWN_LINK 0x0607C4E8 /* Fallback Glance Down button */
3343 #define DIBUTTON_FLYINGH_DEVICE 0x060044FE /* Show input device and controls */
3344 #define DIBUTTON_FLYINGH_PAUSE 0x060044FC /* Start / Pause / Restart game */
3345
3346 /*--- Space Simulator - Combat
3347 Space Simulator with weapons ---*/
3348 #define DIVIRTUAL_SPACESIM 0x07000000
3349 #define DIAXIS_SPACESIM_LATERAL 0x07008201 /* Move ship left / right */
3350 #define DIAXIS_SPACESIM_MOVE 0x07010202 /* Move ship forward/backward */
3351 #define DIAXIS_SPACESIM_THROTTLE 0x07038203 /* Throttle - Engine speed */
3352 #define DIBUTTON_SPACESIM_FIRE 0x07000401 /* Fire */
3353 #define DIBUTTON_SPACESIM_WEAPONS 0x07000402 /* Select next weapon */
3354 #define DIBUTTON_SPACESIM_TARGET 0x07000403 /* Selects next available target */
3355 #define DIBUTTON_SPACESIM_MENU 0x070004FD /* Show menu options */
3356 /*--- Priority 2 controls ---*/
3357
3358 #define DIHATSWITCH_SPACESIM_GLANCE 0x07004601 /* Look around */
3359 #define DIAXIS_SPACESIM_CLIMB 0x0701C204 /* Climb - Pitch ship up/down */
3360 #define DIAXIS_SPACESIM_ROTATE 0x07024205 /* Rotate - Turn ship left/right */
3361 #define DIBUTTON_SPACESIM_VIEW 0x07004404 /* Cycle through view options */
3362 #define DIBUTTON_SPACESIM_DISPLAY 0x07004405 /* Select next dashboard / heads up display option */
3363 #define DIBUTTON_SPACESIM_RAISE 0x07004406 /* Raise ship while maintaining current pitch */
3364 #define DIBUTTON_SPACESIM_LOWER 0x07004407 /* Lower ship while maintaining current pitch */
3365 #define DIBUTTON_SPACESIM_GEAR 0x07004408 /* Gear up / down */
3366 #define DIBUTTON_SPACESIM_FIRESECONDARY 0x07004409 /* Alternative fire button */
3367 #define DIBUTTON_SPACESIM_LEFT_LINK 0x0700C4E4 /* Fallback move left button */
3368 #define DIBUTTON_SPACESIM_RIGHT_LINK 0x0700C4EC /* Fallback move right button */
3369 #define DIBUTTON_SPACESIM_FORWARD_LINK 0x070144E0 /* Fallback move forward button */
3370 #define DIBUTTON_SPACESIM_BACKWARD_LINK 0x070144E8 /* Fallback move backwards button */
3371 #define DIBUTTON_SPACESIM_FASTER_LINK 0x0703C4E0 /* Fallback throttle up button */
3372 #define DIBUTTON_SPACESIM_SLOWER_LINK 0x0703C4E8 /* Fallback throttle down button */
3373 #define DIBUTTON_SPACESIM_TURN_LEFT_LINK 0x070244E4 /* Fallback turn left button */
3374 #define DIBUTTON_SPACESIM_TURN_RIGHT_LINK 0x070244EC /* Fallback turn right button */
3375 #define DIBUTTON_SPACESIM_GLANCE_LEFT_LINK 0x0707C4E4 /* Fallback Glance Left button */
3376 #define DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK 0x0707C4EC /* Fallback Glance Right button */
3377 #define DIBUTTON_SPACESIM_GLANCE_UP_LINK 0x0707C4E0 /* Fallback Glance Up button */
3378 #define DIBUTTON_SPACESIM_GLANCE_DOWN_LINK 0x0707C4E8 /* Fallback Glance Down button */
3379 #define DIBUTTON_SPACESIM_DEVICE 0x070044FE /* Show input device and controls */
3380 #define DIBUTTON_SPACESIM_PAUSE 0x070044FC /* Start / Pause / Restart game */
3381
3382 /*--- Fighting - First Person
3383 Hand to Hand combat is primary objective ---*/
3384 #define DIVIRTUAL_FIGHTING_HAND2HAND 0x08000000
3385 #define DIAXIS_FIGHTINGH_LATERAL 0x08008201 /* Sidestep left/right */
3386 #define DIAXIS_FIGHTINGH_MOVE 0x08010202 /* Move forward/backward */
3387 #define DIBUTTON_FIGHTINGH_PUNCH 0x08000401 /* Punch */
3388 #define DIBUTTON_FIGHTINGH_KICK 0x08000402 /* Kick */
3389 #define DIBUTTON_FIGHTINGH_BLOCK 0x08000403 /* Block */
3390 #define DIBUTTON_FIGHTINGH_CROUCH 0x08000404 /* Crouch */
3391 #define DIBUTTON_FIGHTINGH_JUMP 0x08000405 /* Jump */
3392 #define DIBUTTON_FIGHTINGH_SPECIAL1 0x08000406 /* Apply first special move */
3393 #define DIBUTTON_FIGHTINGH_SPECIAL2 0x08000407 /* Apply second special move */
3394 #define DIBUTTON_FIGHTINGH_MENU 0x080004FD /* Show menu options */
3395 /*--- Priority 2 controls ---*/
3396
3397 #define DIBUTTON_FIGHTINGH_SELECT 0x08004408 /* Select special move */
3398 #define DIHATSWITCH_FIGHTINGH_SLIDE 0x08004601 /* Look around */
3399 #define DIBUTTON_FIGHTINGH_DISPLAY 0x08004409 /* Shows next on-screen display option */
3400 #define DIAXIS_FIGHTINGH_ROTATE 0x08024203 /* Rotate - Turn body left/right */
3401 #define DIBUTTON_FIGHTINGH_DODGE 0x0800440A /* Dodge */
3402 #define DIBUTTON_FIGHTINGH_LEFT_LINK 0x0800C4E4 /* Fallback left sidestep button */
3403 #define DIBUTTON_FIGHTINGH_RIGHT_LINK 0x0800C4EC /* Fallback right sidestep button */
3404 #define DIBUTTON_FIGHTINGH_FORWARD_LINK 0x080144E0 /* Fallback forward button */
3405 #define DIBUTTON_FIGHTINGH_BACKWARD_LINK 0x080144E8 /* Fallback backward button */
3406 #define DIBUTTON_FIGHTINGH_DEVICE 0x080044FE /* Show input device and controls */
3407 #define DIBUTTON_FIGHTINGH_PAUSE 0x080044FC /* Start / Pause / Restart game */
3408
3409 /*--- Fighting - First Person Shooting
3410 Navigation and combat are primary objectives ---*/
3411 #define DIVIRTUAL_FIGHTING_FPS 0x09000000
3412 #define DIAXIS_FPS_ROTATE 0x09008201 /* Rotate character left/right */
3413 #define DIAXIS_FPS_MOVE 0x09010202 /* Move forward/backward */
3414 #define DIBUTTON_FPS_FIRE 0x09000401 /* Fire */
3415 #define DIBUTTON_FPS_WEAPONS 0x09000402 /* Select next weapon */
3416 #define DIBUTTON_FPS_APPLY 0x09000403 /* Use item */
3417 #define DIBUTTON_FPS_SELECT 0x09000404 /* Select next inventory item */
3418 #define DIBUTTON_FPS_CROUCH 0x09000405 /* Crouch/ climb down/ swim down */
3419 #define DIBUTTON_FPS_JUMP 0x09000406 /* Jump/ climb up/ swim up */
3420 #define DIAXIS_FPS_LOOKUPDOWN 0x09018203 /* Look up / down */
3421 #define DIBUTTON_FPS_STRAFE 0x09000407 /* Enable strafing while active */
3422 #define DIBUTTON_FPS_MENU 0x090004FD /* Show menu options */
3423 /*--- Priority 2 controls ---*/
3424
3425 #define DIHATSWITCH_FPS_GLANCE 0x09004601 /* Look around */
3426 #define DIBUTTON_FPS_DISPLAY 0x09004408 /* Shows next on-screen display option/ map */
3427 #define DIAXIS_FPS_SIDESTEP 0x09024204 /* Sidestep */
3428 #define DIBUTTON_FPS_DODGE 0x09004409 /* Dodge */
3429 #define DIBUTTON_FPS_GLANCEL 0x0900440A /* Glance Left */
3430 #define DIBUTTON_FPS_GLANCER 0x0900440B /* Glance Right */
3431 #define DIBUTTON_FPS_FIRESECONDARY 0x0900440C /* Alternative fire button */
3432 #define DIBUTTON_FPS_ROTATE_LEFT_LINK 0x0900C4E4 /* Fallback rotate left button */
3433 #define DIBUTTON_FPS_ROTATE_RIGHT_LINK 0x0900C4EC /* Fallback rotate right button */
3434 #define DIBUTTON_FPS_FORWARD_LINK 0x090144E0 /* Fallback forward button */
3435 #define DIBUTTON_FPS_BACKWARD_LINK 0x090144E8 /* Fallback backward button */
3436 #define DIBUTTON_FPS_GLANCE_UP_LINK 0x0901C4E0 /* Fallback look up button */
3437 #define DIBUTTON_FPS_GLANCE_DOWN_LINK 0x0901C4E8 /* Fallback look down button */
3438 #define DIBUTTON_FPS_STEP_LEFT_LINK 0x090244E4 /* Fallback step left button */
3439 #define DIBUTTON_FPS_STEP_RIGHT_LINK 0x090244EC /* Fallback step right button */
3440 #define DIBUTTON_FPS_DEVICE 0x090044FE /* Show input device and controls */
3441 #define DIBUTTON_FPS_PAUSE 0x090044FC /* Start / Pause / Restart game */
3442
3443 /*--- Fighting - Third Person action
3444 Perspective of Camera is behind the main character ---*/
3445 #define DIVIRTUAL_FIGHTING_THIRDPERSON 0x0A000000
3446 #define DIAXIS_TPS_TURN 0x0A020201 /* Turn left/right */
3447 #define DIAXIS_TPS_MOVE 0x0A010202 /* Move forward/backward */
3448 #define DIBUTTON_TPS_RUN 0x0A000401 /* Run or walk toggle switch */
3449 #define DIBUTTON_TPS_ACTION 0x0A000402 /* Action Button */
3450 #define DIBUTTON_TPS_SELECT 0x0A000403 /* Select next weapon */
3451 #define DIBUTTON_TPS_USE 0x0A000404 /* Use inventory item currently selected */
3452 #define DIBUTTON_TPS_JUMP 0x0A000405 /* Character Jumps */
3453 #define DIBUTTON_TPS_MENU 0x0A0004FD /* Show menu options */
3454 /*--- Priority 2 controls ---*/
3455
3456 #define DIHATSWITCH_TPS_GLANCE 0x0A004601 /* Look around */
3457 #define DIBUTTON_TPS_VIEW 0x0A004406 /* Select Camera view */
3458 #define DIBUTTON_TPS_STEPLEFT 0x0A004407 /* Character takes a left step */
3459 #define DIBUTTON_TPS_STEPRIGHT 0x0A004408 /* Character takes a right step */
3460 #define DIAXIS_TPS_STEP 0x0A00C203 /* Character steps left/right */
3461 #define DIBUTTON_TPS_DODGE 0x0A004409 /* Character dodges or ducks */
3462 #define DIBUTTON_TPS_INVENTORY 0x0A00440A /* Cycle through inventory */
3463 #define DIBUTTON_TPS_TURN_LEFT_LINK 0x0A0244E4 /* Fallback turn left button */
3464 #define DIBUTTON_TPS_TURN_RIGHT_LINK 0x0A0244EC /* Fallback turn right button */
3465 #define DIBUTTON_TPS_FORWARD_LINK 0x0A0144E0 /* Fallback forward button */
3466 #define DIBUTTON_TPS_BACKWARD_LINK 0x0A0144E8 /* Fallback backward button */
3467 #define DIBUTTON_TPS_GLANCE_UP_LINK 0x0A07C4E0 /* Fallback look up button */
3468 #define DIBUTTON_TPS_GLANCE_DOWN_LINK 0x0A07C4E8 /* Fallback look down button */
3469 #define DIBUTTON_TPS_GLANCE_LEFT_LINK 0x0A07C4E4 /* Fallback glance up button */
3470 #define DIBUTTON_TPS_GLANCE_RIGHT_LINK 0x0A07C4EC /* Fallback glance right button */
3471 #define DIBUTTON_TPS_DEVICE 0x0A0044FE /* Show input device and controls */
3472 #define DIBUTTON_TPS_PAUSE 0x0A0044FC /* Start / Pause / Restart game */
3473
3474 /*--- Strategy - Role Playing
3475 Navigation and problem solving are primary actions ---*/
3476 #define DIVIRTUAL_STRATEGY_ROLEPLAYING 0x0B000000
3477 #define DIAXIS_STRATEGYR_LATERAL 0x0B008201 /* sidestep - left/right */
3478 #define DIAXIS_STRATEGYR_MOVE 0x0B010202 /* move forward/backward */
3479 #define DIBUTTON_STRATEGYR_GET 0x0B000401 /* Acquire item */
3480 #define DIBUTTON_STRATEGYR_APPLY 0x0B000402 /* Use selected item */
3481 #define DIBUTTON_STRATEGYR_SELECT 0x0B000403 /* Select nextitem */
3482 #define DIBUTTON_STRATEGYR_ATTACK 0x0B000404 /* Attack */
3483 #define DIBUTTON_STRATEGYR_CAST 0x0B000405 /* Cast Spell */
3484 #define DIBUTTON_STRATEGYR_CROUCH 0x0B000406 /* Crouch */
3485 #define DIBUTTON_STRATEGYR_JUMP 0x0B000407 /* Jump */
3486 #define DIBUTTON_STRATEGYR_MENU 0x0B0004FD /* Show menu options */
3487 /*--- Priority 2 controls ---*/
3488
3489 #define DIHATSWITCH_STRATEGYR_GLANCE 0x0B004601 /* Look around */
3490 #define DIBUTTON_STRATEGYR_MAP 0x0B004408 /* Cycle through map options */
3491 #define DIBUTTON_STRATEGYR_DISPLAY 0x0B004409 /* Shows next on-screen display option */
3492 #define DIAXIS_STRATEGYR_ROTATE 0x0B024203 /* Turn body left/right */
3493 #define DIBUTTON_STRATEGYR_LEFT_LINK 0x0B00C4E4 /* Fallback sidestep left button */
3494 #define DIBUTTON_STRATEGYR_RIGHT_LINK 0x0B00C4EC /* Fallback sidestep right button */
3495 #define DIBUTTON_STRATEGYR_FORWARD_LINK 0x0B0144E0 /* Fallback move forward button */
3496 #define DIBUTTON_STRATEGYR_BACK_LINK 0x0B0144E8 /* Fallback move backward button */
3497 #define DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK 0x0B0244E4 /* Fallback turn body left button */
3498 #define DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK 0x0B0244EC /* Fallback turn body right button */
3499 #define DIBUTTON_STRATEGYR_DEVICE 0x0B0044FE /* Show input device and controls */
3500 #define DIBUTTON_STRATEGYR_PAUSE 0x0B0044FC /* Start / Pause / Restart game */
3501
3502 /*--- Strategy - Turn based
3503 Navigation and problem solving are primary actions ---*/
3504 #define DIVIRTUAL_STRATEGY_TURN 0x0C000000
3505 #define DIAXIS_STRATEGYT_LATERAL 0x0C008201 /* Sidestep left/right */
3506 #define DIAXIS_STRATEGYT_MOVE 0x0C010202 /* Move forward/backwards */
3507 #define DIBUTTON_STRATEGYT_SELECT 0x0C000401 /* Select unit or object */
3508 #define DIBUTTON_STRATEGYT_INSTRUCT 0x0C000402 /* Cycle through instructions */
3509 #define DIBUTTON_STRATEGYT_APPLY 0x0C000403 /* Apply selected instruction */
3510 #define DIBUTTON_STRATEGYT_TEAM 0x0C000404 /* Select next team / cycle through all */
3511 #define DIBUTTON_STRATEGYT_TURN 0x0C000405 /* Indicate turn over */
3512 #define DIBUTTON_STRATEGYT_MENU 0x0C0004FD /* Show menu options */
3513 /*--- Priority 2 controls ---*/
3514
3515 #define DIBUTTON_STRATEGYT_ZOOM 0x0C004406 /* Zoom - in / out */
3516 #define DIBUTTON_STRATEGYT_MAP 0x0C004407 /* cycle through map options */
3517 #define DIBUTTON_STRATEGYT_DISPLAY 0x0C004408 /* shows next on-screen display options */
3518 #define DIBUTTON_STRATEGYT_LEFT_LINK 0x0C00C4E4 /* Fallback sidestep left button */
3519 #define DIBUTTON_STRATEGYT_RIGHT_LINK 0x0C00C4EC /* Fallback sidestep right button */
3520 #define DIBUTTON_STRATEGYT_FORWARD_LINK 0x0C0144E0 /* Fallback move forward button */
3521 #define DIBUTTON_STRATEGYT_BACK_LINK 0x0C0144E8 /* Fallback move back button */
3522 #define DIBUTTON_STRATEGYT_DEVICE 0x0C0044FE /* Show input device and controls */
3523 #define DIBUTTON_STRATEGYT_PAUSE 0x0C0044FC /* Start / Pause / Restart game */
3524
3525 /*--- Sports - Hunting
3526 Hunting ---*/
3527 #define DIVIRTUAL_SPORTS_HUNTING 0x0D000000
3528 #define DIAXIS_HUNTING_LATERAL 0x0D008201 /* sidestep left/right */
3529 #define DIAXIS_HUNTING_MOVE 0x0D010202 /* move forward/backwards */
3530 #define DIBUTTON_HUNTING_FIRE 0x0D000401 /* Fire selected weapon */
3531 #define DIBUTTON_HUNTING_AIM 0x0D000402 /* Select aim/move */
3532 #define DIBUTTON_HUNTING_WEAPON 0x0D000403 /* Select next weapon */
3533 #define DIBUTTON_HUNTING_BINOCULAR 0x0D000404 /* Look through Binoculars */
3534 #define DIBUTTON_HUNTING_CALL 0x0D000405 /* Make animal call */
3535 #define DIBUTTON_HUNTING_MAP 0x0D000406 /* View Map */
3536 #define DIBUTTON_HUNTING_SPECIAL 0x0D000407 /* Special game operation */
3537 #define DIBUTTON_HUNTING_MENU 0x0D0004FD /* Show menu options */
3538 /*--- Priority 2 controls ---*/
3539
3540 #define DIHATSWITCH_HUNTING_GLANCE 0x0D004601 /* Look around */
3541 #define DIBUTTON_HUNTING_DISPLAY 0x0D004408 /* show next on-screen display option */
3542 #define DIAXIS_HUNTING_ROTATE 0x0D024203 /* Turn body left/right */
3543 #define DIBUTTON_HUNTING_CROUCH 0x0D004409 /* Crouch/ Climb / Swim down */
3544 #define DIBUTTON_HUNTING_JUMP 0x0D00440A /* Jump/ Climb up / Swim up */
3545 #define DIBUTTON_HUNTING_FIRESECONDARY 0x0D00440B /* Alternative fire button */
3546 #define DIBUTTON_HUNTING_LEFT_LINK 0x0D00C4E4 /* Fallback sidestep left button */
3547 #define DIBUTTON_HUNTING_RIGHT_LINK 0x0D00C4EC /* Fallback sidestep right button */
3548 #define DIBUTTON_HUNTING_FORWARD_LINK 0x0D0144E0 /* Fallback move forward button */
3549 #define DIBUTTON_HUNTING_BACK_LINK 0x0D0144E8 /* Fallback move back button */
3550 #define DIBUTTON_HUNTING_ROTATE_LEFT_LINK 0x0D0244E4 /* Fallback turn body left button */
3551 #define DIBUTTON_HUNTING_ROTATE_RIGHT_LINK 0x0D0244EC /* Fallback turn body right button */
3552 #define DIBUTTON_HUNTING_DEVICE 0x0D0044FE /* Show input device and controls */
3553 #define DIBUTTON_HUNTING_PAUSE 0x0D0044FC /* Start / Pause / Restart game */
3554
3555 /*--- Sports - Fishing
3556 Catching Fish is primary objective ---*/
3557 #define DIVIRTUAL_SPORTS_FISHING 0x0E000000
3558 #define DIAXIS_FISHING_LATERAL 0x0E008201 /* sidestep left/right */
3559 #define DIAXIS_FISHING_MOVE 0x0E010202 /* move forward/backwards */
3560 #define DIBUTTON_FISHING_CAST 0x0E000401 /* Cast line */
3561 #define DIBUTTON_FISHING_TYPE 0x0E000402 /* Select cast type */
3562 #define DIBUTTON_FISHING_BINOCULAR 0x0E000403 /* Look through Binocular */
3563 #define DIBUTTON_FISHING_BAIT 0x0E000404 /* Select type of Bait */
3564 #define DIBUTTON_FISHING_MAP 0x0E000405 /* View Map */
3565 #define DIBUTTON_FISHING_MENU 0x0E0004FD /* Show menu options */
3566 /*--- Priority 2 controls ---*/
3567
3568 #define DIHATSWITCH_FISHING_GLANCE 0x0E004601 /* Look around */
3569 #define DIBUTTON_FISHING_DISPLAY 0x0E004406 /* Show next on-screen display option */
3570 #define DIAXIS_FISHING_ROTATE 0x0E024203 /* Turn character left / right */
3571 #define DIBUTTON_FISHING_CROUCH 0x0E004407 /* Crouch/ Climb / Swim down */
3572 #define DIBUTTON_FISHING_JUMP 0x0E004408 /* Jump/ Climb up / Swim up */
3573 #define DIBUTTON_FISHING_LEFT_LINK 0x0E00C4E4 /* Fallback sidestep left button */
3574 #define DIBUTTON_FISHING_RIGHT_LINK 0x0E00C4EC /* Fallback sidestep right button */
3575 #define DIBUTTON_FISHING_FORWARD_LINK 0x0E0144E0 /* Fallback move forward button */
3576 #define DIBUTTON_FISHING_BACK_LINK 0x0E0144E8 /* Fallback move back button */
3577 #define DIBUTTON_FISHING_ROTATE_LEFT_LINK 0x0E0244E4 /* Fallback turn body left button */
3578 #define DIBUTTON_FISHING_ROTATE_RIGHT_LINK 0x0E0244EC /* Fallback turn body right button */
3579 #define DIBUTTON_FISHING_DEVICE 0x0E0044FE /* Show input device and controls */
3580 #define DIBUTTON_FISHING_PAUSE 0x0E0044FC /* Start / Pause / Restart game */
3581
3582 /*--- Sports - Baseball - Batting
3583 Batter control is primary objective ---*/
3584 #define DIVIRTUAL_SPORTS_BASEBALL_BAT 0x0F000000
3585 #define DIAXIS_BASEBALLB_LATERAL 0x0F008201 /* Aim left / right */
3586 #define DIAXIS_BASEBALLB_MOVE 0x0F010202 /* Aim up / down */
3587 #define DIBUTTON_BASEBALLB_SELECT 0x0F000401 /* cycle through swing options */
3588 #define DIBUTTON_BASEBALLB_NORMAL 0x0F000402 /* normal swing */
3589 #define DIBUTTON_BASEBALLB_POWER 0x0F000403 /* swing for the fence */
3590 #define DIBUTTON_BASEBALLB_BUNT 0x0F000404 /* bunt */
3591 #define DIBUTTON_BASEBALLB_STEAL 0x0F000405 /* Base runner attempts to steal a base */
3592 #define DIBUTTON_BASEBALLB_BURST 0x0F000406 /* Base runner invokes burst of speed */
3593 #define DIBUTTON_BASEBALLB_SLIDE 0x0F000407 /* Base runner slides into base */
3594 #define DIBUTTON_BASEBALLB_CONTACT 0x0F000408 /* Contact swing */
3595 #define DIBUTTON_BASEBALLB_MENU 0x0F0004FD /* Show menu options */
3596 /*--- Priority 2 controls ---*/
3597
3598 #define DIBUTTON_BASEBALLB_NOSTEAL 0x0F004409 /* Base runner goes back to a base */
3599 #define DIBUTTON_BASEBALLB_BOX 0x0F00440A /* Enter or exit batting box */
3600 #define DIBUTTON_BASEBALLB_LEFT_LINK 0x0F00C4E4 /* Fallback sidestep left button */
3601 #define DIBUTTON_BASEBALLB_RIGHT_LINK 0x0F00C4EC /* Fallback sidestep right button */
3602 #define DIBUTTON_BASEBALLB_FORWARD_LINK 0x0F0144E0 /* Fallback move forward button */
3603 #define DIBUTTON_BASEBALLB_BACK_LINK 0x0F0144E8 /* Fallback move back button */
3604 #define DIBUTTON_BASEBALLB_DEVICE 0x0F0044FE /* Show input device and controls */
3605 #define DIBUTTON_BASEBALLB_PAUSE 0x0F0044FC /* Start / Pause / Restart game */
3606
3607 /*--- Sports - Baseball - Pitching
3608 Pitcher control is primary objective ---*/
3609 #define DIVIRTUAL_SPORTS_BASEBALL_PITCH 0x10000000
3610 #define DIAXIS_BASEBALLP_LATERAL 0x10008201 /* Aim left / right */
3611 #define DIAXIS_BASEBALLP_MOVE 0x10010202 /* Aim up / down */
3612 #define DIBUTTON_BASEBALLP_SELECT 0x10000401 /* cycle through pitch selections */
3613 #define DIBUTTON_BASEBALLP_PITCH 0x10000402 /* throw pitch */
3614 #define DIBUTTON_BASEBALLP_BASE 0x10000403 /* select base to throw to */
3615 #define DIBUTTON_BASEBALLP_THROW 0x10000404 /* throw to base */
3616 #define DIBUTTON_BASEBALLP_FAKE 0x10000405 /* Fake a throw to a base */
3617 #define DIBUTTON_BASEBALLP_MENU 0x100004FD /* Show menu options */
3618 /*--- Priority 2 controls ---*/
3619
3620 #define DIBUTTON_BASEBALLP_WALK 0x10004406 /* Throw intentional walk / pitch out */
3621 #define DIBUTTON_BASEBALLP_LOOK 0x10004407 /* Look at runners on bases */
3622 #define DIBUTTON_BASEBALLP_LEFT_LINK 0x1000C4E4 /* Fallback sidestep left button */
3623 #define DIBUTTON_BASEBALLP_RIGHT_LINK 0x1000C4EC /* Fallback sidestep right button */
3624 #define DIBUTTON_BASEBALLP_FORWARD_LINK 0x100144E0 /* Fallback move forward button */
3625 #define DIBUTTON_BASEBALLP_BACK_LINK 0x100144E8 /* Fallback move back button */
3626 #define DIBUTTON_BASEBALLP_DEVICE 0x100044FE /* Show input device and controls */
3627 #define DIBUTTON_BASEBALLP_PAUSE 0x100044FC /* Start / Pause / Restart game */
3628
3629 /*--- Sports - Baseball - Fielding
3630 Fielder control is primary objective ---*/
3631 #define DIVIRTUAL_SPORTS_BASEBALL_FIELD 0x11000000
3632 #define DIAXIS_BASEBALLF_LATERAL 0x11008201 /* Aim left / right */
3633 #define DIAXIS_BASEBALLF_MOVE 0x11010202 /* Aim up / down */
3634 #define DIBUTTON_BASEBALLF_NEAREST 0x11000401 /* Switch to fielder nearest to the ball */
3635 #define DIBUTTON_BASEBALLF_THROW1 0x11000402 /* Make conservative throw */
3636 #define DIBUTTON_BASEBALLF_THROW2 0x11000403 /* Make aggressive throw */
3637 #define DIBUTTON_BASEBALLF_BURST 0x11000404 /* Invoke burst of speed */
3638 #define DIBUTTON_BASEBALLF_JUMP 0x11000405 /* Jump to catch ball */
3639 #define DIBUTTON_BASEBALLF_DIVE 0x11000406 /* Dive to catch ball */
3640 #define DIBUTTON_BASEBALLF_MENU 0x110004FD /* Show menu options */
3641 /*--- Priority 2 controls ---*/
3642
3643 #define DIBUTTON_BASEBALLF_SHIFTIN 0x11004407 /* Shift the infield positioning */
3644 #define DIBUTTON_BASEBALLF_SHIFTOUT 0x11004408 /* Shift the outfield positioning */
3645 #define DIBUTTON_BASEBALLF_AIM_LEFT_LINK 0x1100C4E4 /* Fallback aim left button */
3646 #define DIBUTTON_BASEBALLF_AIM_RIGHT_LINK 0x1100C4EC /* Fallback aim right button */
3647 #define DIBUTTON_BASEBALLF_FORWARD_LINK 0x110144E0 /* Fallback move forward button */
3648 #define DIBUTTON_BASEBALLF_BACK_LINK 0x110144E8 /* Fallback move back button */
3649 #define DIBUTTON_BASEBALLF_DEVICE 0x110044FE /* Show input device and controls */
3650 #define DIBUTTON_BASEBALLF_PAUSE 0x110044FC /* Start / Pause / Restart game */
3651
3652 /*--- Sports - Basketball - Offense
3653 Offense ---*/
3654 #define DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE 0x12000000
3655 #define DIAXIS_BBALLO_LATERAL 0x12008201 /* left / right */
3656 #define DIAXIS_BBALLO_MOVE 0x12010202 /* up / down */
3657 #define DIBUTTON_BBALLO_SHOOT 0x12000401 /* shoot basket */
3658 #define DIBUTTON_BBALLO_DUNK 0x12000402 /* dunk basket */
3659 #define DIBUTTON_BBALLO_PASS 0x12000403 /* throw pass */
3660 #define DIBUTTON_BBALLO_FAKE 0x12000404 /* fake shot or pass */
3661 #define DIBUTTON_BBALLO_SPECIAL 0x12000405 /* apply special move */
3662 #define DIBUTTON_BBALLO_PLAYER 0x12000406 /* select next player */
3663 #define DIBUTTON_BBALLO_BURST 0x12000407 /* invoke burst */
3664 #define DIBUTTON_BBALLO_CALL 0x12000408 /* call for ball / pass to me */
3665 #define DIBUTTON_BBALLO_MENU 0x120004FD /* Show menu options */
3666 /*--- Priority 2 controls ---*/
3667
3668 #define DIHATSWITCH_BBALLO_GLANCE 0x12004601 /* scroll view */
3669 #define DIBUTTON_BBALLO_SCREEN 0x12004409 /* Call for screen */
3670 #define DIBUTTON_BBALLO_PLAY 0x1200440A /* Call for specific offensive play */
3671 #define DIBUTTON_BBALLO_JAB 0x1200440B /* Initiate fake drive to basket */
3672 #define DIBUTTON_BBALLO_POST 0x1200440C /* Perform post move */
3673 #define DIBUTTON_BBALLO_TIMEOUT 0x1200440D /* Time Out */
3674 #define DIBUTTON_BBALLO_SUBSTITUTE 0x1200440E /* substitute one player for another */
3675 #define DIBUTTON_BBALLO_LEFT_LINK 0x1200C4E4 /* Fallback sidestep left button */
3676 #define DIBUTTON_BBALLO_RIGHT_LINK 0x1200C4EC /* Fallback sidestep right button */
3677 #define DIBUTTON_BBALLO_FORWARD_LINK 0x120144E0 /* Fallback move forward button */
3678 #define DIBUTTON_BBALLO_BACK_LINK 0x120144E8 /* Fallback move back button */
3679 #define DIBUTTON_BBALLO_DEVICE 0x120044FE /* Show input device and controls */
3680 #define DIBUTTON_BBALLO_PAUSE 0x120044FC /* Start / Pause / Restart game */
3681
3682 /*--- Sports - Basketball - Defense
3683 Defense ---*/
3684 #define DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE 0x13000000
3685 #define DIAXIS_BBALLD_LATERAL 0x13008201 /* left / right */
3686 #define DIAXIS_BBALLD_MOVE 0x13010202 /* up / down */
3687 #define DIBUTTON_BBALLD_JUMP 0x13000401 /* jump to block shot */
3688 #define DIBUTTON_BBALLD_STEAL 0x13000402 /* attempt to steal ball */
3689 #define DIBUTTON_BBALLD_FAKE 0x13000403 /* fake block or steal */
3690 #define DIBUTTON_BBALLD_SPECIAL 0x13000404 /* apply special move */
3691 #define DIBUTTON_BBALLD_PLAYER 0x13000405 /* select next player */
3692 #define DIBUTTON_BBALLD_BURST 0x13000406 /* invoke burst */
3693 #define DIBUTTON_BBALLD_PLAY 0x13000407 /* call for specific defensive play */
3694 #define DIBUTTON_BBALLD_MENU 0x130004FD /* Show menu options */
3695 /*--- Priority 2 controls ---*/
3696
3697 #define DIHATSWITCH_BBALLD_GLANCE 0x13004601 /* scroll view */
3698 #define DIBUTTON_BBALLD_TIMEOUT 0x13004408 /* Time Out */
3699 #define DIBUTTON_BBALLD_SUBSTITUTE 0x13004409 /* substitute one player for another */
3700 #define DIBUTTON_BBALLD_LEFT_LINK 0x1300C4E4 /* Fallback sidestep left button */
3701 #define DIBUTTON_BBALLD_RIGHT_LINK 0x1300C4EC /* Fallback sidestep right button */
3702 #define DIBUTTON_BBALLD_FORWARD_LINK 0x130144E0 /* Fallback move forward button */
3703 #define DIBUTTON_BBALLD_BACK_LINK 0x130144E8 /* Fallback move back button */
3704 #define DIBUTTON_BBALLD_DEVICE 0x130044FE /* Show input device and controls */
3705 #define DIBUTTON_BBALLD_PAUSE 0x130044FC /* Start / Pause / Restart game */
3706
3707 /*--- Sports - Football - Play
3708 Play selection ---*/
3709 #define DIVIRTUAL_SPORTS_FOOTBALL_FIELD 0x14000000
3710 #define DIBUTTON_FOOTBALLP_PLAY 0x14000401 /* cycle through available plays */
3711 #define DIBUTTON_FOOTBALLP_SELECT 0x14000402 /* select play */
3712 #define DIBUTTON_FOOTBALLP_HELP 0x14000403 /* Bring up pop-up help */
3713 #define DIBUTTON_FOOTBALLP_MENU 0x140004FD /* Show menu options */
3714 /*--- Priority 2 controls ---*/
3715
3716 #define DIBUTTON_FOOTBALLP_DEVICE 0x140044FE /* Show input device and controls */
3717 #define DIBUTTON_FOOTBALLP_PAUSE 0x140044FC /* Start / Pause / Restart game */
3718
3719 /*--- Sports - Football - QB
3720 Offense: Quarterback / Kicker ---*/
3721 #define DIVIRTUAL_SPORTS_FOOTBALL_QBCK 0x15000000
3722 #define DIAXIS_FOOTBALLQ_LATERAL 0x15008201 /* Move / Aim: left / right */
3723 #define DIAXIS_FOOTBALLQ_MOVE 0x15010202 /* Move / Aim: up / down */
3724 #define DIBUTTON_FOOTBALLQ_SELECT 0x15000401 /* Select */
3725 #define DIBUTTON_FOOTBALLQ_SNAP 0x15000402 /* snap ball - start play */
3726 #define DIBUTTON_FOOTBALLQ_JUMP 0x15000403 /* jump over defender */
3727 #define DIBUTTON_FOOTBALLQ_SLIDE 0x15000404 /* Dive/Slide */
3728 #define DIBUTTON_FOOTBALLQ_PASS 0x15000405 /* throws pass to receiver */
3729 #define DIBUTTON_FOOTBALLQ_FAKE 0x15000406 /* pump fake pass or fake kick */
3730 #define DIBUTTON_FOOTBALLQ_MENU 0x150004FD /* Show menu options */
3731 /*--- Priority 2 controls ---*/
3732
3733 #define DIBUTTON_FOOTBALLQ_FAKESNAP 0x15004407 /* Fake snap */
3734 #define DIBUTTON_FOOTBALLQ_MOTION 0x15004408 /* Send receivers in motion */
3735 #define DIBUTTON_FOOTBALLQ_AUDIBLE 0x15004409 /* Change offensive play at line of scrimmage */
3736 #define DIBUTTON_FOOTBALLQ_LEFT_LINK 0x1500C4E4 /* Fallback sidestep left button */
3737 #define DIBUTTON_FOOTBALLQ_RIGHT_LINK 0x1500C4EC /* Fallback sidestep right button */
3738 #define DIBUTTON_FOOTBALLQ_FORWARD_LINK 0x150144E0 /* Fallback move forward button */
3739 #define DIBUTTON_FOOTBALLQ_BACK_LINK 0x150144E8 /* Fallback move back button */
3740 #define DIBUTTON_FOOTBALLQ_DEVICE 0x150044FE /* Show input device and controls */
3741 #define DIBUTTON_FOOTBALLQ_PAUSE 0x150044FC /* Start / Pause / Restart game */
3742
3743 /*--- Sports - Football - Offense
3744 Offense - Runner ---*/
3745 #define DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE 0x16000000
3746 #define DIAXIS_FOOTBALLO_LATERAL 0x16008201 /* Move / Aim: left / right */
3747 #define DIAXIS_FOOTBALLO_MOVE 0x16010202 /* Move / Aim: up / down */
3748 #define DIBUTTON_FOOTBALLO_JUMP 0x16000401 /* jump or hurdle over defender */
3749 #define DIBUTTON_FOOTBALLO_LEFTARM 0x16000402 /* holds out left arm */
3750 #define DIBUTTON_FOOTBALLO_RIGHTARM 0x16000403 /* holds out right arm */
3751 #define DIBUTTON_FOOTBALLO_THROW 0x16000404 /* throw pass or lateral ball to another runner */
3752 #define DIBUTTON_FOOTBALLO_SPIN 0x16000405 /* Spin to avoid defenders */
3753 #define DIBUTTON_FOOTBALLO_MENU 0x160004FD /* Show menu options */
3754 /*--- Priority 2 controls ---*/
3755
3756 #define DIBUTTON_FOOTBALLO_JUKE 0x16004406 /* Use special move to avoid defenders */
3757 #define DIBUTTON_FOOTBALLO_SHOULDER 0x16004407 /* Lower shoulder to run over defenders */
3758 #define DIBUTTON_FOOTBALLO_TURBO 0x16004408 /* Speed burst past defenders */
3759 #define DIBUTTON_FOOTBALLO_DIVE 0x16004409 /* Dive over defenders */
3760 #define DIBUTTON_FOOTBALLO_ZOOM 0x1600440A /* Zoom view in / out */
3761 #define DIBUTTON_FOOTBALLO_SUBSTITUTE 0x1600440B /* substitute one player for another */
3762 #define DIBUTTON_FOOTBALLO_LEFT_LINK 0x1600C4E4 /* Fallback sidestep left button */
3763 #define DIBUTTON_FOOTBALLO_RIGHT_LINK 0x1600C4EC /* Fallback sidestep right button */
3764 #define DIBUTTON_FOOTBALLO_FORWARD_LINK 0x160144E0 /* Fallback move forward button */
3765 #define DIBUTTON_FOOTBALLO_BACK_LINK 0x160144E8 /* Fallback move back button */
3766 #define DIBUTTON_FOOTBALLO_DEVICE 0x160044FE /* Show input device and controls */
3767 #define DIBUTTON_FOOTBALLO_PAUSE 0x160044FC /* Start / Pause / Restart game */
3768
3769 /*--- Sports - Football - Defense
3770 Defense ---*/
3771 #define DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE 0x17000000
3772 #define DIAXIS_FOOTBALLD_LATERAL 0x17008201 /* Move / Aim: left / right */
3773 #define DIAXIS_FOOTBALLD_MOVE 0x17010202 /* Move / Aim: up / down */
3774 #define DIBUTTON_FOOTBALLD_PLAY 0x17000401 /* cycle through available plays */
3775 #define DIBUTTON_FOOTBALLD_SELECT 0x17000402 /* select player closest to the ball */
3776 #define DIBUTTON_FOOTBALLD_JUMP 0x17000403 /* jump to intercept or block */
3777 #define DIBUTTON_FOOTBALLD_TACKLE 0x17000404 /* tackler runner */
3778 #define DIBUTTON_FOOTBALLD_FAKE 0x17000405 /* hold down to fake tackle or intercept */
3779 #define DIBUTTON_FOOTBALLD_SUPERTACKLE 0x17000406 /* Initiate special tackle */
3780 #define DIBUTTON_FOOTBALLD_MENU 0x170004FD /* Show menu options */
3781 /*--- Priority 2 controls ---*/
3782
3783 #define DIBUTTON_FOOTBALLD_SPIN 0x17004407 /* Spin to beat offensive line */
3784 #define DIBUTTON_FOOTBALLD_SWIM 0x17004408 /* Swim to beat the offensive line */
3785 #define DIBUTTON_FOOTBALLD_BULLRUSH 0x17004409 /* Bull rush the offensive line */
3786 #define DIBUTTON_FOOTBALLD_RIP 0x1700440A /* Rip the offensive line */
3787 #define DIBUTTON_FOOTBALLD_AUDIBLE 0x1700440B /* Change defensive play at the line of scrimmage */
3788 #define DIBUTTON_FOOTBALLD_ZOOM 0x1700440C /* Zoom view in / out */
3789 #define DIBUTTON_FOOTBALLD_SUBSTITUTE 0x1700440D /* substitute one player for another */
3790 #define DIBUTTON_FOOTBALLD_LEFT_LINK 0x1700C4E4 /* Fallback sidestep left button */
3791 #define DIBUTTON_FOOTBALLD_RIGHT_LINK 0x1700C4EC /* Fallback sidestep right button */
3792 #define DIBUTTON_FOOTBALLD_FORWARD_LINK 0x170144E0 /* Fallback move forward button */
3793 #define DIBUTTON_FOOTBALLD_BACK_LINK 0x170144E8 /* Fallback move back button */
3794 #define DIBUTTON_FOOTBALLD_DEVICE 0x170044FE /* Show input device and controls */
3795 #define DIBUTTON_FOOTBALLD_PAUSE 0x170044FC /* Start / Pause / Restart game */
3796
3797 /*--- Sports - Golf
3798 ---*/
3799 #define DIVIRTUAL_SPORTS_GOLF 0x18000000
3800 #define DIAXIS_GOLF_LATERAL 0x18008201 /* Move / Aim: left / right */
3801 #define DIAXIS_GOLF_MOVE 0x18010202 /* Move / Aim: up / down */
3802 #define DIBUTTON_GOLF_SWING 0x18000401 /* swing club */
3803 #define DIBUTTON_GOLF_SELECT 0x18000402 /* cycle between: club / swing strength / ball arc / ball spin */
3804 #define DIBUTTON_GOLF_UP 0x18000403 /* increase selection */
3805 #define DIBUTTON_GOLF_DOWN 0x18000404 /* decrease selection */
3806 #define DIBUTTON_GOLF_TERRAIN 0x18000405 /* shows terrain detail */
3807 #define DIBUTTON_GOLF_FLYBY 0x18000406 /* view the hole via a flyby */
3808 #define DIBUTTON_GOLF_MENU 0x180004FD /* Show menu options */
3809 /*--- Priority 2 controls ---*/
3810
3811 #define DIHATSWITCH_GOLF_SCROLL 0x18004601 /* scroll view */
3812 #define DIBUTTON_GOLF_ZOOM 0x18004407 /* Zoom view in / out */
3813 #define DIBUTTON_GOLF_TIMEOUT 0x18004408 /* Call for time out */
3814 #define DIBUTTON_GOLF_SUBSTITUTE 0x18004409 /* substitute one player for another */
3815 #define DIBUTTON_GOLF_LEFT_LINK 0x1800C4E4 /* Fallback sidestep left button */
3816 #define DIBUTTON_GOLF_RIGHT_LINK 0x1800C4EC /* Fallback sidestep right button */
3817 #define DIBUTTON_GOLF_FORWARD_LINK 0x180144E0 /* Fallback move forward button */
3818 #define DIBUTTON_GOLF_BACK_LINK 0x180144E8 /* Fallback move back button */
3819 #define DIBUTTON_GOLF_DEVICE 0x180044FE /* Show input device and controls */
3820 #define DIBUTTON_GOLF_PAUSE 0x180044FC /* Start / Pause / Restart game */
3821
3822 /*--- Sports - Hockey - Offense
3823 Offense ---*/
3824 #define DIVIRTUAL_SPORTS_HOCKEY_OFFENSE 0x19000000
3825 #define DIAXIS_HOCKEYO_LATERAL 0x19008201 /* Move / Aim: left / right */
3826 #define DIAXIS_HOCKEYO_MOVE 0x19010202 /* Move / Aim: up / down */
3827 #define DIBUTTON_HOCKEYO_SHOOT 0x19000401 /* Shoot */
3828 #define DIBUTTON_HOCKEYO_PASS 0x19000402 /* pass the puck */
3829 #define DIBUTTON_HOCKEYO_BURST 0x19000403 /* invoke speed burst */
3830 #define DIBUTTON_HOCKEYO_SPECIAL 0x19000404 /* invoke special move */
3831 #define DIBUTTON_HOCKEYO_FAKE 0x19000405 /* hold down to fake pass or kick */
3832 #define DIBUTTON_HOCKEYO_MENU 0x190004FD /* Show menu options */
3833 /*--- Priority 2 controls ---*/
3834
3835 #define DIHATSWITCH_HOCKEYO_SCROLL 0x19004601 /* scroll view */
3836 #define DIBUTTON_HOCKEYO_ZOOM 0x19004406 /* Zoom view in / out */
3837 #define DIBUTTON_HOCKEYO_STRATEGY 0x19004407 /* Invoke coaching menu for strategy help */
3838 #define DIBUTTON_HOCKEYO_TIMEOUT 0x19004408 /* Call for time out */
3839 #define DIBUTTON_HOCKEYO_SUBSTITUTE 0x19004409 /* substitute one player for another */
3840 #define DIBUTTON_HOCKEYO_LEFT_LINK 0x1900C4E4 /* Fallback sidestep left button */
3841 #define DIBUTTON_HOCKEYO_RIGHT_LINK 0x1900C4EC /* Fallback sidestep right button */
3842 #define DIBUTTON_HOCKEYO_FORWARD_LINK 0x190144E0 /* Fallback move forward button */
3843 #define DIBUTTON_HOCKEYO_BACK_LINK 0x190144E8 /* Fallback move back button */
3844 #define DIBUTTON_HOCKEYO_DEVICE 0x190044FE /* Show input device and controls */
3845 #define DIBUTTON_HOCKEYO_PAUSE 0x190044FC /* Start / Pause / Restart game */
3846
3847 /*--- Sports - Hockey - Defense
3848 Defense ---*/
3849 #define DIVIRTUAL_SPORTS_HOCKEY_DEFENSE 0x1A000000
3850 #define DIAXIS_HOCKEYD_LATERAL 0x1A008201 /* Move / Aim: left / right */
3851 #define DIAXIS_HOCKEYD_MOVE 0x1A010202 /* Move / Aim: up / down */
3852 #define DIBUTTON_HOCKEYD_PLAYER 0x1A000401 /* control player closest to the puck */
3853 #define DIBUTTON_HOCKEYD_STEAL 0x1A000402 /* attempt steal */
3854 #define DIBUTTON_HOCKEYD_BURST 0x1A000403 /* speed burst or body check */
3855 #define DIBUTTON_HOCKEYD_BLOCK 0x1A000404 /* block puck */
3856 #define DIBUTTON_HOCKEYD_FAKE 0x1A000405 /* hold down to fake tackle or intercept */
3857 #define DIBUTTON_HOCKEYD_MENU 0x1A0004FD /* Show menu options */
3858 /*--- Priority 2 controls ---*/
3859
3860 #define DIHATSWITCH_HOCKEYD_SCROLL 0x1A004601 /* scroll view */
3861 #define DIBUTTON_HOCKEYD_ZOOM 0x1A004406 /* Zoom view in / out */
3862 #define DIBUTTON_HOCKEYD_STRATEGY 0x1A004407 /* Invoke coaching menu for strategy help */
3863 #define DIBUTTON_HOCKEYD_TIMEOUT 0x1A004408 /* Call for time out */
3864 #define DIBUTTON_HOCKEYD_SUBSTITUTE 0x1A004409 /* substitute one player for another */
3865 #define DIBUTTON_HOCKEYD_LEFT_LINK 0x1A00C4E4 /* Fallback sidestep left button */
3866 #define DIBUTTON_HOCKEYD_RIGHT_LINK 0x1A00C4EC /* Fallback sidestep right button */
3867 #define DIBUTTON_HOCKEYD_FORWARD_LINK 0x1A0144E0 /* Fallback move forward button */
3868 #define DIBUTTON_HOCKEYD_BACK_LINK 0x1A0144E8 /* Fallback move back button */
3869 #define DIBUTTON_HOCKEYD_DEVICE 0x1A0044FE /* Show input device and controls */
3870 #define DIBUTTON_HOCKEYD_PAUSE 0x1A0044FC /* Start / Pause / Restart game */
3871
3872 /*--- Sports - Hockey - Goalie
3873 Goal tending ---*/
3874 #define DIVIRTUAL_SPORTS_HOCKEY_GOALIE 0x1B000000
3875 #define DIAXIS_HOCKEYG_LATERAL 0x1B008201 /* Move / Aim: left / right */
3876 #define DIAXIS_HOCKEYG_MOVE 0x1B010202 /* Move / Aim: up / down */
3877 #define DIBUTTON_HOCKEYG_PASS 0x1B000401 /* pass puck */
3878 #define DIBUTTON_HOCKEYG_POKE 0x1B000402 /* poke / check / hack */
3879 #define DIBUTTON_HOCKEYG_STEAL 0x1B000403 /* attempt steal */
3880 #define DIBUTTON_HOCKEYG_BLOCK 0x1B000404 /* block puck */
3881 #define DIBUTTON_HOCKEYG_MENU 0x1B0004FD /* Show menu options */
3882 /*--- Priority 2 controls ---*/
3883
3884 #define DIHATSWITCH_HOCKEYG_SCROLL 0x1B004601 /* scroll view */
3885 #define DIBUTTON_HOCKEYG_ZOOM 0x1B004405 /* Zoom view in / out */
3886 #define DIBUTTON_HOCKEYG_STRATEGY 0x1B004406 /* Invoke coaching menu for strategy help */
3887 #define DIBUTTON_HOCKEYG_TIMEOUT 0x1B004407 /* Call for time out */
3888 #define DIBUTTON_HOCKEYG_SUBSTITUTE 0x1B004408 /* substitute one player for another */
3889 #define DIBUTTON_HOCKEYG_LEFT_LINK 0x1B00C4E4 /* Fallback sidestep left button */
3890 #define DIBUTTON_HOCKEYG_RIGHT_LINK 0x1B00C4EC /* Fallback sidestep right button */
3891 #define DIBUTTON_HOCKEYG_FORWARD_LINK 0x1B0144E0 /* Fallback move forward button */
3892 #define DIBUTTON_HOCKEYG_BACK_LINK 0x1B0144E8 /* Fallback move back button */
3893 #define DIBUTTON_HOCKEYG_DEVICE 0x1B0044FE /* Show input device and controls */
3894 #define DIBUTTON_HOCKEYG_PAUSE 0x1B0044FC /* Start / Pause / Restart game */
3895
3896 /*--- Sports - Mountain Biking
3897 ---*/
3898 #define DIVIRTUAL_SPORTS_BIKING_MOUNTAIN 0x1C000000
3899 #define DIAXIS_BIKINGM_TURN 0x1C008201 /* left / right */
3900 #define DIAXIS_BIKINGM_PEDAL 0x1C010202 /* Pedal faster / slower / brake */
3901 #define DIBUTTON_BIKINGM_JUMP 0x1C000401 /* jump over obstacle */
3902 #define DIBUTTON_BIKINGM_CAMERA 0x1C000402 /* switch Camera view */
3903 #define DIBUTTON_BIKINGM_SPECIAL1 0x1C000403 /* perform first special move */
3904 #define DIBUTTON_BIKINGM_SELECT 0x1C000404 /* Select */
3905 #define DIBUTTON_BIKINGM_SPECIAL2 0x1C000405 /* perform second special move */
3906 #define DIBUTTON_BIKINGM_MENU 0x1C0004FD /* Show menu options */
3907 /*--- Priority 2 controls ---*/
3908
3909 #define DIHATSWITCH_BIKINGM_SCROLL 0x1C004601 /* scroll view */
3910 #define DIBUTTON_BIKINGM_ZOOM 0x1C004406 /* Zoom view in / out */
3911 #define DIAXIS_BIKINGM_BRAKE 0x1C044203 /* Brake axis */
3912 #define DIBUTTON_BIKINGM_LEFT_LINK 0x1C00C4E4 /* Fallback turn left button */
3913 #define DIBUTTON_BIKINGM_RIGHT_LINK 0x1C00C4EC /* Fallback turn right button */
3914 #define DIBUTTON_BIKINGM_FASTER_LINK 0x1C0144E0 /* Fallback pedal faster button */
3915 #define DIBUTTON_BIKINGM_SLOWER_LINK 0x1C0144E8 /* Fallback pedal slower button */
3916 #define DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK 0x1C0444E8 /* Fallback brake button */
3917 #define DIBUTTON_BIKINGM_DEVICE 0x1C0044FE /* Show input device and controls */
3918 #define DIBUTTON_BIKINGM_PAUSE 0x1C0044FC /* Start / Pause / Restart game */
3919
3920 /*--- Sports: Skiing / Snowboarding / Skateboarding
3921 ---*/
3922 #define DIVIRTUAL_SPORTS_SKIING 0x1D000000
3923 #define DIAXIS_SKIING_TURN 0x1D008201 /* left / right */
3924 #define DIAXIS_SKIING_SPEED 0x1D010202 /* faster / slower */
3925 #define DIBUTTON_SKIING_JUMP 0x1D000401 /* Jump */
3926 #define DIBUTTON_SKIING_CROUCH 0x1D000402 /* crouch down */
3927 #define DIBUTTON_SKIING_CAMERA 0x1D000403 /* switch Camera view */
3928 #define DIBUTTON_SKIING_SPECIAL1 0x1D000404 /* perform first special move */
3929 #define DIBUTTON_SKIING_SELECT 0x1D000405 /* Select */
3930 #define DIBUTTON_SKIING_SPECIAL2 0x1D000406 /* perform second special move */
3931 #define DIBUTTON_SKIING_MENU 0x1D0004FD /* Show menu options */
3932 /*--- Priority 2 controls ---*/
3933
3934 #define DIHATSWITCH_SKIING_GLANCE 0x1D004601 /* scroll view */
3935 #define DIBUTTON_SKIING_ZOOM 0x1D004407 /* Zoom view in / out */
3936 #define DIBUTTON_SKIING_LEFT_LINK 0x1D00C4E4 /* Fallback turn left button */
3937 #define DIBUTTON_SKIING_RIGHT_LINK 0x1D00C4EC /* Fallback turn right button */
3938 #define DIBUTTON_SKIING_FASTER_LINK 0x1D0144E0 /* Fallback increase speed button */
3939 #define DIBUTTON_SKIING_SLOWER_LINK 0x1D0144E8 /* Fallback decrease speed button */
3940 #define DIBUTTON_SKIING_DEVICE 0x1D0044FE /* Show input device and controls */
3941 #define DIBUTTON_SKIING_PAUSE 0x1D0044FC /* Start / Pause / Restart game */
3942
3943 /*--- Sports - Soccer - Offense
3944 Offense ---*/
3945 #define DIVIRTUAL_SPORTS_SOCCER_OFFENSE 0x1E000000
3946 #define DIAXIS_SOCCERO_LATERAL 0x1E008201 /* Move / Aim: left / right */
3947 #define DIAXIS_SOCCERO_MOVE 0x1E010202 /* Move / Aim: up / down */
3948 #define DIAXIS_SOCCERO_BEND 0x1E018203 /* Bend to soccer shot/pass */
3949 #define DIBUTTON_SOCCERO_SHOOT 0x1E000401 /* Shoot the ball */
3950 #define DIBUTTON_SOCCERO_PASS 0x1E000402 /* Pass */
3951 #define DIBUTTON_SOCCERO_FAKE 0x1E000403 /* Fake */
3952 #define DIBUTTON_SOCCERO_PLAYER 0x1E000404 /* Select next player */
3953 #define DIBUTTON_SOCCERO_SPECIAL1 0x1E000405 /* Apply special move */
3954 #define DIBUTTON_SOCCERO_SELECT 0x1E000406 /* Select special move */
3955 #define DIBUTTON_SOCCERO_MENU 0x1E0004FD /* Show menu options */
3956 /*--- Priority 2 controls ---*/
3957
3958 #define DIHATSWITCH_SOCCERO_GLANCE 0x1E004601 /* scroll view */
3959 #define DIBUTTON_SOCCERO_SUBSTITUTE 0x1E004407 /* Substitute one player for another */
3960 #define DIBUTTON_SOCCERO_SHOOTLOW 0x1E004408 /* Shoot the ball low */
3961 #define DIBUTTON_SOCCERO_SHOOTHIGH 0x1E004409 /* Shoot the ball high */
3962 #define DIBUTTON_SOCCERO_PASSTHRU 0x1E00440A /* Make a thru pass */
3963 #define DIBUTTON_SOCCERO_SPRINT 0x1E00440B /* Sprint / turbo boost */
3964 #define DIBUTTON_SOCCERO_CONTROL 0x1E00440C /* Obtain control of the ball */
3965 #define DIBUTTON_SOCCERO_HEAD 0x1E00440D /* Attempt to head the ball */
3966 #define DIBUTTON_SOCCERO_LEFT_LINK 0x1E00C4E4 /* Fallback sidestep left button */
3967 #define DIBUTTON_SOCCERO_RIGHT_LINK 0x1E00C4EC /* Fallback sidestep right button */
3968 #define DIBUTTON_SOCCERO_FORWARD_LINK 0x1E0144E0 /* Fallback move forward button */
3969 #define DIBUTTON_SOCCERO_BACK_LINK 0x1E0144E8 /* Fallback move back button */
3970 #define DIBUTTON_SOCCERO_DEVICE 0x1E0044FE /* Show input device and controls */
3971 #define DIBUTTON_SOCCERO_PAUSE 0x1E0044FC /* Start / Pause / Restart game */
3972
3973 /*--- Sports - Soccer - Defense
3974 Defense ---*/
3975 #define DIVIRTUAL_SPORTS_SOCCER_DEFENSE 0x1F000000
3976 #define DIAXIS_SOCCERD_LATERAL 0x1F008201 /* Move / Aim: left / right */
3977 #define DIAXIS_SOCCERD_MOVE 0x1F010202 /* Move / Aim: up / down */
3978 #define DIBUTTON_SOCCERD_BLOCK 0x1F000401 /* Attempt to block shot */
3979 #define DIBUTTON_SOCCERD_STEAL 0x1F000402 /* Attempt to steal ball */
3980 #define DIBUTTON_SOCCERD_FAKE 0x1F000403 /* Fake a block or a steal */
3981 #define DIBUTTON_SOCCERD_PLAYER 0x1F000404 /* Select next player */
3982 #define DIBUTTON_SOCCERD_SPECIAL 0x1F000405 /* Apply special move */
3983 #define DIBUTTON_SOCCERD_SELECT 0x1F000406 /* Select special move */
3984 #define DIBUTTON_SOCCERD_SLIDE 0x1F000407 /* Attempt a slide tackle */
3985 #define DIBUTTON_SOCCERD_MENU 0x1F0004FD /* Show menu options */
3986 /*--- Priority 2 controls ---*/
3987
3988 #define DIHATSWITCH_SOCCERD_GLANCE 0x1F004601 /* scroll view */
3989 #define DIBUTTON_SOCCERD_FOUL 0x1F004408 /* Initiate a foul / hard-foul */
3990 #define DIBUTTON_SOCCERD_HEAD 0x1F004409 /* Attempt a Header */
3991 #define DIBUTTON_SOCCERD_CLEAR 0x1F00440A /* Attempt to clear the ball down the field */
3992 #define DIBUTTON_SOCCERD_GOALIECHARGE 0x1F00440B /* Make the goalie charge out of the box */
3993 #define DIBUTTON_SOCCERD_SUBSTITUTE 0x1F00440C /* Substitute one player for another */
3994 #define DIBUTTON_SOCCERD_LEFT_LINK 0x1F00C4E4 /* Fallback sidestep left button */
3995 #define DIBUTTON_SOCCERD_RIGHT_LINK 0x1F00C4EC /* Fallback sidestep right button */
3996 #define DIBUTTON_SOCCERD_FORWARD_LINK 0x1F0144E0 /* Fallback move forward button */
3997 #define DIBUTTON_SOCCERD_BACK_LINK 0x1F0144E8 /* Fallback move back button */
3998 #define DIBUTTON_SOCCERD_DEVICE 0x1F0044FE /* Show input device and controls */
3999 #define DIBUTTON_SOCCERD_PAUSE 0x1F0044FC /* Start / Pause / Restart game */
4000
4001 /*--- Sports - Racquet
4002 Tennis - Table-Tennis - Squash ---*/
4003 #define DIVIRTUAL_SPORTS_RACQUET 0x20000000
4004 #define DIAXIS_RACQUET_LATERAL 0x20008201 /* Move / Aim: left / right */
4005 #define DIAXIS_RACQUET_MOVE 0x20010202 /* Move / Aim: up / down */
4006 #define DIBUTTON_RACQUET_SWING 0x20000401 /* Swing racquet */
4007 #define DIBUTTON_RACQUET_BACKSWING 0x20000402 /* Swing backhand */
4008 #define DIBUTTON_RACQUET_SMASH 0x20000403 /* Smash shot */
4009 #define DIBUTTON_RACQUET_SPECIAL 0x20000404 /* Special shot */
4010 #define DIBUTTON_RACQUET_SELECT 0x20000405 /* Select special shot */
4011 #define DIBUTTON_RACQUET_MENU 0x200004FD /* Show menu options */
4012 /*--- Priority 2 controls ---*/
4013
4014 #define DIHATSWITCH_RACQUET_GLANCE 0x20004601 /* scroll view */
4015 #define DIBUTTON_RACQUET_TIMEOUT 0x20004406 /* Call for time out */
4016 #define DIBUTTON_RACQUET_SUBSTITUTE 0x20004407 /* Substitute one player for another */
4017 #define DIBUTTON_RACQUET_LEFT_LINK 0x2000C4E4 /* Fallback sidestep left button */
4018 #define DIBUTTON_RACQUET_RIGHT_LINK 0x2000C4EC /* Fallback sidestep right button */
4019 #define DIBUTTON_RACQUET_FORWARD_LINK 0x200144E0 /* Fallback move forward button */
4020 #define DIBUTTON_RACQUET_BACK_LINK 0x200144E8 /* Fallback move back button */
4021 #define DIBUTTON_RACQUET_DEVICE 0x200044FE /* Show input device and controls */
4022 #define DIBUTTON_RACQUET_PAUSE 0x200044FC /* Start / Pause / Restart game */
4023
4024 /*--- Arcade- 2D
4025 Side to Side movement ---*/
4026 #define DIVIRTUAL_ARCADE_SIDE2SIDE 0x21000000
4027 #define DIAXIS_ARCADES_LATERAL 0x21008201 /* left / right */
4028 #define DIAXIS_ARCADES_MOVE 0x21010202 /* up / down */
4029 #define DIBUTTON_ARCADES_THROW 0x21000401 /* throw object */
4030 #define DIBUTTON_ARCADES_CARRY 0x21000402 /* carry object */
4031 #define DIBUTTON_ARCADES_ATTACK 0x21000403 /* attack */
4032 #define DIBUTTON_ARCADES_SPECIAL 0x21000404 /* apply special move */
4033 #define DIBUTTON_ARCADES_SELECT 0x21000405 /* select special move */
4034 #define DIBUTTON_ARCADES_MENU 0x210004FD /* Show menu options */
4035 /*--- Priority 2 controls ---*/
4036
4037 #define DIHATSWITCH_ARCADES_VIEW 0x21004601 /* scroll view left / right / up / down */
4038 #define DIBUTTON_ARCADES_LEFT_LINK 0x2100C4E4 /* Fallback sidestep left button */
4039 #define DIBUTTON_ARCADES_RIGHT_LINK 0x2100C4EC /* Fallback sidestep right button */
4040 #define DIBUTTON_ARCADES_FORWARD_LINK 0x210144E0 /* Fallback move forward button */
4041 #define DIBUTTON_ARCADES_BACK_LINK 0x210144E8 /* Fallback move back button */
4042 #define DIBUTTON_ARCADES_VIEW_UP_LINK 0x2107C4E0 /* Fallback scroll view up button */
4043 #define DIBUTTON_ARCADES_VIEW_DOWN_LINK 0x2107C4E8 /* Fallback scroll view down button */
4044 #define DIBUTTON_ARCADES_VIEW_LEFT_LINK 0x2107C4E4 /* Fallback scroll view left button */
4045 #define DIBUTTON_ARCADES_VIEW_RIGHT_LINK 0x2107C4EC /* Fallback scroll view right button */
4046 #define DIBUTTON_ARCADES_DEVICE 0x210044FE /* Show input device and controls */
4047 #define DIBUTTON_ARCADES_PAUSE 0x210044FC /* Start / Pause / Restart game */
4048
4049 /*--- Arcade - Platform Game
4050 Character moves around on screen ---*/
4051 #define DIVIRTUAL_ARCADE_PLATFORM 0x22000000
4052 #define DIAXIS_ARCADEP_LATERAL 0x22008201 /* Left / right */
4053 #define DIAXIS_ARCADEP_MOVE 0x22010202 /* Up / down */
4054 #define DIBUTTON_ARCADEP_JUMP 0x22000401 /* Jump */
4055 #define DIBUTTON_ARCADEP_FIRE 0x22000402 /* Fire */
4056 #define DIBUTTON_ARCADEP_CROUCH 0x22000403 /* Crouch */
4057 #define DIBUTTON_ARCADEP_SPECIAL 0x22000404 /* Apply special move */
4058 #define DIBUTTON_ARCADEP_SELECT 0x22000405 /* Select special move */
4059 #define DIBUTTON_ARCADEP_MENU 0x220004FD /* Show menu options */
4060 /*--- Priority 2 controls ---*/
4061
4062 #define DIHATSWITCH_ARCADEP_VIEW 0x22004601 /* Scroll view */
4063 #define DIBUTTON_ARCADEP_FIRESECONDARY 0x22004406 /* Alternative fire button */
4064 #define DIBUTTON_ARCADEP_LEFT_LINK 0x2200C4E4 /* Fallback sidestep left button */
4065 #define DIBUTTON_ARCADEP_RIGHT_LINK 0x2200C4EC /* Fallback sidestep right button */
4066 #define DIBUTTON_ARCADEP_FORWARD_LINK 0x220144E0 /* Fallback move forward button */
4067 #define DIBUTTON_ARCADEP_BACK_LINK 0x220144E8 /* Fallback move back button */
4068 #define DIBUTTON_ARCADEP_VIEW_UP_LINK 0x2207C4E0 /* Fallback scroll view up button */
4069 #define DIBUTTON_ARCADEP_VIEW_DOWN_LINK 0x2207C4E8 /* Fallback scroll view down button */
4070 #define DIBUTTON_ARCADEP_VIEW_LEFT_LINK 0x2207C4E4 /* Fallback scroll view left button */
4071 #define DIBUTTON_ARCADEP_VIEW_RIGHT_LINK 0x2207C4EC /* Fallback scroll view right button */
4072 #define DIBUTTON_ARCADEP_DEVICE 0x220044FE /* Show input device and controls */
4073 #define DIBUTTON_ARCADEP_PAUSE 0x220044FC /* Start / Pause / Restart game */
4074
4075 /*--- CAD - 2D Object Control
4076 Controls to select and move objects in 2D ---*/
4077 #define DIVIRTUAL_CAD_2DCONTROL 0x23000000
4078 #define DIAXIS_2DCONTROL_LATERAL 0x23008201 /* Move view left / right */
4079 #define DIAXIS_2DCONTROL_MOVE 0x23010202 /* Move view up / down */
4080 #define DIAXIS_2DCONTROL_INOUT 0x23018203 /* Zoom - in / out */
4081 #define DIBUTTON_2DCONTROL_SELECT 0x23000401 /* Select Object */
4082 #define DIBUTTON_2DCONTROL_SPECIAL1 0x23000402 /* Do first special operation */
4083 #define DIBUTTON_2DCONTROL_SPECIAL 0x23000403 /* Select special operation */
4084 #define DIBUTTON_2DCONTROL_SPECIAL2 0x23000404 /* Do second special operation */
4085 #define DIBUTTON_2DCONTROL_MENU 0x230004FD /* Show menu options */
4086 /*--- Priority 2 controls ---*/
4087
4088 #define DIHATSWITCH_2DCONTROL_HATSWITCH 0x23004601 /* Hat switch */
4089 #define DIAXIS_2DCONTROL_ROTATEZ 0x23024204 /* Rotate view clockwise / counterclockwise */
4090 #define DIBUTTON_2DCONTROL_DISPLAY 0x23004405 /* Shows next on-screen display options */
4091 #define DIBUTTON_2DCONTROL_DEVICE 0x230044FE /* Show input device and controls */
4092 #define DIBUTTON_2DCONTROL_PAUSE 0x230044FC /* Start / Pause / Restart game */
4093
4094 /*--- CAD - 3D object control
4095 Controls to select and move objects within a 3D environment ---*/
4096 #define DIVIRTUAL_CAD_3DCONTROL 0x24000000
4097 #define DIAXIS_3DCONTROL_LATERAL 0x24008201 /* Move view left / right */
4098 #define DIAXIS_3DCONTROL_MOVE 0x24010202 /* Move view up / down */
4099 #define DIAXIS_3DCONTROL_INOUT 0x24018203 /* Zoom - in / out */
4100 #define DIBUTTON_3DCONTROL_SELECT 0x24000401 /* Select Object */
4101 #define DIBUTTON_3DCONTROL_SPECIAL1 0x24000402 /* Do first special operation */
4102 #define DIBUTTON_3DCONTROL_SPECIAL 0x24000403 /* Select special operation */
4103 #define DIBUTTON_3DCONTROL_SPECIAL2 0x24000404 /* Do second special operation */
4104 #define DIBUTTON_3DCONTROL_MENU 0x240004FD /* Show menu options */
4105 /*--- Priority 2 controls ---*/
4106
4107 #define DIHATSWITCH_3DCONTROL_HATSWITCH 0x24004601 /* Hat switch */
4108 #define DIAXIS_3DCONTROL_ROTATEX 0x24034204 /* Rotate view forward or up / backward or down */
4109 #define DIAXIS_3DCONTROL_ROTATEY 0x2402C205 /* Rotate view clockwise / counterclockwise */
4110 #define DIAXIS_3DCONTROL_ROTATEZ 0x24024206 /* Rotate view left / right */
4111 #define DIBUTTON_3DCONTROL_DISPLAY 0x24004405 /* Show next on-screen display options */
4112 #define DIBUTTON_3DCONTROL_DEVICE 0x240044FE /* Show input device and controls */
4113 #define DIBUTTON_3DCONTROL_PAUSE 0x240044FC /* Start / Pause / Restart game */
4114
4115 /*--- CAD - 3D Navigation - Fly through
4116 Controls for 3D modeling ---*/
4117 #define DIVIRTUAL_CAD_FLYBY 0x25000000
4118 #define DIAXIS_CADF_LATERAL 0x25008201 /* move view left / right */
4119 #define DIAXIS_CADF_MOVE 0x25010202 /* move view up / down */
4120 #define DIAXIS_CADF_INOUT 0x25018203 /* in / out */
4121 #define DIBUTTON_CADF_SELECT 0x25000401 /* Select Object */
4122 #define DIBUTTON_CADF_SPECIAL1 0x25000402 /* do first special operation */
4123 #define DIBUTTON_CADF_SPECIAL 0x25000403 /* Select special operation */
4124 #define DIBUTTON_CADF_SPECIAL2 0x25000404 /* do second special operation */
4125 #define DIBUTTON_CADF_MENU 0x250004FD /* Show menu options */
4126 /*--- Priority 2 controls ---*/
4127
4128 #define DIHATSWITCH_CADF_HATSWITCH 0x25004601 /* Hat switch */
4129 #define DIAXIS_CADF_ROTATEX 0x25034204 /* Rotate view forward or up / backward or down */
4130 #define DIAXIS_CADF_ROTATEY 0x2502C205 /* Rotate view clockwise / counterclockwise */
4131 #define DIAXIS_CADF_ROTATEZ 0x25024206 /* Rotate view left / right */
4132 #define DIBUTTON_CADF_DISPLAY 0x25004405 /* shows next on-screen display options */
4133 #define DIBUTTON_CADF_DEVICE 0x250044FE /* Show input device and controls */
4134 #define DIBUTTON_CADF_PAUSE 0x250044FC /* Start / Pause / Restart game */
4135
4136 /*--- CAD - 3D Model Control
4137 Controls for 3D modeling ---*/
4138 #define DIVIRTUAL_CAD_MODEL 0x26000000
4139 #define DIAXIS_CADM_LATERAL 0x26008201 /* move view left / right */
4140 #define DIAXIS_CADM_MOVE 0x26010202 /* move view up / down */
4141 #define DIAXIS_CADM_INOUT 0x26018203 /* in / out */
4142 #define DIBUTTON_CADM_SELECT 0x26000401 /* Select Object */
4143 #define DIBUTTON_CADM_SPECIAL1 0x26000402 /* do first special operation */
4144 #define DIBUTTON_CADM_SPECIAL 0x26000403 /* Select special operation */
4145 #define DIBUTTON_CADM_SPECIAL2 0x26000404 /* do second special operation */
4146 #define DIBUTTON_CADM_MENU 0x260004FD /* Show menu options */
4147 /*--- Priority 2 controls ---*/
4148
4149 #define DIHATSWITCH_CADM_HATSWITCH 0x26004601 /* Hat switch */
4150 #define DIAXIS_CADM_ROTATEX 0x26034204 /* Rotate view forward or up / backward or down */
4151 #define DIAXIS_CADM_ROTATEY 0x2602C205 /* Rotate view clockwise / counterclockwise */
4152 #define DIAXIS_CADM_ROTATEZ 0x26024206 /* Rotate view left / right */
4153 #define DIBUTTON_CADM_DISPLAY 0x26004405 /* shows next on-screen display options */
4154 #define DIBUTTON_CADM_DEVICE 0x260044FE /* Show input device and controls */
4155 #define DIBUTTON_CADM_PAUSE 0x260044FC /* Start / Pause / Restart game */
4156
4157 /*--- Control - Media Equipment
4158 Remote ---*/
4159 #define DIVIRTUAL_REMOTE_CONTROL 0x27000000
4160 #define DIAXIS_REMOTE_SLIDER 0x27050201 /* Slider for adjustment: volume / color / bass / etc */
4161 #define DIBUTTON_REMOTE_MUTE 0x27000401 /* Set volume on current device to zero */
4162 #define DIBUTTON_REMOTE_SELECT 0x27000402 /* Next/previous: channel/ track / chapter / picture / station */
4163 #define DIBUTTON_REMOTE_PLAY 0x27002403 /* Start or pause entertainment on current device */
4164 #define DIBUTTON_REMOTE_CUE 0x27002404 /* Move through current media */
4165 #define DIBUTTON_REMOTE_REVIEW 0x27002405 /* Move through current media */
4166 #define DIBUTTON_REMOTE_CHANGE 0x27002406 /* Select next device */
4167 #define DIBUTTON_REMOTE_RECORD 0x27002407 /* Start recording the current media */
4168 #define DIBUTTON_REMOTE_MENU 0x270004FD /* Show menu options */
4169 /*--- Priority 2 controls ---*/
4170
4171 #define DIAXIS_REMOTE_SLIDER2 0x27054202 /* Slider for adjustment: volume */
4172 #define DIBUTTON_REMOTE_TV 0x27005C08 /* Select TV */
4173 #define DIBUTTON_REMOTE_CABLE 0x27005C09 /* Select cable box */
4174 #define DIBUTTON_REMOTE_CD 0x27005C0A /* Select CD player */
4175 #define DIBUTTON_REMOTE_VCR 0x27005C0B /* Select VCR */
4176 #define DIBUTTON_REMOTE_TUNER 0x27005C0C /* Select tuner */
4177 #define DIBUTTON_REMOTE_DVD 0x27005C0D /* Select DVD player */
4178 #define DIBUTTON_REMOTE_ADJUST 0x27005C0E /* Enter device adjustment menu */
4179 #define DIBUTTON_REMOTE_DIGIT0 0x2700540F /* Digit 0 */
4180 #define DIBUTTON_REMOTE_DIGIT1 0x27005410 /* Digit 1 */
4181 #define DIBUTTON_REMOTE_DIGIT2 0x27005411 /* Digit 2 */
4182 #define DIBUTTON_REMOTE_DIGIT3 0x27005412 /* Digit 3 */
4183 #define DIBUTTON_REMOTE_DIGIT4 0x27005413 /* Digit 4 */
4184 #define DIBUTTON_REMOTE_DIGIT5 0x27005414 /* Digit 5 */
4185 #define DIBUTTON_REMOTE_DIGIT6 0x27005415 /* Digit 6 */
4186 #define DIBUTTON_REMOTE_DIGIT7 0x27005416 /* Digit 7 */
4187 #define DIBUTTON_REMOTE_DIGIT8 0x27005417 /* Digit 8 */
4188 #define DIBUTTON_REMOTE_DIGIT9 0x27005418 /* Digit 9 */
4189 #define DIBUTTON_REMOTE_DEVICE 0x270044FE /* Show input device and controls */
4190 #define DIBUTTON_REMOTE_PAUSE 0x270044FC /* Start / Pause / Restart game */
4191
4192 /*--- Control- Web
4193 Help or Browser ---*/
4194 #define DIVIRTUAL_BROWSER_CONTROL 0x28000000
4195 #define DIAXIS_BROWSER_LATERAL 0x28008201 /* Move on screen pointer */
4196 #define DIAXIS_BROWSER_MOVE 0x28010202 /* Move on screen pointer */
4197 #define DIBUTTON_BROWSER_SELECT 0x28000401 /* Select current item */
4198 #define DIAXIS_BROWSER_VIEW 0x28018203 /* Move view up/down */
4199 #define DIBUTTON_BROWSER_REFRESH 0x28000402 /* Refresh */
4200 #define DIBUTTON_BROWSER_MENU 0x280004FD /* Show menu options */
4201 /*--- Priority 2 controls ---*/
4202
4203 #define DIBUTTON_BROWSER_SEARCH 0x28004403 /* Use search tool */
4204 #define DIBUTTON_BROWSER_STOP 0x28004404 /* Cease current update */
4205 #define DIBUTTON_BROWSER_HOME 0x28004405 /* Go directly to "home" location */
4206 #define DIBUTTON_BROWSER_FAVORITES 0x28004406 /* Mark current site as favorite */
4207 #define DIBUTTON_BROWSER_NEXT 0x28004407 /* Select Next page */
4208 #define DIBUTTON_BROWSER_PREVIOUS 0x28004408 /* Select Previous page */
4209 #define DIBUTTON_BROWSER_HISTORY 0x28004409 /* Show/Hide History */
4210 #define DIBUTTON_BROWSER_PRINT 0x2800440A /* Print current page */
4211 #define DIBUTTON_BROWSER_DEVICE 0x280044FE /* Show input device and controls */
4212 #define DIBUTTON_BROWSER_PAUSE 0x280044FC /* Start / Pause / Restart game */
4213
4214 /*--- Driving Simulator - Giant Walking Robot
4215 Walking tank with weapons ---*/
4216 #define DIVIRTUAL_DRIVING_MECHA 0x29000000
4217 #define DIAXIS_MECHA_STEER 0x29008201 /* Turns mecha left/right */
4218 #define DIAXIS_MECHA_TORSO 0x29010202 /* Tilts torso forward/backward */
4219 #define DIAXIS_MECHA_ROTATE 0x29020203 /* Turns torso left/right */
4220 #define DIAXIS_MECHA_THROTTLE 0x29038204 /* Engine Speed */
4221 #define DIBUTTON_MECHA_FIRE 0x29000401 /* Fire */
4222 #define DIBUTTON_MECHA_WEAPONS 0x29000402 /* Select next weapon group */
4223 #define DIBUTTON_MECHA_TARGET 0x29000403 /* Select closest enemy available target */
4224 #define DIBUTTON_MECHA_REVERSE 0x29000404 /* Toggles throttle in/out of reverse */
4225 #define DIBUTTON_MECHA_ZOOM 0x29000405 /* Zoom in/out targeting reticule */
4226 #define DIBUTTON_MECHA_JUMP 0x29000406 /* Fires jump jets */
4227 #define DIBUTTON_MECHA_MENU 0x290004FD /* Show menu options */
4228 /*--- Priority 2 controls ---*/
4229
4230 #define DIBUTTON_MECHA_CENTER 0x29004407 /* Center torso to legs */
4231 #define DIHATSWITCH_MECHA_GLANCE 0x29004601 /* Look around */
4232 #define DIBUTTON_MECHA_VIEW 0x29004408 /* Cycle through view options */
4233 #define DIBUTTON_MECHA_FIRESECONDARY 0x29004409 /* Alternative fire button */
4234 #define DIBUTTON_MECHA_LEFT_LINK 0x2900C4E4 /* Fallback steer left button */
4235 #define DIBUTTON_MECHA_RIGHT_LINK 0x2900C4EC /* Fallback steer right button */
4236 #define DIBUTTON_MECHA_FORWARD_LINK 0x290144E0 /* Fallback tilt torso forward button */
4237 #define DIBUTTON_MECHA_BACK_LINK 0x290144E8 /* Fallback tilt toroso backward button */
4238 #define DIBUTTON_MECHA_ROTATE_LEFT_LINK 0x290244E4 /* Fallback rotate toroso right button */
4239 #define DIBUTTON_MECHA_ROTATE_RIGHT_LINK 0x290244EC /* Fallback rotate torso left button */
4240 #define DIBUTTON_MECHA_FASTER_LINK 0x2903C4E0 /* Fallback increase engine speed */
4241 #define DIBUTTON_MECHA_SLOWER_LINK 0x2903C4E8 /* Fallback decrease engine speed */
4242 #define DIBUTTON_MECHA_DEVICE 0x290044FE /* Show input device and controls */
4243 #define DIBUTTON_MECHA_PAUSE 0x290044FC /* Start / Pause / Restart game */
4244
4245 /*
4246 * "ANY" semantics can be used as a last resort to get mappings for actions
4247 * that match nothing in the chosen virtual genre. These semantics will be
4248 * mapped at a lower priority that virtual genre semantics. Also, hardware
4249 * vendors will not be able to provide sensible mappings for these unless
4250 * they provide application specific mappings.
4251 */
4252 #define DIAXIS_ANY_X_1 0xFF00C201
4253 #define DIAXIS_ANY_X_2 0xFF00C202
4254 #define DIAXIS_ANY_Y_1 0xFF014201
4255 #define DIAXIS_ANY_Y_2 0xFF014202
4256 #define DIAXIS_ANY_Z_1 0xFF01C201
4257 #define DIAXIS_ANY_Z_2 0xFF01C202
4258 #define DIAXIS_ANY_R_1 0xFF024201
4259 #define DIAXIS_ANY_R_2 0xFF024202
4260 #define DIAXIS_ANY_U_1 0xFF02C201
4261 #define DIAXIS_ANY_U_2 0xFF02C202
4262 #define DIAXIS_ANY_V_1 0xFF034201
4263 #define DIAXIS_ANY_V_2 0xFF034202
4264 #define DIAXIS_ANY_A_1 0xFF03C201
4265 #define DIAXIS_ANY_A_2 0xFF03C202
4266 #define DIAXIS_ANY_B_1 0xFF044201
4267 #define DIAXIS_ANY_B_2 0xFF044202
4268 #define DIAXIS_ANY_C_1 0xFF04C201
4269 #define DIAXIS_ANY_C_2 0xFF04C202
4270 #define DIAXIS_ANY_S_1 0xFF054201
4271 #define DIAXIS_ANY_S_2 0xFF054202
4272
4273 #define DIAXIS_ANY_1 0xFF004201
4274 #define DIAXIS_ANY_2 0xFF004202
4275 #define DIAXIS_ANY_3 0xFF004203
4276 #define DIAXIS_ANY_4 0xFF004204
4277
4278 #define DIPOV_ANY_1 0xFF004601
4279 #define DIPOV_ANY_2 0xFF004602
4280 #define DIPOV_ANY_3 0xFF004603
4281 #define DIPOV_ANY_4 0xFF004604
4282
4283 #define DIBUTTON_ANY(instance) ( 0xFF004400 | instance )
4284
4285
4286 #ifdef __cplusplus
4287 };
4288 #endif
4289
4290 #endif /* __DINPUT_INCLUDED__ */
4291
4292 /****************************************************************************
4293 *
4294 * Definitions for non-IDirectInput (VJoyD) features defined more recently
4295 * than the current sdk files
4296 *
4297 ****************************************************************************/
4298
4299 #ifdef _INC_MMSYSTEM
4300 #ifndef MMNOJOY
4301
4302 #ifndef __VJOYDX_INCLUDED__
4303 #define __VJOYDX_INCLUDED__
4304
4305 #ifdef __cplusplus
4306 extern "C" {
4307 #endif
4308
4309 /*
4310 * Flag to indicate that the dwReserved2 field of the JOYINFOEX structure
4311 * contains mini-driver specific data to be passed by VJoyD to the mini-
4312 * driver instead of doing a poll.
4313 */
4314 #define JOY_PASSDRIVERDATA 0x10000000l
4315
4316 /*
4317 * Informs the joystick driver that the configuration has been changed
4318 * and should be reloaded from the registery.
4319 * dwFlags is reserved and should be set to zero
4320 */
4321 WINMMAPI MMRESULT WINAPI joyConfigChanged( DWORD dwFlags );
4322
4323 #ifndef DIJ_RINGZERO
4324 /*
4325 * Invoke the joystick control panel directly, using the passed window handle
4326 * as the parent of the dialog. This API is only supported for compatibility
4327 * purposes; new applications should use the RunControlPanel method of a
4328 * device interface for a game controller.
4329 * The API is called by using the function pointer returned by
4330 * GetProcAddress( hCPL, TEXT("ShowJoyCPL") ) where hCPL is a HMODULE returned
4331 * by LoadLibrary( TEXT("joy.cpl") ). The typedef is provided to allow
4332 * declaration and casting of an appropriately typed variable.
4333 */
4334 void WINAPI ShowJoyCPL( HWND hWnd );
4335 typedef void (WINAPI* LPFNSHOWJOYCPL)( HWND hWnd );
4336 #endif /* DIJ_RINGZERO */
4337
4338
4339 /*
4340 * Hardware Setting indicating that the device is a headtracker
4341 */
4342 #define JOY_HWS_ISHEADTRACKER 0x02000000l
4343
4344 /*
4345 * Hardware Setting indicating that the VxD is used to replace
4346 * the standard analog polling
4347 */
4348 #define JOY_HWS_ISGAMEPORTDRIVER 0x04000000l
4349
4350 /*
4351 * Hardware Setting indicating that the driver needs a standard
4352 * gameport in order to communicate with the device.
4353 */
4354 #define JOY_HWS_ISANALOGPORTDRIVER 0x08000000l
4355
4356 /*
4357 * Hardware Setting indicating that VJoyD should not load this
4358 * driver, it will be loaded externally and will register with
4359 * VJoyD of it's own accord.
4360 */
4361 #define JOY_HWS_AUTOLOAD 0x10000000l
4362
4363 /*
4364 * Hardware Setting indicating that the driver acquires any
4365 * resources needed without needing a devnode through VJoyD.
4366 */
4367 #define JOY_HWS_NODEVNODE 0x20000000l
4368
4369
4370 /*
4371 * Hardware Setting indicating that the device is a gameport bus
4372 */
4373 #define JOY_HWS_ISGAMEPORTBUS 0x80000000l
4374 #define JOY_HWS_GAMEPORTBUSBUSY 0x00000001l
4375
4376 /*
4377 * Usage Setting indicating that the settings are volatile and
4378 * should be removed if still present on a reboot.
4379 */
4380 #define JOY_US_VOLATILE 0x00000008L
4381
4382 #ifdef __cplusplus
4383 };
4384 #endif
4385
4386 #endif /* __VJOYDX_INCLUDED__ */
4387
4388 #endif /* not MMNOJOY */
4389 #endif /* _INC_MMSYSTEM */
4390
4391 /****************************************************************************
4392 *
4393 * Definitions for non-IDirectInput (VJoyD) features defined more recently
4394 * than the current ddk files
4395 *
4396 ****************************************************************************/
4397
4398 #ifndef DIJ_RINGZERO
4399
4400 #ifdef _INC_MMDDK
4401 #ifndef MMNOJOYDEV
4402
4403 #ifndef __VJOYDXD_INCLUDED__
4404 #define __VJOYDXD_INCLUDED__
4405 /*
4406 * Poll type in which the do_other field of the JOYOEMPOLLDATA
4407 * structure contains mini-driver specific data passed from an app.
4408 */
4409 #define JOY_OEMPOLL_PASSDRIVERDATA 7
4410
4411 #endif /* __VJOYDXD_INCLUDED__ */
4412
4413 #endif /* not MMNOJOYDEV */
4414 #endif /* _INC_MMDDK */
4415
4416 #endif /* DIJ_RINGZERO */
4417