Counter Strike : Global Offensive Source Code
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.

4417 lines
218 KiB

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