Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4413 lines
222 KiB

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