xref: /reactos/sdk/include/psdk/dinput.h (revision 1477b2de)
1c2c66affSColin Finck /*
2c2c66affSColin Finck  * Copyright (C) the Wine project
3c2c66affSColin Finck  *
4c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
5c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
6c2c66affSColin Finck  * License as published by the Free Software Foundation; either
7c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
8c2c66affSColin Finck  *
9c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
10c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12c2c66affSColin Finck  * Lesser General Public License for more details.
13c2c66affSColin Finck  *
14c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
15c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
16c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17c2c66affSColin Finck  */
18c2c66affSColin Finck 
19c2c66affSColin Finck #ifndef __DINPUT_INCLUDED__
20c2c66affSColin Finck #define __DINPUT_INCLUDED__
21c2c66affSColin Finck 
22c2c66affSColin Finck #define COM_NO_WINDOWS_H
23c2c66affSColin Finck #include <objbase.h>
24c2c66affSColin Finck 
25c2c66affSColin Finck #ifndef DIRECTINPUT_VERSION
26c2c66affSColin Finck #define DIRECTINPUT_VERSION	0x0800
27c2c66affSColin Finck #endif
28c2c66affSColin Finck 
29c2c66affSColin Finck /* Classes */
30c2c66affSColin Finck DEFINE_GUID(CLSID_DirectInput,		0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
31c2c66affSColin Finck DEFINE_GUID(CLSID_DirectInputDevice,	0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
32c2c66affSColin Finck 
33c2c66affSColin Finck DEFINE_GUID(CLSID_DirectInput8,		0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
34c2c66affSColin Finck DEFINE_GUID(CLSID_DirectInputDevice8,	0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
35c2c66affSColin Finck 
36c2c66affSColin Finck /* Interfaces */
37c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputA,		0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
38c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputW,		0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
39c2c66affSColin Finck DEFINE_GUID(IID_IDirectInput2A,		0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
40c2c66affSColin Finck DEFINE_GUID(IID_IDirectInput2W,		0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
41c2c66affSColin Finck DEFINE_GUID(IID_IDirectInput7A,		0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
42c2c66affSColin Finck DEFINE_GUID(IID_IDirectInput7W,		0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
43c2c66affSColin Finck DEFINE_GUID(IID_IDirectInput8A,		0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
44c2c66affSColin Finck DEFINE_GUID(IID_IDirectInput8W,		0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
45c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDeviceA,	0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
46c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDeviceW,	0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
47c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDevice2A,	0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
48c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDevice2W,	0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
49c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDevice7A,	0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
50c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDevice7W,	0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
51c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDevice8A,	0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
52c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputDevice8W,	0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
53c2c66affSColin Finck DEFINE_GUID(IID_IDirectInputEffect,	0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
54c2c66affSColin Finck 
55c2c66affSColin Finck /* Predefined object types */
56c2c66affSColin Finck DEFINE_GUID(GUID_XAxis,	0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
57c2c66affSColin Finck DEFINE_GUID(GUID_YAxis,	0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
58c2c66affSColin Finck DEFINE_GUID(GUID_ZAxis,	0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
59c2c66affSColin Finck DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
60c2c66affSColin Finck DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
61c2c66affSColin Finck DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
62c2c66affSColin Finck DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
63c2c66affSColin Finck DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
64c2c66affSColin Finck DEFINE_GUID(GUID_Key,	0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
65c2c66affSColin Finck DEFINE_GUID(GUID_POV,	0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
66c2c66affSColin Finck DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
67c2c66affSColin Finck 
68c2c66affSColin Finck /* Predefined product GUIDs */
69c2c66affSColin Finck DEFINE_GUID(GUID_SysMouse,	0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
70c2c66affSColin Finck DEFINE_GUID(GUID_SysKeyboard,	0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
71c2c66affSColin Finck DEFINE_GUID(GUID_Joystick,	0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
72c2c66affSColin Finck DEFINE_GUID(GUID_SysMouseEm,	0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
73c2c66affSColin Finck DEFINE_GUID(GUID_SysMouseEm2,	0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
74c2c66affSColin Finck DEFINE_GUID(GUID_SysKeyboardEm,	0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
75c2c66affSColin Finck DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
76c2c66affSColin Finck 
77c2c66affSColin Finck /* predefined forcefeedback effects */
78c2c66affSColin Finck DEFINE_GUID(GUID_ConstantForce,	0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
79c2c66affSColin Finck DEFINE_GUID(GUID_RampForce,	0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
80c2c66affSColin Finck DEFINE_GUID(GUID_Square,	0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
81c2c66affSColin Finck DEFINE_GUID(GUID_Sine,		0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
82c2c66affSColin Finck DEFINE_GUID(GUID_Triangle,	0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
83c2c66affSColin Finck DEFINE_GUID(GUID_SawtoothUp,	0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
84c2c66affSColin Finck DEFINE_GUID(GUID_SawtoothDown,	0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
85c2c66affSColin Finck DEFINE_GUID(GUID_Spring,	0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
86c2c66affSColin Finck DEFINE_GUID(GUID_Damper,	0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
87c2c66affSColin Finck DEFINE_GUID(GUID_Inertia,	0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
88c2c66affSColin Finck DEFINE_GUID(GUID_Friction,	0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
89c2c66affSColin Finck DEFINE_GUID(GUID_CustomForce,	0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
90c2c66affSColin Finck 
91c2c66affSColin Finck typedef struct IDirectInputA *LPDIRECTINPUTA;
92c2c66affSColin Finck typedef struct IDirectInputW *LPDIRECTINPUTW;
93c2c66affSColin Finck typedef struct IDirectInput2A *LPDIRECTINPUT2A;
94c2c66affSColin Finck typedef struct IDirectInput2W *LPDIRECTINPUT2W;
95c2c66affSColin Finck typedef struct IDirectInput7A *LPDIRECTINPUT7A;
96c2c66affSColin Finck typedef struct IDirectInput7W *LPDIRECTINPUT7W;
97c2c66affSColin Finck typedef struct IDirectInput8A *LPDIRECTINPUT8A;
98c2c66affSColin Finck typedef struct IDirectInput8W *LPDIRECTINPUT8W;
99c2c66affSColin Finck typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
100c2c66affSColin Finck typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
101c2c66affSColin Finck typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
102c2c66affSColin Finck typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
103c2c66affSColin Finck typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
104c2c66affSColin Finck typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
105c2c66affSColin Finck typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
106c2c66affSColin Finck typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
107c2c66affSColin Finck typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
108c2c66affSColin Finck typedef struct SysKeyboardA *LPSYSKEYBOARDA;
109c2c66affSColin Finck typedef struct SysMouseA *LPSYSMOUSEA;
110c2c66affSColin Finck 
111c2c66affSColin Finck #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
112c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
113c2c66affSColin Finck #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
114c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)
115c2c66affSColin Finck #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
116c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
117c2c66affSColin Finck #define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8)
118c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUT8)
119c2c66affSColin Finck #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
120c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
121c2c66affSColin Finck #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
122c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
123c2c66affSColin Finck #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
124c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)
125c2c66affSColin Finck #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
126c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
127c2c66affSColin Finck 
128c2c66affSColin Finck #define DI_OK                           S_OK
129c2c66affSColin Finck #define DI_NOTATTACHED                  S_FALSE
130c2c66affSColin Finck #define DI_BUFFEROVERFLOW               S_FALSE
131c2c66affSColin Finck #define DI_PROPNOEFFECT                 S_FALSE
132c2c66affSColin Finck #define DI_NOEFFECT                     S_FALSE
133c2c66affSColin Finck #define DI_POLLEDDEVICE                 ((HRESULT)0x00000002)
134c2c66affSColin Finck #define DI_DOWNLOADSKIPPED              ((HRESULT)0x00000003)
135c2c66affSColin Finck #define DI_EFFECTRESTARTED              ((HRESULT)0x00000004)
136c2c66affSColin Finck #define DI_TRUNCATED                    ((HRESULT)0x00000008)
137c2c66affSColin Finck #define DI_SETTINGSNOTSAVED             ((HRESULT)0x0000000B)
138c2c66affSColin Finck #define DI_TRUNCATEDANDRESTARTED        ((HRESULT)0x0000000C)
139c2c66affSColin Finck #define DI_WRITEPROTECT                 ((HRESULT)0x00000013)
140c2c66affSColin Finck 
141c2c66affSColin Finck #define DIERR_OLDDIRECTINPUTVERSION     \
142c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
143c2c66affSColin Finck #define DIERR_BETADIRECTINPUTVERSION    \
144c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
145c2c66affSColin Finck #define DIERR_BADDRIVERVER              \
146c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
147c2c66affSColin Finck #define DIERR_DEVICENOTREG              REGDB_E_CLASSNOTREG
148c2c66affSColin Finck #define DIERR_NOTFOUND                  \
149c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
150c2c66affSColin Finck #define DIERR_OBJECTNOTFOUND            \
151c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
152c2c66affSColin Finck #define DIERR_INVALIDPARAM              E_INVALIDARG
153c2c66affSColin Finck #define DIERR_NOINTERFACE               E_NOINTERFACE
154c2c66affSColin Finck #define DIERR_GENERIC                   E_FAIL
155c2c66affSColin Finck #define DIERR_OUTOFMEMORY               E_OUTOFMEMORY
156c2c66affSColin Finck #define DIERR_UNSUPPORTED               E_NOTIMPL
157c2c66affSColin Finck #define DIERR_NOTINITIALIZED            \
158c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
159c2c66affSColin Finck #define DIERR_ALREADYINITIALIZED        \
160c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
161c2c66affSColin Finck #define DIERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
162c2c66affSColin Finck #define DIERR_OTHERAPPHASPRIO           E_ACCESSDENIED
163c2c66affSColin Finck #define DIERR_INPUTLOST                 \
164c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
165c2c66affSColin Finck #define DIERR_ACQUIRED                  \
166c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
167c2c66affSColin Finck #define DIERR_NOTACQUIRED               \
168c2c66affSColin Finck     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
169c2c66affSColin Finck #define DIERR_READONLY                  E_ACCESSDENIED
170c2c66affSColin Finck #define DIERR_HANDLEEXISTS              E_ACCESSDENIED
171c2c66affSColin Finck #ifndef E_PENDING
172c2c66affSColin Finck #define E_PENDING                       0x8000000AL
173c2c66affSColin Finck #endif
174c2c66affSColin Finck #define DIERR_INSUFFICIENTPRIVS         0x80040200L
175c2c66affSColin Finck #define DIERR_DEVICEFULL                0x80040201L
176c2c66affSColin Finck #define DIERR_MOREDATA                  0x80040202L
177c2c66affSColin Finck #define DIERR_NOTDOWNLOADED             0x80040203L
178c2c66affSColin Finck #define DIERR_HASEFFECTS                0x80040204L
179c2c66affSColin Finck #define DIERR_NOTEXCLUSIVEACQUIRED      0x80040205L
180c2c66affSColin Finck #define DIERR_INCOMPLETEEFFECT          0x80040206L
181c2c66affSColin Finck #define DIERR_NOTBUFFERED               0x80040207L
182c2c66affSColin Finck #define DIERR_EFFECTPLAYING             0x80040208L
183c2c66affSColin Finck #define DIERR_UNPLUGGED                 0x80040209L
184c2c66affSColin Finck #define DIERR_REPORTFULL                0x8004020AL
185c2c66affSColin Finck #define DIERR_MAPFILEFAIL               0x8004020BL
186c2c66affSColin Finck 
187c2c66affSColin Finck #define DIENUM_STOP                     0
188c2c66affSColin Finck #define DIENUM_CONTINUE                 1
189c2c66affSColin Finck 
190c2c66affSColin Finck #define DIEDFL_ALLDEVICES               0x00000000
191c2c66affSColin Finck #define DIEDFL_ATTACHEDONLY             0x00000001
192c2c66affSColin Finck #define DIEDFL_FORCEFEEDBACK            0x00000100
193c2c66affSColin Finck #define DIEDFL_INCLUDEALIASES           0x00010000
194c2c66affSColin Finck #define DIEDFL_INCLUDEPHANTOMS          0x00020000
195c2c66affSColin Finck #define DIEDFL_INCLUDEHIDDEN		0x00040000
196c2c66affSColin Finck 
197c2c66affSColin Finck #define DIDEVTYPE_DEVICE                1
198c2c66affSColin Finck #define DIDEVTYPE_MOUSE                 2
199c2c66affSColin Finck #define DIDEVTYPE_KEYBOARD              3
200c2c66affSColin Finck #define DIDEVTYPE_JOYSTICK              4
201c2c66affSColin Finck #define DIDEVTYPE_HID                   0x00010000
202c2c66affSColin Finck 
203c2c66affSColin Finck #define DI8DEVCLASS_ALL             0
204c2c66affSColin Finck #define DI8DEVCLASS_DEVICE          1
205c2c66affSColin Finck #define DI8DEVCLASS_POINTER         2
206c2c66affSColin Finck #define DI8DEVCLASS_KEYBOARD        3
207c2c66affSColin Finck #define DI8DEVCLASS_GAMECTRL        4
208c2c66affSColin Finck 
209c2c66affSColin Finck #define DI8DEVTYPE_DEVICE           0x11
210c2c66affSColin Finck #define DI8DEVTYPE_MOUSE            0x12
211c2c66affSColin Finck #define DI8DEVTYPE_KEYBOARD         0x13
212c2c66affSColin Finck #define DI8DEVTYPE_JOYSTICK         0x14
213c2c66affSColin Finck #define DI8DEVTYPE_GAMEPAD          0x15
214c2c66affSColin Finck #define DI8DEVTYPE_DRIVING          0x16
215c2c66affSColin Finck #define DI8DEVTYPE_FLIGHT           0x17
216c2c66affSColin Finck #define DI8DEVTYPE_1STPERSON        0x18
217c2c66affSColin Finck #define DI8DEVTYPE_DEVICECTRL       0x19
218c2c66affSColin Finck #define DI8DEVTYPE_SCREENPOINTER    0x1A
219c2c66affSColin Finck #define DI8DEVTYPE_REMOTE           0x1B
220c2c66affSColin Finck #define DI8DEVTYPE_SUPPLEMENTAL     0x1C
221c2c66affSColin Finck 
222c2c66affSColin Finck #define DIDEVTYPEMOUSE_UNKNOWN          1
223c2c66affSColin Finck #define DIDEVTYPEMOUSE_TRADITIONAL      2
224c2c66affSColin Finck #define DIDEVTYPEMOUSE_FINGERSTICK      3
225c2c66affSColin Finck #define DIDEVTYPEMOUSE_TOUCHPAD         4
226c2c66affSColin Finck #define DIDEVTYPEMOUSE_TRACKBALL        5
227c2c66affSColin Finck 
228c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_UNKNOWN       0
229c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_PCXT          1
230c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_OLIVETTI      2
231c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_PCAT          3
232c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_PCENH         4
233c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_NOKIA1050     5
234c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_NOKIA9140     6
235c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_NEC98         7
236c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
237c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_NEC98106      9
238c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_JAPAN106     10
239c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_JAPANAX      11
240c2c66affSColin Finck #define DIDEVTYPEKEYBOARD_J3100        12
241c2c66affSColin Finck 
242c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_UNKNOWN       1
243c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_TRADITIONAL   2
244c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
245c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_GAMEPAD       4
246c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_RUDDER        5
247c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_WHEEL         6
248c2c66affSColin Finck #define DIDEVTYPEJOYSTICK_HEADTRACKER   7
249c2c66affSColin Finck 
250c2c66affSColin Finck #define DI8DEVTYPEMOUSE_UNKNOWN                     1
251c2c66affSColin Finck #define DI8DEVTYPEMOUSE_TRADITIONAL                 2
252c2c66affSColin Finck #define DI8DEVTYPEMOUSE_FINGERSTICK                 3
253c2c66affSColin Finck #define DI8DEVTYPEMOUSE_TOUCHPAD                    4
254c2c66affSColin Finck #define DI8DEVTYPEMOUSE_TRACKBALL                   5
255c2c66affSColin Finck #define DI8DEVTYPEMOUSE_ABSOLUTE                    6
256c2c66affSColin Finck 
257c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_UNKNOWN                  0
258c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_PCXT                     1
259c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_OLIVETTI                 2
260c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_PCAT                     3
261c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_PCENH                    4
262c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_NOKIA1050                5
263c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_NOKIA9140                6
264c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_NEC98                    7
265c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP              8
266c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_NEC98106                 9
267c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_JAPAN106                10
268c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_JAPANAX                 11
269c2c66affSColin Finck #define DI8DEVTYPEKEYBOARD_J3100                   12
270c2c66affSColin Finck 
271c2c66affSColin Finck #define DI8DEVTYPE_LIMITEDGAMESUBTYPE               1
272c2c66affSColin Finck 
273c2c66affSColin Finck #define DI8DEVTYPEJOYSTICK_LIMITED                  DI8DEVTYPE_LIMITEDGAMESUBTYPE
274c2c66affSColin Finck #define DI8DEVTYPEJOYSTICK_STANDARD                 2
275c2c66affSColin Finck 
276c2c66affSColin Finck #define DI8DEVTYPEGAMEPAD_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
277c2c66affSColin Finck #define DI8DEVTYPEGAMEPAD_STANDARD                  2
278c2c66affSColin Finck #define DI8DEVTYPEGAMEPAD_TILT                      3
279c2c66affSColin Finck 
280c2c66affSColin Finck #define DI8DEVTYPEDRIVING_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
281c2c66affSColin Finck #define DI8DEVTYPEDRIVING_COMBINEDPEDALS            2
282c2c66affSColin Finck #define DI8DEVTYPEDRIVING_DUALPEDALS                3
283c2c66affSColin Finck #define DI8DEVTYPEDRIVING_THREEPEDALS               4
284c2c66affSColin Finck #define DI8DEVTYPEDRIVING_HANDHELD                  5
285c2c66affSColin Finck 
286c2c66affSColin Finck #define DI8DEVTYPEFLIGHT_LIMITED                    DI8DEVTYPE_LIMITEDGAMESUBTYPE
287c2c66affSColin Finck #define DI8DEVTYPEFLIGHT_STICK                      2
288c2c66affSColin Finck #define DI8DEVTYPEFLIGHT_YOKE                       3
289c2c66affSColin Finck #define DI8DEVTYPEFLIGHT_RC                         4
290c2c66affSColin Finck 
291c2c66affSColin Finck #define DI8DEVTYPE1STPERSON_LIMITED                 DI8DEVTYPE_LIMITEDGAMESUBTYPE
292c2c66affSColin Finck #define DI8DEVTYPE1STPERSON_UNKNOWN                 2
293c2c66affSColin Finck #define DI8DEVTYPE1STPERSON_SIXDOF                  3
294c2c66affSColin Finck #define DI8DEVTYPE1STPERSON_SHOOTER                 4
295c2c66affSColin Finck 
296c2c66affSColin Finck #define DI8DEVTYPESCREENPTR_UNKNOWN                 2
297c2c66affSColin Finck #define DI8DEVTYPESCREENPTR_LIGHTGUN                3
298c2c66affSColin Finck #define DI8DEVTYPESCREENPTR_LIGHTPEN                4
299c2c66affSColin Finck #define DI8DEVTYPESCREENPTR_TOUCH                   5
300c2c66affSColin Finck 
301c2c66affSColin Finck #define DI8DEVTYPEREMOTE_UNKNOWN                    2
302c2c66affSColin Finck 
303c2c66affSColin Finck #define DI8DEVTYPEDEVICECTRL_UNKNOWN                2
304c2c66affSColin Finck #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION         3
305c2c66affSColin Finck #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
306c2c66affSColin Finck 
307c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN              2
308c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER    3
309c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER          4
310c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER          5
311c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE       6
312c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_SHIFTER              7
313c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_THROTTLE             8
314c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE        9
315c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS      10
316c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS          11
317c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS         12
318c2c66affSColin Finck #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS        13
319c2c66affSColin Finck 
320c2c66affSColin Finck #define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
321c2c66affSColin Finck #define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
322c2c66affSColin Finck 
323c2c66affSColin Finck typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
324c2c66affSColin Finck     DWORD   dwSize;
325c2c66affSColin Finck     GUID    guidType;
326c2c66affSColin Finck     DWORD   dwOfs;
327c2c66affSColin Finck     DWORD   dwType;
328c2c66affSColin Finck     DWORD   dwFlags;
329c2c66affSColin Finck     CHAR    tszName[MAX_PATH];
330c2c66affSColin Finck } DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
331c2c66affSColin Finck typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
332c2c66affSColin Finck typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
333c2c66affSColin Finck     DWORD   dwSize;
334c2c66affSColin Finck     GUID    guidType;
335c2c66affSColin Finck     DWORD   dwOfs;
336c2c66affSColin Finck     DWORD   dwType;
337c2c66affSColin Finck     DWORD   dwFlags;
338c2c66affSColin Finck     WCHAR   tszName[MAX_PATH];
339c2c66affSColin Finck } DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
340c2c66affSColin Finck typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
341c2c66affSColin Finck 
342c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)
343c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)
344c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)
345c2c66affSColin Finck 
346c2c66affSColin Finck typedef struct DIDEVICEOBJECTINSTANCEA {
347c2c66affSColin Finck     DWORD	dwSize;
348c2c66affSColin Finck     GUID	guidType;
349c2c66affSColin Finck     DWORD	dwOfs;
350c2c66affSColin Finck     DWORD	dwType;
351c2c66affSColin Finck     DWORD	dwFlags;
352c2c66affSColin Finck     CHAR	tszName[MAX_PATH];
353c2c66affSColin Finck     DWORD	dwFFMaxForce;
354c2c66affSColin Finck     DWORD	dwFFForceResolution;
355c2c66affSColin Finck     WORD	wCollectionNumber;
356c2c66affSColin Finck     WORD	wDesignatorIndex;
357c2c66affSColin Finck     WORD	wUsagePage;
358c2c66affSColin Finck     WORD	wUsage;
359c2c66affSColin Finck     DWORD	dwDimension;
360c2c66affSColin Finck     WORD	wExponent;
361c2c66affSColin Finck     WORD	wReserved;
362c2c66affSColin Finck } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
363c2c66affSColin Finck typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
364c2c66affSColin Finck 
365c2c66affSColin Finck typedef struct DIDEVICEOBJECTINSTANCEW {
366c2c66affSColin Finck     DWORD	dwSize;
367c2c66affSColin Finck     GUID	guidType;
368c2c66affSColin Finck     DWORD	dwOfs;
369c2c66affSColin Finck     DWORD	dwType;
370c2c66affSColin Finck     DWORD	dwFlags;
371c2c66affSColin Finck     WCHAR	tszName[MAX_PATH];
372c2c66affSColin Finck     DWORD	dwFFMaxForce;
373c2c66affSColin Finck     DWORD	dwFFForceResolution;
374c2c66affSColin Finck     WORD	wCollectionNumber;
375c2c66affSColin Finck     WORD	wDesignatorIndex;
376c2c66affSColin Finck     WORD	wUsagePage;
377c2c66affSColin Finck     WORD	wUsage;
378c2c66affSColin Finck     DWORD	dwDimension;
379c2c66affSColin Finck     WORD	wExponent;
380c2c66affSColin Finck     WORD	wReserved;
381c2c66affSColin Finck } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
382c2c66affSColin Finck typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
383c2c66affSColin Finck 
384c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
385c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
386c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
387c2c66affSColin Finck 
388c2c66affSColin Finck typedef struct DIDEVICEINSTANCE_DX3A {
389c2c66affSColin Finck     DWORD   dwSize;
390c2c66affSColin Finck     GUID    guidInstance;
391c2c66affSColin Finck     GUID    guidProduct;
392c2c66affSColin Finck     DWORD   dwDevType;
393c2c66affSColin Finck     CHAR    tszInstanceName[MAX_PATH];
394c2c66affSColin Finck     CHAR    tszProductName[MAX_PATH];
395c2c66affSColin Finck } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
396c2c66affSColin Finck typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
397c2c66affSColin Finck typedef struct DIDEVICEINSTANCE_DX3W {
398c2c66affSColin Finck     DWORD   dwSize;
399c2c66affSColin Finck     GUID    guidInstance;
400c2c66affSColin Finck     GUID    guidProduct;
401c2c66affSColin Finck     DWORD   dwDevType;
402c2c66affSColin Finck     WCHAR   tszInstanceName[MAX_PATH];
403c2c66affSColin Finck     WCHAR   tszProductName[MAX_PATH];
404c2c66affSColin Finck } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
405c2c66affSColin Finck typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
406c2c66affSColin Finck 
407c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)
408c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)
409c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)
410c2c66affSColin Finck 
411c2c66affSColin Finck typedef struct DIDEVICEINSTANCEA {
412c2c66affSColin Finck     DWORD	dwSize;
413c2c66affSColin Finck     GUID	guidInstance;
414c2c66affSColin Finck     GUID	guidProduct;
415c2c66affSColin Finck     DWORD	dwDevType;
416c2c66affSColin Finck     CHAR	tszInstanceName[MAX_PATH];
417c2c66affSColin Finck     CHAR	tszProductName[MAX_PATH];
418c2c66affSColin Finck     GUID	guidFFDriver;
419c2c66affSColin Finck     WORD	wUsagePage;
420c2c66affSColin Finck     WORD	wUsage;
421c2c66affSColin Finck } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
422c2c66affSColin Finck typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
423c2c66affSColin Finck 
424c2c66affSColin Finck typedef struct DIDEVICEINSTANCEW {
425c2c66affSColin Finck     DWORD	dwSize;
426c2c66affSColin Finck     GUID	guidInstance;
427c2c66affSColin Finck     GUID	guidProduct;
428c2c66affSColin Finck     DWORD	dwDevType;
429c2c66affSColin Finck     WCHAR	tszInstanceName[MAX_PATH];
430c2c66affSColin Finck     WCHAR	tszProductName[MAX_PATH];
431c2c66affSColin Finck     GUID	guidFFDriver;
432c2c66affSColin Finck     WORD	wUsagePage;
433c2c66affSColin Finck     WORD	wUsage;
434c2c66affSColin Finck } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
435c2c66affSColin Finck typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
436c2c66affSColin Finck 
437c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
438c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
439c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
440c2c66affSColin Finck 
441c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
442c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
443c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
444c2c66affSColin Finck 
445c2c66affSColin Finck #define DIEDBS_MAPPEDPRI1		0x00000001
446c2c66affSColin Finck #define DIEDBS_MAPPEDPRI2		0x00000002
447c2c66affSColin Finck #define DIEDBS_RECENTDEVICE		0x00000010
448c2c66affSColin Finck #define DIEDBS_NEWDEVICE		0x00000020
449c2c66affSColin Finck 
450c2c66affSColin Finck #define DIEDBSFL_ATTACHEDONLY		0x00000000
451c2c66affSColin Finck #define DIEDBSFL_THISUSER		0x00000010
452c2c66affSColin Finck #define DIEDBSFL_FORCEFEEDBACK		DIEDFL_FORCEFEEDBACK
453c2c66affSColin Finck #define DIEDBSFL_AVAILABLEDEVICES	0x00001000
454c2c66affSColin Finck #define DIEDBSFL_MULTIMICEKEYBOARDS	0x00002000
455c2c66affSColin Finck #define DIEDBSFL_NONGAMINGDEVICES	0x00004000
456c2c66affSColin Finck #define DIEDBSFL_VALID			0x00007110
457c2c66affSColin Finck 
458c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
459c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
460c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
461c2c66affSColin Finck 
462c2c66affSColin Finck typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
463c2c66affSColin Finck 
464c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
465c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
466c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
467c2c66affSColin Finck 
468c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
469c2c66affSColin Finck 
470c2c66affSColin Finck #define DIK_ESCAPE          0x01
471c2c66affSColin Finck #define DIK_1               0x02
472c2c66affSColin Finck #define DIK_2               0x03
473c2c66affSColin Finck #define DIK_3               0x04
474c2c66affSColin Finck #define DIK_4               0x05
475c2c66affSColin Finck #define DIK_5               0x06
476c2c66affSColin Finck #define DIK_6               0x07
477c2c66affSColin Finck #define DIK_7               0x08
478c2c66affSColin Finck #define DIK_8               0x09
479c2c66affSColin Finck #define DIK_9               0x0A
480c2c66affSColin Finck #define DIK_0               0x0B
481c2c66affSColin Finck #define DIK_MINUS           0x0C    /* - on main keyboard */
482c2c66affSColin Finck #define DIK_EQUALS          0x0D
483c2c66affSColin Finck #define DIK_BACK            0x0E    /* backspace */
484c2c66affSColin Finck #define DIK_TAB             0x0F
485c2c66affSColin Finck #define DIK_Q               0x10
486c2c66affSColin Finck #define DIK_W               0x11
487c2c66affSColin Finck #define DIK_E               0x12
488c2c66affSColin Finck #define DIK_R               0x13
489c2c66affSColin Finck #define DIK_T               0x14
490c2c66affSColin Finck #define DIK_Y               0x15
491c2c66affSColin Finck #define DIK_U               0x16
492c2c66affSColin Finck #define DIK_I               0x17
493c2c66affSColin Finck #define DIK_O               0x18
494c2c66affSColin Finck #define DIK_P               0x19
495c2c66affSColin Finck #define DIK_LBRACKET        0x1A
496c2c66affSColin Finck #define DIK_RBRACKET        0x1B
497c2c66affSColin Finck #define DIK_RETURN          0x1C    /* Enter on main keyboard */
498c2c66affSColin Finck #define DIK_LCONTROL        0x1D
499c2c66affSColin Finck #define DIK_A               0x1E
500c2c66affSColin Finck #define DIK_S               0x1F
501c2c66affSColin Finck #define DIK_D               0x20
502c2c66affSColin Finck #define DIK_F               0x21
503c2c66affSColin Finck #define DIK_G               0x22
504c2c66affSColin Finck #define DIK_H               0x23
505c2c66affSColin Finck #define DIK_J               0x24
506c2c66affSColin Finck #define DIK_K               0x25
507c2c66affSColin Finck #define DIK_L               0x26
508c2c66affSColin Finck #define DIK_SEMICOLON       0x27
509c2c66affSColin Finck #define DIK_APOSTROPHE      0x28
510c2c66affSColin Finck #define DIK_GRAVE           0x29    /* accent grave */
511c2c66affSColin Finck #define DIK_LSHIFT          0x2A
512c2c66affSColin Finck #define DIK_BACKSLASH       0x2B
513c2c66affSColin Finck #define DIK_Z               0x2C
514c2c66affSColin Finck #define DIK_X               0x2D
515c2c66affSColin Finck #define DIK_C               0x2E
516c2c66affSColin Finck #define DIK_V               0x2F
517c2c66affSColin Finck #define DIK_B               0x30
518c2c66affSColin Finck #define DIK_N               0x31
519c2c66affSColin Finck #define DIK_M               0x32
520c2c66affSColin Finck #define DIK_COMMA           0x33
521c2c66affSColin Finck #define DIK_PERIOD          0x34    /* . on main keyboard */
522c2c66affSColin Finck #define DIK_SLASH           0x35    /* / on main keyboard */
523c2c66affSColin Finck #define DIK_RSHIFT          0x36
524c2c66affSColin Finck #define DIK_MULTIPLY        0x37    /* * on numeric keypad */
525c2c66affSColin Finck #define DIK_LMENU           0x38    /* left Alt */
526c2c66affSColin Finck #define DIK_SPACE           0x39
527c2c66affSColin Finck #define DIK_CAPITAL         0x3A
528c2c66affSColin Finck #define DIK_F1              0x3B
529c2c66affSColin Finck #define DIK_F2              0x3C
530c2c66affSColin Finck #define DIK_F3              0x3D
531c2c66affSColin Finck #define DIK_F4              0x3E
532c2c66affSColin Finck #define DIK_F5              0x3F
533c2c66affSColin Finck #define DIK_F6              0x40
534c2c66affSColin Finck #define DIK_F7              0x41
535c2c66affSColin Finck #define DIK_F8              0x42
536c2c66affSColin Finck #define DIK_F9              0x43
537c2c66affSColin Finck #define DIK_F10             0x44
538c2c66affSColin Finck #define DIK_NUMLOCK         0x45
539c2c66affSColin Finck #define DIK_SCROLL          0x46    /* Scroll Lock */
540c2c66affSColin Finck #define DIK_NUMPAD7         0x47
541c2c66affSColin Finck #define DIK_NUMPAD8         0x48
542c2c66affSColin Finck #define DIK_NUMPAD9         0x49
543c2c66affSColin Finck #define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
544c2c66affSColin Finck #define DIK_NUMPAD4         0x4B
545c2c66affSColin Finck #define DIK_NUMPAD5         0x4C
546c2c66affSColin Finck #define DIK_NUMPAD6         0x4D
547c2c66affSColin Finck #define DIK_ADD             0x4E    /* + on numeric keypad */
548c2c66affSColin Finck #define DIK_NUMPAD1         0x4F
549c2c66affSColin Finck #define DIK_NUMPAD2         0x50
550c2c66affSColin Finck #define DIK_NUMPAD3         0x51
551c2c66affSColin Finck #define DIK_NUMPAD0         0x52
552c2c66affSColin Finck #define DIK_DECIMAL         0x53    /* . on numeric keypad */
553c2c66affSColin Finck #define DIK_F11             0x57
554c2c66affSColin Finck #define DIK_F12             0x58
555c2c66affSColin Finck #define DIK_F13             0x64    /*                     (NEC PC98) */
556c2c66affSColin Finck #define DIK_F14             0x65    /*                     (NEC PC98) */
557c2c66affSColin Finck #define DIK_F15             0x66    /*                     (NEC PC98) */
558c2c66affSColin Finck #define DIK_KANA            0x70    /* (Japanese keyboard)            */
559c2c66affSColin Finck #define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
560c2c66affSColin Finck #define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
561c2c66affSColin Finck #define DIK_YEN             0x7D    /* (Japanese keyboard)            */
562c2c66affSColin Finck #define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
563c2c66affSColin Finck #define DIK_CIRCUMFLEX      0x90    /* (Japanese keyboard)            */
564c2c66affSColin Finck #define DIK_AT              0x91    /*                     (NEC PC98) */
565c2c66affSColin Finck #define DIK_COLON           0x92    /*                     (NEC PC98) */
566c2c66affSColin Finck #define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
567c2c66affSColin Finck #define DIK_KANJI           0x94    /* (Japanese keyboard)            */
568c2c66affSColin Finck #define DIK_STOP            0x95    /*                     (NEC PC98) */
569c2c66affSColin Finck #define DIK_AX              0x96    /*                     (Japan AX) */
570c2c66affSColin Finck #define DIK_UNLABELED       0x97    /*                        (J3100) */
571c2c66affSColin Finck #define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
572c2c66affSColin Finck #define DIK_RCONTROL        0x9D
573c2c66affSColin Finck #define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
574c2c66affSColin Finck #define DIK_DIVIDE          0xB5    /* / on numeric keypad */
575c2c66affSColin Finck #define DIK_SYSRQ           0xB7
576c2c66affSColin Finck #define DIK_RMENU           0xB8    /* right Alt */
577c2c66affSColin Finck #define DIK_PAUSE           0xC5    /* Pause */
578c2c66affSColin Finck #define DIK_HOME            0xC7    /* Home on arrow keypad */
579c2c66affSColin Finck #define DIK_UP              0xC8    /* UpArrow on arrow keypad */
580c2c66affSColin Finck #define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
581c2c66affSColin Finck #define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
582c2c66affSColin Finck #define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
583c2c66affSColin Finck #define DIK_END             0xCF    /* End on arrow keypad */
584c2c66affSColin Finck #define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
585c2c66affSColin Finck #define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
586c2c66affSColin Finck #define DIK_INSERT          0xD2    /* Insert on arrow keypad */
587c2c66affSColin Finck #define DIK_DELETE          0xD3    /* Delete on arrow keypad */
588c2c66affSColin Finck #define DIK_LWIN            0xDB    /* Left Windows key */
589c2c66affSColin Finck #define DIK_RWIN            0xDC    /* Right Windows key */
590c2c66affSColin Finck #define DIK_APPS            0xDD    /* AppMenu key */
591c2c66affSColin Finck #define DIK_POWER           0xDE
592c2c66affSColin Finck #define DIK_SLEEP           0xDF
593c2c66affSColin Finck #define DIK_BACKSPACE       DIK_BACK            /* backspace */
594c2c66affSColin Finck #define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
595c2c66affSColin Finck #define DIK_LALT            DIK_LMENU           /* left Alt */
596c2c66affSColin Finck #define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
597c2c66affSColin Finck #define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
598c2c66affSColin Finck #define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
599c2c66affSColin Finck #define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
600c2c66affSColin Finck #define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
601c2c66affSColin Finck #define DIK_RALT            DIK_RMENU           /* right Alt */
602c2c66affSColin Finck #define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
603c2c66affSColin Finck #define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
604c2c66affSColin Finck #define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
605c2c66affSColin Finck #define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
606c2c66affSColin Finck #define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
607c2c66affSColin Finck #define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
608c2c66affSColin Finck 
609c2c66affSColin Finck /* New DirectInput8 style keyboard constants */
610c2c66affSColin Finck 
611c2c66affSColin Finck #define DIKEYBOARD_ESCAPE               (DIK_ESCAPE | 0x81000400)
612c2c66affSColin Finck #define DIKEYBOARD_1                    (DIK_1 | 0x81000400)
613c2c66affSColin Finck #define DIKEYBOARD_2                    (DIK_2 | 0x81000400)
614c2c66affSColin Finck #define DIKEYBOARD_3                    (DIK_3 | 0x81000400)
615c2c66affSColin Finck #define DIKEYBOARD_4                    (DIK_4 | 0x81000400)
616c2c66affSColin Finck #define DIKEYBOARD_5                    (DIK_5 | 0x81000400)
617c2c66affSColin Finck #define DIKEYBOARD_6                    (DIK_6 | 0x81000400)
618c2c66affSColin Finck #define DIKEYBOARD_7                    (DIK_7 | 0x81000400)
619c2c66affSColin Finck #define DIKEYBOARD_8                    (DIK_8 | 0x81000400)
620c2c66affSColin Finck #define DIKEYBOARD_9                    (DIK_9 | 0x81000400)
621c2c66affSColin Finck #define DIKEYBOARD_0                    (DIK_0 | 0x81000400)
622c2c66affSColin Finck #define DIKEYBOARD_MINUS                (DIK_MINUS | 0x81000400)
623c2c66affSColin Finck #define DIKEYBOARD_EQUALS               (DIK_EQUALS | 0x81000400)
624c2c66affSColin Finck #define DIKEYBOARD_BACK                 (DIK_BACK | 0x81000400)
625c2c66affSColin Finck #define DIKEYBOARD_TAB                  (DIK_TAB | 0x81000400)
626c2c66affSColin Finck #define DIKEYBOARD_Q                    (DIK_Q | 0x81000400)
627c2c66affSColin Finck #define DIKEYBOARD_W                    (DIK_W | 0x81000400)
628c2c66affSColin Finck #define DIKEYBOARD_E                    (DIK_E | 0x81000400)
629c2c66affSColin Finck #define DIKEYBOARD_R                    (DIK_R | 0x81000400)
630c2c66affSColin Finck #define DIKEYBOARD_T                    (DIK_T | 0x81000400)
631c2c66affSColin Finck #define DIKEYBOARD_Y                    (DIK_Y | 0x81000400)
632c2c66affSColin Finck #define DIKEYBOARD_U                    (DIK_U | 0x81000400)
633c2c66affSColin Finck #define DIKEYBOARD_I                    (DIK_I | 0x81000400)
634c2c66affSColin Finck #define DIKEYBOARD_O                    (DIK_O | 0x81000400)
635c2c66affSColin Finck #define DIKEYBOARD_P                    (DIK_P | 0x81000400)
636c2c66affSColin Finck #define DIKEYBOARD_LBRACKET             (DIK_LBRACKET | 0x81000400)
637c2c66affSColin Finck #define DIKEYBOARD_RBRACKET             (DIK_RBRACKET | 0x81000400)
638c2c66affSColin Finck #define DIKEYBOARD_RETURN               (DIK_RETURN | 0x81000400)
639c2c66affSColin Finck #define DIKEYBOARD_LCONTROL             (DIK_LCONTROL | 0x81000400)
640c2c66affSColin Finck #define DIKEYBOARD_A                    (DIK_A | 0x81000400)
641c2c66affSColin Finck #define DIKEYBOARD_S                    (DIK_S | 0x81000400)
642c2c66affSColin Finck #define DIKEYBOARD_D                    (DIK_D | 0x81000400)
643c2c66affSColin Finck #define DIKEYBOARD_F                    (DIK_F | 0x81000400)
644c2c66affSColin Finck #define DIKEYBOARD_G                    (DIK_G | 0x81000400)
645c2c66affSColin Finck #define DIKEYBOARD_H                    (DIK_H | 0x81000400)
646c2c66affSColin Finck #define DIKEYBOARD_J                    (DIK_J | 0x81000400)
647c2c66affSColin Finck #define DIKEYBOARD_K                    (DIK_K | 0x81000400)
648c2c66affSColin Finck #define DIKEYBOARD_L                    (DIK_L | 0x81000400)
649c2c66affSColin Finck #define DIKEYBOARD_SEMICOLON            (DIK_SEMICOLON | 0x81000400)
650c2c66affSColin Finck #define DIKEYBOARD_APOSTROPHE           (DIK_APOSTROPHE | 0x81000400)
651c2c66affSColin Finck #define DIKEYBOARD_GRAVE                (DIK_GRAVE | 0x81000400)
652c2c66affSColin Finck #define DIKEYBOARD_LSHIFT               (DIK_LSHIFT | 0x81000400)
653c2c66affSColin Finck #define DIKEYBOARD_BACKSLASH            (DIK_BACKSLASH | 0x81000400)
654c2c66affSColin Finck #define DIKEYBOARD_Z                    (DIK_Z | 0x81000400)
655c2c66affSColin Finck #define DIKEYBOARD_X                    (DIK_X | 0x81000400)
656c2c66affSColin Finck #define DIKEYBOARD_C                    (DIK_C | 0x81000400)
657c2c66affSColin Finck #define DIKEYBOARD_V                    (DIK_V | 0x81000400)
658c2c66affSColin Finck #define DIKEYBOARD_B                    (DIK_B | 0x81000400)
659c2c66affSColin Finck #define DIKEYBOARD_N                    (DIK_N | 0x81000400)
660c2c66affSColin Finck #define DIKEYBOARD_M                    (DIK_M | 0x81000400)
661c2c66affSColin Finck #define DIKEYBOARD_COMMA                (DIK_COMMA | 0x81000400)
662c2c66affSColin Finck #define DIKEYBOARD_PERIOD               (DIK_PERIOD | 0x81000400)
663c2c66affSColin Finck #define DIKEYBOARD_SLASH                (DIK_SLASH | 0x81000400)
664c2c66affSColin Finck #define DIKEYBOARD_RSHIFT               (DIK_RSHIFT | 0x81000400)
665c2c66affSColin Finck #define DIKEYBOARD_MULTIPLY             (DIK_MULTIPLY | 0x81000400)
666c2c66affSColin Finck #define DIKEYBOARD_LMENU                (DIK_LMENU | 0x81000400)
667c2c66affSColin Finck #define DIKEYBOARD_SPACE                (DIK_SPACE | 0x81000400)
668c2c66affSColin Finck #define DIKEYBOARD_CAPITAL              (DIK_CAPITAL | 0x81000400)
669c2c66affSColin Finck #define DIKEYBOARD_F1                   (DIK_F1 | 0x81000400)
670c2c66affSColin Finck #define DIKEYBOARD_F2                   (DIK_F2 | 0x81000400)
671c2c66affSColin Finck #define DIKEYBOARD_F3                   (DIK_F3 | 0x81000400)
672c2c66affSColin Finck #define DIKEYBOARD_F4                   (DIK_F4 | 0x81000400)
673c2c66affSColin Finck #define DIKEYBOARD_F5                   (DIK_F5 | 0x81000400)
674c2c66affSColin Finck #define DIKEYBOARD_F6                   (DIK_F6 | 0x81000400)
675c2c66affSColin Finck #define DIKEYBOARD_F7                   (DIK_F7 | 0x81000400)
676c2c66affSColin Finck #define DIKEYBOARD_F8                   (DIK_F8 | 0x81000400)
677c2c66affSColin Finck #define DIKEYBOARD_F9                   (DIK_F9 | 0x81000400)
678c2c66affSColin Finck #define DIKEYBOARD_F10                  (DIK_F10 | 0x81000400)
679c2c66affSColin Finck #define DIKEYBOARD_NUMLOCK              (DIK_NUMLOCK | 0x81000400)
680c2c66affSColin Finck #define DIKEYBOARD_SCROLL               (DIK_SCROLL | 0x81000400)
681c2c66affSColin Finck #define DIKEYBOARD_NUMPAD7              (DIK_NUMPAD7 | 0x81000400)
682c2c66affSColin Finck #define DIKEYBOARD_NUMPAD8              (DIK_NUMPAD8 | 0x81000400)
683c2c66affSColin Finck #define DIKEYBOARD_NUMPAD9              (DIK_NUMPAD9 | 0x81000400)
684c2c66affSColin Finck #define DIKEYBOARD_SUBTRACT             (DIK_SUBTRACT | 0x81000400)
685c2c66affSColin Finck #define DIKEYBOARD_NUMPAD4              (DIK_NUMPAD4 | 0x81000400)
686c2c66affSColin Finck #define DIKEYBOARD_NUMPAD5              (DIK_NUMPAD5 | 0x81000400)
687c2c66affSColin Finck #define DIKEYBOARD_NUMPAD6              (DIK_NUMPAD6 | 0x81000400)
688c2c66affSColin Finck #define DIKEYBOARD_ADD                  (DIK_ADD | 0x81000400)
689c2c66affSColin Finck #define DIKEYBOARD_NUMPAD1              (DIK_NUMPAD1 | 0x81000400)
690c2c66affSColin Finck #define DIKEYBOARD_NUMPAD2              (DIK_NUMPAD2 | 0x81000400)
691c2c66affSColin Finck #define DIKEYBOARD_NUMPAD3              (DIK_NUMPAD3 | 0x81000400)
692c2c66affSColin Finck #define DIKEYBOARD_NUMPAD0              (DIK_NUMPAD0 | 0x81000400)
693c2c66affSColin Finck #define DIKEYBOARD_DECIMAL              (DIK_DECIMAL | 0x81000400)
694c2c66affSColin Finck #define DIKEYBOARD_F11                  (DIK_F11 | 0x81000400)
695c2c66affSColin Finck #define DIKEYBOARD_F12                  (DIK_F12 | 0x81000400)
696c2c66affSColin Finck #define DIKEYBOARD_F13                  (DIK_F13 | 0x81000400)
697c2c66affSColin Finck #define DIKEYBOARD_F14                  (DIK_F14 | 0x81000400)
698c2c66affSColin Finck #define DIKEYBOARD_F15                  (DIK_F15 | 0x81000400)
699c2c66affSColin Finck #define DIKEYBOARD_KANA                 (DIK_KANA | 0x81000400)
700c2c66affSColin Finck #define DIKEYBOARD_CONVERT              (DIK_CONVERT | 0x81000400)
701c2c66affSColin Finck #define DIKEYBOARD_NOCONVERT            (DIK_NOCONVERT | 0x81000400)
702c2c66affSColin Finck #define DIKEYBOARD_YEN                  (DIK_YEN | 0x81000400)
703c2c66affSColin Finck #define DIKEYBOARD_NUMPADEQUALS         (DIK_NUMPADEQUALS | 0x81000400)
704c2c66affSColin Finck #define DIKEYBOARD_CIRCUMFLEX           (DIK_CIRCUMFLEX | 0x81000400)
705c2c66affSColin Finck #define DIKEYBOARD_AT                   (DIK_AT | 0x81000400)
706c2c66affSColin Finck #define DIKEYBOARD_COLON                (DIK_COLON | 0x81000400)
707c2c66affSColin Finck #define DIKEYBOARD_UNDERLINE            (DIK_UNDERLINE | 0x81000400)
708c2c66affSColin Finck #define DIKEYBOARD_KANJI                (DIK_KANJI | 0x81000400)
709c2c66affSColin Finck #define DIKEYBOARD_STOP                 (DIK_STOP | 0x81000400)
710c2c66affSColin Finck #define DIKEYBOARD_AX                   (DIK_AX | 0x81000400)
711c2c66affSColin Finck #define DIKEYBOARD_UNLABELED            (DIK_UNLABELED | 0x81000400)
712c2c66affSColin Finck #define DIKEYBOARD_NUMPADENTER          (DIK_NUMPADENTER | 0x81000400)
713c2c66affSColin Finck #define DIKEYBOARD_RCONTROL             (DIK_RCONTROL | 0x81000400)
714c2c66affSColin Finck #define DIKEYBOARD_NUMPADCOMMA          (DIK_NUMPADCOMMA | 0x81000400)
715c2c66affSColin Finck #define DIKEYBOARD_DIVIDE               (DIK_DIVIDE | 0x81000400)
716c2c66affSColin Finck #define DIKEYBOARD_SYSRQ                (DIK_SYSRQ | 0x81000400)
717c2c66affSColin Finck #define DIKEYBOARD_RMENU                (DIK_RMENU | 0x81000400)
718c2c66affSColin Finck #define DIKEYBOARD_PAUSE                (DIK_PAUSE | 0x81000400)
719c2c66affSColin Finck #define DIKEYBOARD_HOME                 (DIK_HOME | 0x81000400)
720c2c66affSColin Finck #define DIKEYBOARD_UP                   (DIK_UP | 0x81000400)
721c2c66affSColin Finck #define DIKEYBOARD_PRIOR                (DIK_PRIOR | 0x81000400)
722c2c66affSColin Finck #define DIKEYBOARD_LEFT                 (DIK_LEFT | 0x81000400)
723c2c66affSColin Finck #define DIKEYBOARD_RIGHT                (DIK_RIGHT | 0x81000400)
724c2c66affSColin Finck #define DIKEYBOARD_END                  (DIK_END | 0x81000400)
725c2c66affSColin Finck #define DIKEYBOARD_DOWN                 (DIK_DOWN | 0x81000400)
726c2c66affSColin Finck #define DIKEYBOARD_NEXT                 (DIK_NEXT | 0x81000400)
727c2c66affSColin Finck #define DIKEYBOARD_INSERT               (DIK_INSERT | 0x81000400)
728c2c66affSColin Finck #define DIKEYBOARD_DELETE               (DIK_DELETE | 0x81000400)
729c2c66affSColin Finck #define DIKEYBOARD_LWIN                 (DIK_LWIN | 0x81000400)
730c2c66affSColin Finck #define DIKEYBOARD_RWIN                 (DIK_RWIN | 0x81000400)
731c2c66affSColin Finck #define DIKEYBOARD_APPS                 (DIK_APPS | 0x81000400)
732c2c66affSColin Finck #define DIKEYBOARD_POWER                (DIK_POWER | 0x81000400)
733c2c66affSColin Finck #define DIKEYBOARD_SLEEP                (DIK_SLEEP | 0x81000400)
734c2c66affSColin Finck #define DIKEYBOARD_BACKSPACE            (DIK_BACKSPACE | 0x81000400)
735c2c66affSColin Finck #define DIKEYBOARD_NUMPADSTAR           (DIK_NUMPADSTAR | 0x81000400)
736c2c66affSColin Finck #define DIKEYBOARD_LALT                 (DIK_LALT | 0x81000400)
737c2c66affSColin Finck #define DIKEYBOARD_CAPSLOCK             (DIK_CAPSLOCK | 0x81000400)
738c2c66affSColin Finck #define DIKEYBOARD_NUMPADMINUS          (DIK_NUMPADMINUS | 0x81000400)
739c2c66affSColin Finck #define DIKEYBOARD_NUMPADPLUS           (DIK_NUMPADPLUS | 0x81000400)
740c2c66affSColin Finck #define DIKEYBOARD_NUMPADPERIOD         (DIK_NUMPADPERIOD | 0x81000400)
741c2c66affSColin Finck #define DIKEYBOARD_NUMPADSLASH          (DIK_NUMPADSLASH | 0x81000400)
742c2c66affSColin Finck #define DIKEYBOARD_RALT                 (DIK_RALT | 0x81000400)
743c2c66affSColin Finck #define DIKEYBOARD_UPARROW              (DIK_UPARROW | 0x81000400)
744c2c66affSColin Finck #define DIKEYBOARD_PGUP                 (DIK_PGUP | 0x81000400)
745c2c66affSColin Finck #define DIKEYBOARD_LEFTARROW            (DIK_LEFTARROW | 0x81000400)
746c2c66affSColin Finck #define DIKEYBOARD_RIGHTARROW           (DIK_RIGHTARROW | 0x81000400)
747c2c66affSColin Finck #define DIKEYBOARD_DOWNARROW            (DIK_DOWNARROW | 0x81000400)
748c2c66affSColin Finck #define DIKEYBOARD_PGDN                 (DIK_PGDN | 0x81000400)
749c2c66affSColin Finck 
750c2c66affSColin Finck #define DIDFT_ALL		0x00000000
751c2c66affSColin Finck #define DIDFT_RELAXIS		0x00000001
752c2c66affSColin Finck #define DIDFT_ABSAXIS		0x00000002
753c2c66affSColin Finck #define DIDFT_AXIS		0x00000003
754c2c66affSColin Finck #define DIDFT_PSHBUTTON		0x00000004
755c2c66affSColin Finck #define DIDFT_TGLBUTTON		0x00000008
756c2c66affSColin Finck #define DIDFT_BUTTON		0x0000000C
757c2c66affSColin Finck #define DIDFT_POV		0x00000010
758c2c66affSColin Finck #define DIDFT_COLLECTION	0x00000040
759c2c66affSColin Finck #define DIDFT_NODATA		0x00000080
760c2c66affSColin Finck #define DIDFT_ANYINSTANCE	0x00FFFF00
761c2c66affSColin Finck #define DIDFT_INSTANCEMASK	DIDFT_ANYINSTANCE
762c2c66affSColin Finck #define DIDFT_MAKEINSTANCE(n)	((WORD)(n) << 8)
763c2c66affSColin Finck #define DIDFT_GETTYPE(n)	LOBYTE(n)
764c2c66affSColin Finck #define DIDFT_GETINSTANCE(n)	LOWORD((n) >> 8)
765c2c66affSColin Finck #define DIDFT_FFACTUATOR	0x01000000
766c2c66affSColin Finck #define DIDFT_FFEFFECTTRIGGER	0x02000000
767c2c66affSColin Finck #define DIDFT_OUTPUT		0x10000000
768c2c66affSColin Finck #define DIDFT_VENDORDEFINED	0x04000000
769c2c66affSColin Finck #define DIDFT_ALIAS		0x08000000
770c2c66affSColin Finck #ifndef DIDFT_OPTIONAL
771c2c66affSColin Finck #define DIDFT_OPTIONAL		0x80000000
772c2c66affSColin Finck #endif
773c2c66affSColin Finck #define DIDFT_ENUMCOLLECTION(n)	((WORD)(n) << 8)
774c2c66affSColin Finck #define DIDFT_NOCOLLECTION	0x00FFFF00
775c2c66affSColin Finck #define DIDF_ABSAXIS		0x00000001
776c2c66affSColin Finck #define DIDF_RELAXIS		0x00000002
777c2c66affSColin Finck 
778c2c66affSColin Finck #define DIGDD_PEEK		0x00000001
779c2c66affSColin Finck 
780c2c66affSColin Finck #define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0)
781c2c66affSColin Finck 
782c2c66affSColin Finck typedef struct DIDEVICEOBJECTDATA_DX3 {
783c2c66affSColin Finck     DWORD	dwOfs;
784c2c66affSColin Finck     DWORD	dwData;
785c2c66affSColin Finck     DWORD	dwTimeStamp;
786c2c66affSColin Finck     DWORD	dwSequence;
787c2c66affSColin Finck } DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;
788c2c66affSColin Finck typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;
789c2c66affSColin Finck 
790c2c66affSColin Finck typedef struct DIDEVICEOBJECTDATA {
791c2c66affSColin Finck     DWORD	dwOfs;
792c2c66affSColin Finck     DWORD	dwData;
793c2c66affSColin Finck     DWORD	dwTimeStamp;
794c2c66affSColin Finck     DWORD	dwSequence;
795c2c66affSColin Finck     UINT_PTR	uAppData;
796c2c66affSColin Finck } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
797c2c66affSColin Finck typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
798c2c66affSColin Finck 
799c2c66affSColin Finck typedef struct _DIOBJECTDATAFORMAT {
800c2c66affSColin Finck     const GUID *pguid;
801c2c66affSColin Finck     DWORD	dwOfs;
802c2c66affSColin Finck     DWORD	dwType;
803c2c66affSColin Finck     DWORD	dwFlags;
804c2c66affSColin Finck } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
805c2c66affSColin Finck typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
806c2c66affSColin Finck 
807c2c66affSColin Finck typedef struct _DIDATAFORMAT {
808c2c66affSColin Finck     DWORD			dwSize;
809c2c66affSColin Finck     DWORD			dwObjSize;
810c2c66affSColin Finck     DWORD			dwFlags;
811c2c66affSColin Finck     DWORD			dwDataSize;
812c2c66affSColin Finck     DWORD			dwNumObjs;
813c2c66affSColin Finck     LPDIOBJECTDATAFORMAT	rgodf;
814c2c66affSColin Finck } DIDATAFORMAT, *LPDIDATAFORMAT;
815c2c66affSColin Finck typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
816c2c66affSColin Finck 
817c2c66affSColin Finck #define DIDOI_FFACTUATOR	0x00000001
818c2c66affSColin Finck #define DIDOI_FFEFFECTTRIGGER	0x00000002
819c2c66affSColin Finck #define DIDOI_POLLED		0x00008000
820c2c66affSColin Finck #define DIDOI_ASPECTPOSITION	0x00000100
821c2c66affSColin Finck #define DIDOI_ASPECTVELOCITY	0x00000200
822c2c66affSColin Finck #define DIDOI_ASPECTACCEL	0x00000300
823c2c66affSColin Finck #define DIDOI_ASPECTFORCE	0x00000400
824c2c66affSColin Finck #define DIDOI_ASPECTMASK	0x00000F00
825c2c66affSColin Finck #define DIDOI_GUIDISUSAGE	0x00010000
826c2c66affSColin Finck 
827c2c66affSColin Finck typedef struct DIPROPHEADER {
828c2c66affSColin Finck     DWORD	dwSize;
829c2c66affSColin Finck     DWORD	dwHeaderSize;
830c2c66affSColin Finck     DWORD	dwObj;
831c2c66affSColin Finck     DWORD	dwHow;
832c2c66affSColin Finck } DIPROPHEADER,*LPDIPROPHEADER;
833c2c66affSColin Finck typedef const DIPROPHEADER *LPCDIPROPHEADER;
834c2c66affSColin Finck 
835c2c66affSColin Finck #define DIPH_DEVICE	0
836c2c66affSColin Finck #define DIPH_BYOFFSET	1
837c2c66affSColin Finck #define DIPH_BYID	2
838c2c66affSColin Finck #define DIPH_BYUSAGE	3
839c2c66affSColin Finck 
840c2c66affSColin Finck #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
841c2c66affSColin Finck 
842c2c66affSColin Finck typedef struct DIPROPDWORD {
843c2c66affSColin Finck 	DIPROPHEADER	diph;
844c2c66affSColin Finck 	DWORD		dwData;
845c2c66affSColin Finck } DIPROPDWORD, *LPDIPROPDWORD;
846c2c66affSColin Finck typedef const DIPROPDWORD *LPCDIPROPDWORD;
847c2c66affSColin Finck 
848c2c66affSColin Finck typedef struct DIPROPRANGE {
849c2c66affSColin Finck 	DIPROPHEADER	diph;
850c2c66affSColin Finck 	LONG		lMin;
851c2c66affSColin Finck 	LONG		lMax;
852c2c66affSColin Finck } DIPROPRANGE, *LPDIPROPRANGE;
853c2c66affSColin Finck typedef const DIPROPRANGE *LPCDIPROPRANGE;
854c2c66affSColin Finck 
855c2c66affSColin Finck #define DIPROPRANGE_NOMIN	((LONG)0x80000000)
856c2c66affSColin Finck #define DIPROPRANGE_NOMAX	((LONG)0x7FFFFFFF)
857c2c66affSColin Finck 
858c2c66affSColin Finck typedef struct DIPROPCAL {
859c2c66affSColin Finck 	DIPROPHEADER diph;
860c2c66affSColin Finck 	LONG	lMin;
861c2c66affSColin Finck 	LONG	lCenter;
862c2c66affSColin Finck 	LONG	lMax;
863c2c66affSColin Finck } DIPROPCAL, *LPDIPROPCAL;
864c2c66affSColin Finck typedef const DIPROPCAL *LPCDIPROPCAL;
865c2c66affSColin Finck 
866c2c66affSColin Finck typedef struct DIPROPGUIDANDPATH {
867c2c66affSColin Finck 	DIPROPHEADER diph;
868c2c66affSColin Finck 	GUID    guidClass;
869c2c66affSColin Finck 	WCHAR   wszPath[MAX_PATH];
870c2c66affSColin Finck } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
871c2c66affSColin Finck typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
872c2c66affSColin Finck 
873c2c66affSColin Finck typedef struct DIPROPSTRING {
874c2c66affSColin Finck         DIPROPHEADER diph;
875c2c66affSColin Finck         WCHAR        wsz[MAX_PATH];
876c2c66affSColin Finck } DIPROPSTRING, *LPDIPROPSTRING;
877c2c66affSColin Finck typedef const DIPROPSTRING *LPCDIPROPSTRING;
878c2c66affSColin Finck 
879c2c66affSColin Finck /* special property GUIDs */
880c2c66affSColin Finck #ifdef __cplusplus
881c2c66affSColin Finck #define MAKEDIPROP(prop)	(*(const GUID *)(prop))
882c2c66affSColin Finck #else
883c2c66affSColin Finck #define MAKEDIPROP(prop)	((REFGUID)(prop))
884c2c66affSColin Finck #endif
885c2c66affSColin Finck #define DIPROP_BUFFERSIZE	MAKEDIPROP(1)
886c2c66affSColin Finck #define DIPROP_AXISMODE		MAKEDIPROP(2)
887c2c66affSColin Finck 
888c2c66affSColin Finck #define DIPROPAXISMODE_ABS	0
889c2c66affSColin Finck #define DIPROPAXISMODE_REL	1
890c2c66affSColin Finck 
891c2c66affSColin Finck #define DIPROP_GRANULARITY	MAKEDIPROP(3)
892c2c66affSColin Finck #define DIPROP_RANGE		MAKEDIPROP(4)
893c2c66affSColin Finck #define DIPROP_DEADZONE		MAKEDIPROP(5)
894c2c66affSColin Finck #define DIPROP_SATURATION	MAKEDIPROP(6)
895c2c66affSColin Finck #define DIPROP_FFGAIN		MAKEDIPROP(7)
896c2c66affSColin Finck #define DIPROP_FFLOAD		MAKEDIPROP(8)
897c2c66affSColin Finck #define DIPROP_AUTOCENTER	MAKEDIPROP(9)
898c2c66affSColin Finck 
899c2c66affSColin Finck #define DIPROPAUTOCENTER_OFF	0
900c2c66affSColin Finck #define DIPROPAUTOCENTER_ON	1
901c2c66affSColin Finck 
902c2c66affSColin Finck #define DIPROP_CALIBRATIONMODE	MAKEDIPROP(10)
903c2c66affSColin Finck 
904c2c66affSColin Finck #define DIPROPCALIBRATIONMODE_COOKED	0
905c2c66affSColin Finck #define DIPROPCALIBRATIONMODE_RAW	1
906c2c66affSColin Finck 
907c2c66affSColin Finck #define DIPROP_CALIBRATION	MAKEDIPROP(11)
908c2c66affSColin Finck #define DIPROP_GUIDANDPATH	MAKEDIPROP(12)
909c2c66affSColin Finck 
910c2c66affSColin Finck #define DIPROP_INSTANCENAME     MAKEDIPROP(13)
911c2c66affSColin Finck #define DIPROP_PRODUCTNAME      MAKEDIPROP(14)
912c2c66affSColin Finck #define DIPROP_JOYSTICKID       MAKEDIPROP(15)
913c2c66affSColin Finck 
914c2c66affSColin Finck #define DIPROP_KEYNAME     MAKEDIPROP(20)
915c2c66affSColin Finck #define DIPROP_CPOINTS     MAKEDIPROP(21)
916c2c66affSColin Finck #define DIPROP_APPDATA     MAKEDIPROP(22)
917c2c66affSColin Finck #define DIPROP_SCANCODE    MAKEDIPROP(23)
918c2c66affSColin Finck #define DIPROP_VIDPID      MAKEDIPROP(24)
919c2c66affSColin Finck #define DIPROP_USERNAME    MAKEDIPROP(25)
920c2c66affSColin Finck #define DIPROP_TYPENAME    MAKEDIPROP(26)
921c2c66affSColin Finck 
922c2c66affSColin Finck typedef struct DIDEVCAPS_DX3 {
923c2c66affSColin Finck     DWORD	dwSize;
924c2c66affSColin Finck     DWORD	dwFlags;
925c2c66affSColin Finck     DWORD	dwDevType;
926c2c66affSColin Finck     DWORD	dwAxes;
927c2c66affSColin Finck     DWORD	dwButtons;
928c2c66affSColin Finck     DWORD	dwPOVs;
929c2c66affSColin Finck } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
930c2c66affSColin Finck 
931c2c66affSColin Finck typedef struct DIDEVCAPS {
932c2c66affSColin Finck     DWORD	dwSize;
933c2c66affSColin Finck     DWORD	dwFlags;
934c2c66affSColin Finck     DWORD	dwDevType;
935c2c66affSColin Finck     DWORD	dwAxes;
936c2c66affSColin Finck     DWORD	dwButtons;
937c2c66affSColin Finck     DWORD	dwPOVs;
938c2c66affSColin Finck     DWORD	dwFFSamplePeriod;
939c2c66affSColin Finck     DWORD	dwFFMinTimeResolution;
940c2c66affSColin Finck     DWORD	dwFirmwareRevision;
941c2c66affSColin Finck     DWORD	dwHardwareRevision;
942c2c66affSColin Finck     DWORD	dwFFDriverVersion;
943c2c66affSColin Finck } DIDEVCAPS,*LPDIDEVCAPS;
944c2c66affSColin Finck 
945c2c66affSColin Finck #define DIDC_ATTACHED		0x00000001
946c2c66affSColin Finck #define DIDC_POLLEDDEVICE	0x00000002
947c2c66affSColin Finck #define DIDC_EMULATED		0x00000004
948c2c66affSColin Finck #define DIDC_POLLEDDATAFORMAT	0x00000008
949c2c66affSColin Finck #define DIDC_FORCEFEEDBACK	0x00000100
950c2c66affSColin Finck #define DIDC_FFATTACK		0x00000200
951c2c66affSColin Finck #define DIDC_FFFADE		0x00000400
952c2c66affSColin Finck #define DIDC_SATURATION		0x00000800
953c2c66affSColin Finck #define DIDC_POSNEGCOEFFICIENTS	0x00001000
954c2c66affSColin Finck #define DIDC_POSNEGSATURATION	0x00002000
955c2c66affSColin Finck #define DIDC_DEADBAND		0x00004000
956c2c66affSColin Finck #define DIDC_STARTDELAY		0x00008000
957c2c66affSColin Finck #define DIDC_ALIAS		0x00010000
958c2c66affSColin Finck #define DIDC_PHANTOM		0x00020000
959c2c66affSColin Finck #define DIDC_HIDDEN		0x00040000
960c2c66affSColin Finck 
961c2c66affSColin Finck 
962c2c66affSColin Finck /* SetCooperativeLevel dwFlags */
963c2c66affSColin Finck #define DISCL_EXCLUSIVE		0x00000001
964c2c66affSColin Finck #define DISCL_NONEXCLUSIVE	0x00000002
965c2c66affSColin Finck #define DISCL_FOREGROUND	0x00000004
966c2c66affSColin Finck #define DISCL_BACKGROUND	0x00000008
967c2c66affSColin Finck #define DISCL_NOWINKEY          0x00000010
968c2c66affSColin Finck 
969c2c66affSColin Finck /* Device FF flags */
970c2c66affSColin Finck #define DISFFC_RESET            0x00000001
971c2c66affSColin Finck #define DISFFC_STOPALL          0x00000002
972c2c66affSColin Finck #define DISFFC_PAUSE            0x00000004
973c2c66affSColin Finck #define DISFFC_CONTINUE         0x00000008
974c2c66affSColin Finck #define DISFFC_SETACTUATORSON   0x00000010
975c2c66affSColin Finck #define DISFFC_SETACTUATORSOFF  0x00000020
976c2c66affSColin Finck 
977c2c66affSColin Finck #define DIGFFS_EMPTY            0x00000001
978c2c66affSColin Finck #define DIGFFS_STOPPED          0x00000002
979c2c66affSColin Finck #define DIGFFS_PAUSED           0x00000004
980c2c66affSColin Finck #define DIGFFS_ACTUATORSON      0x00000010
981c2c66affSColin Finck #define DIGFFS_ACTUATORSOFF     0x00000020
982c2c66affSColin Finck #define DIGFFS_POWERON          0x00000040
983c2c66affSColin Finck #define DIGFFS_POWEROFF         0x00000080
984c2c66affSColin Finck #define DIGFFS_SAFETYSWITCHON   0x00000100
985c2c66affSColin Finck #define DIGFFS_SAFETYSWITCHOFF  0x00000200
986c2c66affSColin Finck #define DIGFFS_USERFFSWITCHON   0x00000400
987c2c66affSColin Finck #define DIGFFS_USERFFSWITCHOFF  0x00000800
988c2c66affSColin Finck #define DIGFFS_DEVICELOST       0x80000000
989c2c66affSColin Finck 
990c2c66affSColin Finck /* Effect flags */
991c2c66affSColin Finck #define DIEFT_ALL		0x00000000
992c2c66affSColin Finck 
993c2c66affSColin Finck #define DIEFT_CONSTANTFORCE	0x00000001
994c2c66affSColin Finck #define DIEFT_RAMPFORCE		0x00000002
995c2c66affSColin Finck #define DIEFT_PERIODIC		0x00000003
996c2c66affSColin Finck #define DIEFT_CONDITION		0x00000004
997c2c66affSColin Finck #define DIEFT_CUSTOMFORCE	0x00000005
998c2c66affSColin Finck #define DIEFT_HARDWARE		0x000000FF
999c2c66affSColin Finck #define DIEFT_FFATTACK		0x00000200
1000c2c66affSColin Finck #define DIEFT_FFFADE		0x00000400
1001c2c66affSColin Finck #define DIEFT_SATURATION	0x00000800
1002c2c66affSColin Finck #define DIEFT_POSNEGCOEFFICIENTS 0x00001000
1003c2c66affSColin Finck #define DIEFT_POSNEGSATURATION	0x00002000
1004c2c66affSColin Finck #define DIEFT_DEADBAND		0x00004000
1005c2c66affSColin Finck #define DIEFT_STARTDELAY	0x00008000
1006c2c66affSColin Finck #define DIEFT_GETTYPE(n)	LOBYTE(n)
1007c2c66affSColin Finck 
1008c2c66affSColin Finck #define DIEFF_OBJECTIDS         0x00000001
1009c2c66affSColin Finck #define DIEFF_OBJECTOFFSETS     0x00000002
1010c2c66affSColin Finck #define DIEFF_CARTESIAN         0x00000010
1011c2c66affSColin Finck #define DIEFF_POLAR             0x00000020
1012c2c66affSColin Finck #define DIEFF_SPHERICAL         0x00000040
1013c2c66affSColin Finck 
1014c2c66affSColin Finck #define DIEP_DURATION           0x00000001
1015c2c66affSColin Finck #define DIEP_SAMPLEPERIOD       0x00000002
1016c2c66affSColin Finck #define DIEP_GAIN               0x00000004
1017c2c66affSColin Finck #define DIEP_TRIGGERBUTTON      0x00000008
1018c2c66affSColin Finck #define DIEP_TRIGGERREPEATINTERVAL 0x00000010
1019c2c66affSColin Finck #define DIEP_AXES               0x00000020
1020c2c66affSColin Finck #define DIEP_DIRECTION          0x00000040
1021c2c66affSColin Finck #define DIEP_ENVELOPE           0x00000080
1022c2c66affSColin Finck #define DIEP_TYPESPECIFICPARAMS 0x00000100
1023c2c66affSColin Finck #define DIEP_STARTDELAY         0x00000200
1024c2c66affSColin Finck #define DIEP_ALLPARAMS_DX5      0x000001FF
1025c2c66affSColin Finck #define DIEP_ALLPARAMS          0x000003FF
1026c2c66affSColin Finck #define DIEP_START              0x20000000
1027c2c66affSColin Finck #define DIEP_NORESTART          0x40000000
1028c2c66affSColin Finck #define DIEP_NODOWNLOAD         0x80000000
1029c2c66affSColin Finck #define DIEB_NOTRIGGER          0xFFFFFFFF
1030c2c66affSColin Finck 
1031c2c66affSColin Finck #define DIES_SOLO               0x00000001
1032c2c66affSColin Finck #define DIES_NODOWNLOAD         0x80000000
1033c2c66affSColin Finck 
1034c2c66affSColin Finck #define DIEGES_PLAYING          0x00000001
1035c2c66affSColin Finck #define DIEGES_EMULATED         0x00000002
1036c2c66affSColin Finck 
1037c2c66affSColin Finck #define DI_DEGREES		100
1038c2c66affSColin Finck #define DI_FFNOMINALMAX		10000
1039c2c66affSColin Finck #define DI_SECONDS		1000000
1040c2c66affSColin Finck 
1041c2c66affSColin Finck typedef struct DICONSTANTFORCE {
1042c2c66affSColin Finck 	LONG			lMagnitude;
1043c2c66affSColin Finck } DICONSTANTFORCE, *LPDICONSTANTFORCE;
1044c2c66affSColin Finck typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
1045c2c66affSColin Finck 
1046c2c66affSColin Finck typedef struct DIRAMPFORCE {
1047c2c66affSColin Finck 	LONG			lStart;
1048c2c66affSColin Finck 	LONG			lEnd;
1049c2c66affSColin Finck } DIRAMPFORCE, *LPDIRAMPFORCE;
1050c2c66affSColin Finck typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
1051c2c66affSColin Finck 
1052c2c66affSColin Finck typedef struct DIPERIODIC {
1053c2c66affSColin Finck 	DWORD			dwMagnitude;
1054c2c66affSColin Finck 	LONG			lOffset;
1055c2c66affSColin Finck 	DWORD			dwPhase;
1056c2c66affSColin Finck 	DWORD			dwPeriod;
1057c2c66affSColin Finck } DIPERIODIC, *LPDIPERIODIC;
1058c2c66affSColin Finck typedef const DIPERIODIC *LPCDIPERIODIC;
1059c2c66affSColin Finck 
1060c2c66affSColin Finck typedef struct DICONDITION {
1061c2c66affSColin Finck 	LONG			lOffset;
1062c2c66affSColin Finck 	LONG			lPositiveCoefficient;
1063c2c66affSColin Finck 	LONG			lNegativeCoefficient;
1064c2c66affSColin Finck 	DWORD			dwPositiveSaturation;
1065c2c66affSColin Finck 	DWORD			dwNegativeSaturation;
1066c2c66affSColin Finck 	LONG			lDeadBand;
1067c2c66affSColin Finck } DICONDITION, *LPDICONDITION;
1068c2c66affSColin Finck typedef const DICONDITION *LPCDICONDITION;
1069c2c66affSColin Finck 
1070c2c66affSColin Finck typedef struct DICUSTOMFORCE {
1071c2c66affSColin Finck 	DWORD			cChannels;
1072c2c66affSColin Finck 	DWORD			dwSamplePeriod;
1073c2c66affSColin Finck 	DWORD			cSamples;
1074c2c66affSColin Finck 	LPLONG			rglForceData;
1075c2c66affSColin Finck } DICUSTOMFORCE, *LPDICUSTOMFORCE;
1076c2c66affSColin Finck typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
1077c2c66affSColin Finck 
1078c2c66affSColin Finck typedef struct DIENVELOPE {
1079c2c66affSColin Finck 	DWORD			dwSize;
1080c2c66affSColin Finck 	DWORD			dwAttackLevel;
1081c2c66affSColin Finck 	DWORD			dwAttackTime;
1082c2c66affSColin Finck 	DWORD			dwFadeLevel;
1083c2c66affSColin Finck 	DWORD			dwFadeTime;
1084c2c66affSColin Finck } DIENVELOPE, *LPDIENVELOPE;
1085c2c66affSColin Finck typedef const DIENVELOPE *LPCDIENVELOPE;
1086c2c66affSColin Finck 
1087c2c66affSColin Finck typedef struct DIEFFECT_DX5 {
1088c2c66affSColin Finck 	DWORD			dwSize;
1089c2c66affSColin Finck 	DWORD			dwFlags;
1090c2c66affSColin Finck 	DWORD			dwDuration;
1091c2c66affSColin Finck 	DWORD			dwSamplePeriod;
1092c2c66affSColin Finck 	DWORD			dwGain;
1093c2c66affSColin Finck 	DWORD			dwTriggerButton;
1094c2c66affSColin Finck 	DWORD			dwTriggerRepeatInterval;
1095c2c66affSColin Finck 	DWORD			cAxes;
1096c2c66affSColin Finck 	LPDWORD			rgdwAxes;
1097c2c66affSColin Finck 	LPLONG			rglDirection;
1098c2c66affSColin Finck 	LPDIENVELOPE		lpEnvelope;
1099c2c66affSColin Finck 	DWORD			cbTypeSpecificParams;
1100c2c66affSColin Finck 	LPVOID			lpvTypeSpecificParams;
1101c2c66affSColin Finck } DIEFFECT_DX5, *LPDIEFFECT_DX5;
1102c2c66affSColin Finck typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
1103c2c66affSColin Finck 
1104c2c66affSColin Finck typedef struct DIEFFECT {
1105c2c66affSColin Finck 	DWORD			dwSize;
1106c2c66affSColin Finck 	DWORD			dwFlags;
1107c2c66affSColin Finck 	DWORD			dwDuration;
1108c2c66affSColin Finck 	DWORD			dwSamplePeriod;
1109c2c66affSColin Finck 	DWORD			dwGain;
1110c2c66affSColin Finck 	DWORD			dwTriggerButton;
1111c2c66affSColin Finck 	DWORD			dwTriggerRepeatInterval;
1112c2c66affSColin Finck 	DWORD			cAxes;
1113c2c66affSColin Finck 	LPDWORD			rgdwAxes;
1114c2c66affSColin Finck 	LPLONG			rglDirection;
1115c2c66affSColin Finck 	LPDIENVELOPE		lpEnvelope;
1116c2c66affSColin Finck 	DWORD			cbTypeSpecificParams;
1117c2c66affSColin Finck 	LPVOID			lpvTypeSpecificParams;
1118c2c66affSColin Finck 	DWORD			dwStartDelay;
1119c2c66affSColin Finck } DIEFFECT, *LPDIEFFECT;
1120c2c66affSColin Finck typedef const DIEFFECT *LPCDIEFFECT;
1121c2c66affSColin Finck typedef DIEFFECT DIEFFECT_DX6;
1122c2c66affSColin Finck typedef LPDIEFFECT LPDIEFFECT_DX6;
1123c2c66affSColin Finck 
1124c2c66affSColin Finck typedef struct DIEFFECTINFOA {
1125c2c66affSColin Finck 	DWORD			dwSize;
1126c2c66affSColin Finck 	GUID			guid;
1127c2c66affSColin Finck 	DWORD			dwEffType;
1128c2c66affSColin Finck 	DWORD			dwStaticParams;
1129c2c66affSColin Finck 	DWORD			dwDynamicParams;
1130c2c66affSColin Finck 	CHAR			tszName[MAX_PATH];
1131c2c66affSColin Finck } DIEFFECTINFOA, *LPDIEFFECTINFOA;
1132c2c66affSColin Finck typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
1133c2c66affSColin Finck 
1134c2c66affSColin Finck typedef struct DIEFFECTINFOW {
1135c2c66affSColin Finck 	DWORD			dwSize;
1136c2c66affSColin Finck 	GUID			guid;
1137c2c66affSColin Finck 	DWORD			dwEffType;
1138c2c66affSColin Finck 	DWORD			dwStaticParams;
1139c2c66affSColin Finck 	DWORD			dwDynamicParams;
1140c2c66affSColin Finck 	WCHAR			tszName[MAX_PATH];
1141c2c66affSColin Finck } DIEFFECTINFOW, *LPDIEFFECTINFOW;
1142c2c66affSColin Finck typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
1143c2c66affSColin Finck 
1144c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
1145c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
1146c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
1147c2c66affSColin Finck 
1148c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
1149c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
1150c2c66affSColin Finck 
1151c2c66affSColin Finck typedef struct DIEFFESCAPE {
1152c2c66affSColin Finck 	DWORD	dwSize;
1153c2c66affSColin Finck 	DWORD	dwCommand;
1154c2c66affSColin Finck 	LPVOID	lpvInBuffer;
1155c2c66affSColin Finck 	DWORD	cbInBuffer;
1156c2c66affSColin Finck 	LPVOID	lpvOutBuffer;
1157c2c66affSColin Finck 	DWORD	cbOutBuffer;
1158c2c66affSColin Finck } DIEFFESCAPE, *LPDIEFFESCAPE;
1159c2c66affSColin Finck 
1160c2c66affSColin Finck typedef struct DIJOYSTATE {
1161c2c66affSColin Finck 	LONG	lX;
1162c2c66affSColin Finck 	LONG	lY;
1163c2c66affSColin Finck 	LONG	lZ;
1164c2c66affSColin Finck 	LONG	lRx;
1165c2c66affSColin Finck 	LONG	lRy;
1166c2c66affSColin Finck 	LONG	lRz;
1167c2c66affSColin Finck 	LONG	rglSlider[2];
1168c2c66affSColin Finck 	DWORD	rgdwPOV[4];
1169c2c66affSColin Finck 	BYTE	rgbButtons[32];
1170c2c66affSColin Finck } DIJOYSTATE, *LPDIJOYSTATE;
1171c2c66affSColin Finck 
1172c2c66affSColin Finck typedef struct DIJOYSTATE2 {
1173c2c66affSColin Finck 	LONG	lX;
1174c2c66affSColin Finck 	LONG	lY;
1175c2c66affSColin Finck 	LONG	lZ;
1176c2c66affSColin Finck 	LONG	lRx;
1177c2c66affSColin Finck 	LONG	lRy;
1178c2c66affSColin Finck 	LONG	lRz;
1179c2c66affSColin Finck 	LONG	rglSlider[2];
1180c2c66affSColin Finck 	DWORD	rgdwPOV[4];
1181c2c66affSColin Finck 	BYTE	rgbButtons[128];
1182c2c66affSColin Finck 	LONG	lVX;		/* 'v' as in velocity */
1183c2c66affSColin Finck 	LONG	lVY;
1184c2c66affSColin Finck 	LONG	lVZ;
1185c2c66affSColin Finck 	LONG	lVRx;
1186c2c66affSColin Finck 	LONG	lVRy;
1187c2c66affSColin Finck 	LONG	lVRz;
1188c2c66affSColin Finck 	LONG	rglVSlider[2];
1189c2c66affSColin Finck 	LONG	lAX;		/* 'a' as in acceleration */
1190c2c66affSColin Finck 	LONG	lAY;
1191c2c66affSColin Finck 	LONG	lAZ;
1192c2c66affSColin Finck 	LONG	lARx;
1193c2c66affSColin Finck 	LONG	lARy;
1194c2c66affSColin Finck 	LONG	lARz;
1195c2c66affSColin Finck 	LONG	rglASlider[2];
1196c2c66affSColin Finck 	LONG	lFX;		/* 'f' as in force */
1197c2c66affSColin Finck 	LONG	lFY;
1198c2c66affSColin Finck 	LONG	lFZ;
1199c2c66affSColin Finck 	LONG	lFRx;		/* 'fr' as in rotational force aka torque */
1200c2c66affSColin Finck 	LONG	lFRy;
1201c2c66affSColin Finck 	LONG	lFRz;
1202c2c66affSColin Finck 	LONG	rglFSlider[2];
1203c2c66affSColin Finck } DIJOYSTATE2, *LPDIJOYSTATE2;
1204c2c66affSColin Finck 
1205c2c66affSColin Finck #define DIJOFS_X		FIELD_OFFSET(DIJOYSTATE, lX)
1206c2c66affSColin Finck #define DIJOFS_Y		FIELD_OFFSET(DIJOYSTATE, lY)
1207c2c66affSColin Finck #define DIJOFS_Z		FIELD_OFFSET(DIJOYSTATE, lZ)
1208c2c66affSColin Finck #define DIJOFS_RX		FIELD_OFFSET(DIJOYSTATE, lRx)
1209c2c66affSColin Finck #define DIJOFS_RY		FIELD_OFFSET(DIJOYSTATE, lRy)
1210c2c66affSColin Finck #define DIJOFS_RZ		FIELD_OFFSET(DIJOYSTATE, lRz)
1211c2c66affSColin Finck #define DIJOFS_SLIDER(n)	(FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
1212c2c66affSColin Finck                                                         (n) * sizeof(LONG))
1213c2c66affSColin Finck #define DIJOFS_POV(n)		(FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
1214c2c66affSColin Finck                                                         (n) * sizeof(DWORD))
1215c2c66affSColin Finck #define DIJOFS_BUTTON(n)	(FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
1216c2c66affSColin Finck #define DIJOFS_BUTTON0		DIJOFS_BUTTON(0)
1217c2c66affSColin Finck #define DIJOFS_BUTTON1		DIJOFS_BUTTON(1)
1218c2c66affSColin Finck #define DIJOFS_BUTTON2		DIJOFS_BUTTON(2)
1219c2c66affSColin Finck #define DIJOFS_BUTTON3		DIJOFS_BUTTON(3)
1220c2c66affSColin Finck #define DIJOFS_BUTTON4		DIJOFS_BUTTON(4)
1221c2c66affSColin Finck #define DIJOFS_BUTTON5		DIJOFS_BUTTON(5)
1222c2c66affSColin Finck #define DIJOFS_BUTTON6		DIJOFS_BUTTON(6)
1223c2c66affSColin Finck #define DIJOFS_BUTTON7		DIJOFS_BUTTON(7)
1224c2c66affSColin Finck #define DIJOFS_BUTTON8		DIJOFS_BUTTON(8)
1225c2c66affSColin Finck #define DIJOFS_BUTTON9		DIJOFS_BUTTON(9)
1226c2c66affSColin Finck #define DIJOFS_BUTTON10		DIJOFS_BUTTON(10)
1227c2c66affSColin Finck #define DIJOFS_BUTTON11		DIJOFS_BUTTON(11)
1228c2c66affSColin Finck #define DIJOFS_BUTTON12		DIJOFS_BUTTON(12)
1229c2c66affSColin Finck #define DIJOFS_BUTTON13		DIJOFS_BUTTON(13)
1230c2c66affSColin Finck #define DIJOFS_BUTTON14		DIJOFS_BUTTON(14)
1231c2c66affSColin Finck #define DIJOFS_BUTTON15		DIJOFS_BUTTON(15)
1232c2c66affSColin Finck #define DIJOFS_BUTTON16		DIJOFS_BUTTON(16)
1233c2c66affSColin Finck #define DIJOFS_BUTTON17		DIJOFS_BUTTON(17)
1234c2c66affSColin Finck #define DIJOFS_BUTTON18		DIJOFS_BUTTON(18)
1235c2c66affSColin Finck #define DIJOFS_BUTTON19		DIJOFS_BUTTON(19)
1236c2c66affSColin Finck #define DIJOFS_BUTTON20		DIJOFS_BUTTON(20)
1237c2c66affSColin Finck #define DIJOFS_BUTTON21		DIJOFS_BUTTON(21)
1238c2c66affSColin Finck #define DIJOFS_BUTTON22		DIJOFS_BUTTON(22)
1239c2c66affSColin Finck #define DIJOFS_BUTTON23		DIJOFS_BUTTON(23)
1240c2c66affSColin Finck #define DIJOFS_BUTTON24		DIJOFS_BUTTON(24)
1241c2c66affSColin Finck #define DIJOFS_BUTTON25		DIJOFS_BUTTON(25)
1242c2c66affSColin Finck #define DIJOFS_BUTTON26		DIJOFS_BUTTON(26)
1243c2c66affSColin Finck #define DIJOFS_BUTTON27		DIJOFS_BUTTON(27)
1244c2c66affSColin Finck #define DIJOFS_BUTTON28		DIJOFS_BUTTON(28)
1245c2c66affSColin Finck #define DIJOFS_BUTTON29		DIJOFS_BUTTON(29)
1246c2c66affSColin Finck #define DIJOFS_BUTTON30		DIJOFS_BUTTON(30)
1247c2c66affSColin Finck #define DIJOFS_BUTTON31		DIJOFS_BUTTON(31)
1248c2c66affSColin Finck 
1249c2c66affSColin Finck /* DInput 7 structures, types */
1250c2c66affSColin Finck typedef struct DIFILEEFFECT {
1251c2c66affSColin Finck   DWORD       dwSize;
1252c2c66affSColin Finck   GUID        GuidEffect;
1253c2c66affSColin Finck   LPCDIEFFECT lpDiEffect;
1254c2c66affSColin Finck   CHAR        szFriendlyName[MAX_PATH];
1255c2c66affSColin Finck } DIFILEEFFECT, *LPDIFILEEFFECT;
1256c2c66affSColin Finck 
1257c2c66affSColin Finck typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
1258c2c66affSColin Finck typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
1259c2c66affSColin Finck 
1260c2c66affSColin Finck /* DInput 8 structures and types */
1261c2c66affSColin Finck typedef struct _DIACTIONA {
1262c2c66affSColin Finck 	UINT_PTR	uAppData;
1263c2c66affSColin Finck 	DWORD		dwSemantic;
1264c2c66affSColin Finck 	DWORD		dwFlags;
1265c2c66affSColin Finck 	union {
1266c2c66affSColin Finck 		LPCSTR	lptszActionName;
1267c2c66affSColin Finck 		UINT	uResIdString;
1268c2c66affSColin Finck 	} DUMMYUNIONNAME;
1269c2c66affSColin Finck 	GUID		guidInstance;
1270c2c66affSColin Finck 	DWORD		dwObjID;
1271c2c66affSColin Finck 	DWORD		dwHow;
1272c2c66affSColin Finck } DIACTIONA, *LPDIACTIONA;
1273c2c66affSColin Finck typedef const DIACTIONA *LPCDIACTIONA;
1274c2c66affSColin Finck 
1275c2c66affSColin Finck typedef struct _DIACTIONW {
1276c2c66affSColin Finck 	UINT_PTR	uAppData;
1277c2c66affSColin Finck 	DWORD		dwSemantic;
1278c2c66affSColin Finck 	DWORD		dwFlags;
1279c2c66affSColin Finck 	union {
1280c2c66affSColin Finck 		LPCWSTR	lptszActionName;
1281c2c66affSColin Finck 		UINT	uResIdString;
1282c2c66affSColin Finck 	} DUMMYUNIONNAME;
1283c2c66affSColin Finck 	GUID		guidInstance;
1284c2c66affSColin Finck 	DWORD		dwObjID;
1285c2c66affSColin Finck 	DWORD		dwHow;
1286c2c66affSColin Finck } DIACTIONW, *LPDIACTIONW;
1287c2c66affSColin Finck typedef const DIACTIONW *LPCDIACTIONW;
1288c2c66affSColin Finck 
1289c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIACTION)
1290c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIACTION)
1291c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIACTION)
1292c2c66affSColin Finck 
1293c2c66affSColin Finck #define DIA_FORCEFEEDBACK	0x00000001
1294c2c66affSColin Finck #define DIA_APPMAPPED		0x00000002
1295c2c66affSColin Finck #define DIA_APPNOMAP		0x00000004
1296c2c66affSColin Finck #define DIA_NORANGE		0x00000008
1297c2c66affSColin Finck #define DIA_APPFIXED		0x00000010
1298c2c66affSColin Finck 
1299c2c66affSColin Finck #define DIAH_UNMAPPED		0x00000000
1300c2c66affSColin Finck #define DIAH_USERCONFIG		0x00000001
1301c2c66affSColin Finck #define DIAH_APPREQUESTED	0x00000002
1302c2c66affSColin Finck #define DIAH_HWAPP		0x00000004
1303c2c66affSColin Finck #define DIAH_HWDEFAULT		0x00000008
1304c2c66affSColin Finck #define DIAH_DEFAULT		0x00000020
1305c2c66affSColin Finck #define DIAH_ERROR		0x80000000
1306c2c66affSColin Finck 
1307c2c66affSColin Finck typedef struct _DIACTIONFORMATA {
1308c2c66affSColin Finck 	DWORD		dwSize;
1309c2c66affSColin Finck 	DWORD		dwActionSize;
1310c2c66affSColin Finck 	DWORD		dwDataSize;
1311c2c66affSColin Finck 	DWORD		dwNumActions;
1312c2c66affSColin Finck 	LPDIACTIONA	rgoAction;
1313c2c66affSColin Finck 	GUID		guidActionMap;
1314c2c66affSColin Finck 	DWORD		dwGenre;
1315c2c66affSColin Finck 	DWORD		dwBufferSize;
1316c2c66affSColin Finck 	LONG		lAxisMin;
1317c2c66affSColin Finck 	LONG		lAxisMax;
1318c2c66affSColin Finck 	HINSTANCE	hInstString;
1319c2c66affSColin Finck 	FILETIME	ftTimeStamp;
1320c2c66affSColin Finck 	DWORD		dwCRC;
1321c2c66affSColin Finck 	CHAR		tszActionMap[MAX_PATH];
1322c2c66affSColin Finck } DIACTIONFORMATA, *LPDIACTIONFORMATA;
1323c2c66affSColin Finck typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
1324c2c66affSColin Finck 
1325c2c66affSColin Finck typedef struct _DIACTIONFORMATW {
1326c2c66affSColin Finck 	DWORD		dwSize;
1327c2c66affSColin Finck 	DWORD		dwActionSize;
1328c2c66affSColin Finck 	DWORD		dwDataSize;
1329c2c66affSColin Finck 	DWORD		dwNumActions;
1330c2c66affSColin Finck 	LPDIACTIONW	rgoAction;
1331c2c66affSColin Finck 	GUID		guidActionMap;
1332c2c66affSColin Finck 	DWORD		dwGenre;
1333c2c66affSColin Finck 	DWORD		dwBufferSize;
1334c2c66affSColin Finck 	LONG		lAxisMin;
1335c2c66affSColin Finck 	LONG		lAxisMax;
1336c2c66affSColin Finck 	HINSTANCE	hInstString;
1337c2c66affSColin Finck 	FILETIME	ftTimeStamp;
1338c2c66affSColin Finck 	DWORD		dwCRC;
1339c2c66affSColin Finck 	WCHAR		tszActionMap[MAX_PATH];
1340c2c66affSColin Finck } DIACTIONFORMATW, *LPDIACTIONFORMATW;
1341c2c66affSColin Finck typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
1342c2c66affSColin Finck 
1343c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
1344c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
1345c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
1346c2c66affSColin Finck 
1347c2c66affSColin Finck #define DIAFTS_NEWDEVICELOW	0xFFFFFFFF
1348c2c66affSColin Finck #define DIAFTS_NEWDEVICEHIGH	0xFFFFFFFF
1349c2c66affSColin Finck #define DIAFTS_UNUSEDDEVICELOW	0x00000000
1350c2c66affSColin Finck #define DIAFTS_UNUSEDDEVICEHIGH	0x00000000
1351c2c66affSColin Finck 
1352c2c66affSColin Finck #define DIDBAM_DEFAULT		0x00000000
1353c2c66affSColin Finck #define DIDBAM_PRESERVE		0x00000001
1354c2c66affSColin Finck #define DIDBAM_INITIALIZE	0x00000002
1355c2c66affSColin Finck #define DIDBAM_HWDEFAULTS	0x00000004
1356c2c66affSColin Finck 
1357c2c66affSColin Finck #define DIDSAM_DEFAULT		0x00000000
1358c2c66affSColin Finck #define DIDSAM_NOUSER		0x00000001
1359c2c66affSColin Finck #define DIDSAM_FORCESAVE	0x00000002
1360c2c66affSColin Finck 
1361c2c66affSColin Finck #define DICD_DEFAULT		0x00000000
1362c2c66affSColin Finck #define DICD_EDIT		0x00000001
1363c2c66affSColin Finck 
1364c2c66affSColin Finck #ifndef D3DCOLOR_DEFINED
1365c2c66affSColin Finck typedef DWORD D3DCOLOR;
1366c2c66affSColin Finck #define D3DCOLOR_DEFINED
1367c2c66affSColin Finck #endif
1368c2c66affSColin Finck 
1369c2c66affSColin Finck typedef struct _DICOLORSET {
1370c2c66affSColin Finck 	DWORD		dwSize;
1371c2c66affSColin Finck 	D3DCOLOR	cTextFore;
1372c2c66affSColin Finck 	D3DCOLOR	cTextHighlight;
1373c2c66affSColin Finck 	D3DCOLOR	cCalloutLine;
1374c2c66affSColin Finck 	D3DCOLOR	cCalloutHighlight;
1375c2c66affSColin Finck 	D3DCOLOR	cBorder;
1376c2c66affSColin Finck 	D3DCOLOR	cControlFill;
1377c2c66affSColin Finck 	D3DCOLOR	cHighlightFill;
1378c2c66affSColin Finck 	D3DCOLOR	cAreaFill;
1379c2c66affSColin Finck } DICOLORSET, *LPDICOLORSET;
1380c2c66affSColin Finck typedef const DICOLORSET *LPCDICOLORSET;
1381c2c66affSColin Finck 
1382c2c66affSColin Finck typedef struct _DICONFIGUREDEVICESPARAMSA {
1383c2c66affSColin Finck 	DWORD			dwSize;
1384c2c66affSColin Finck 	DWORD			dwcUsers;
1385c2c66affSColin Finck 	LPSTR			lptszUserNames;
1386c2c66affSColin Finck 	DWORD			dwcFormats;
1387c2c66affSColin Finck 	LPDIACTIONFORMATA	lprgFormats;
1388c2c66affSColin Finck 	HWND			hwnd;
1389c2c66affSColin Finck 	DICOLORSET		dics;
1390c2c66affSColin Finck 	LPUNKNOWN		lpUnkDDSTarget;
1391c2c66affSColin Finck } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
1392c2c66affSColin Finck typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
1393c2c66affSColin Finck 
1394c2c66affSColin Finck typedef struct _DICONFIGUREDEVICESPARAMSW {
1395c2c66affSColin Finck 	DWORD			dwSize;
1396c2c66affSColin Finck 	DWORD			dwcUsers;
1397c2c66affSColin Finck 	LPWSTR			lptszUserNames;
1398c2c66affSColin Finck 	DWORD			dwcFormats;
1399c2c66affSColin Finck 	LPDIACTIONFORMATW	lprgFormats;
1400c2c66affSColin Finck 	HWND			hwnd;
1401c2c66affSColin Finck 	DICOLORSET		dics;
1402c2c66affSColin Finck 	LPUNKNOWN		lpUnkDDSTarget;
1403c2c66affSColin Finck } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
1404c2c66affSColin Finck typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
1405c2c66affSColin Finck 
1406c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
1407c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
1408c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
1409c2c66affSColin Finck 
1410c2c66affSColin Finck #define DIDIFT_CONFIGURATION	0x00000001
1411c2c66affSColin Finck #define DIDIFT_OVERLAY		0x00000002
1412c2c66affSColin Finck 
1413c2c66affSColin Finck #define DIDAL_CENTERED		0x00000000
1414c2c66affSColin Finck #define DIDAL_LEFTALIGNED	0x00000001
1415c2c66affSColin Finck #define DIDAL_RIGHTALIGNED	0x00000002
1416c2c66affSColin Finck #define DIDAL_MIDDLE		0x00000000
1417c2c66affSColin Finck #define DIDAL_TOPALIGNED	0x00000004
1418c2c66affSColin Finck #define DIDAL_BOTTOMALIGNED	0x00000008
1419c2c66affSColin Finck 
1420c2c66affSColin Finck typedef struct _DIDEVICEIMAGEINFOA {
1421c2c66affSColin Finck 	CHAR	tszImagePath[MAX_PATH];
1422c2c66affSColin Finck 	DWORD	dwFlags;
1423c2c66affSColin Finck 	DWORD	dwViewID;
1424c2c66affSColin Finck 	RECT	rcOverlay;
1425c2c66affSColin Finck 	DWORD	dwObjID;
1426c2c66affSColin Finck 	DWORD	dwcValidPts;
1427c2c66affSColin Finck 	POINT	rgptCalloutLine[5];
1428c2c66affSColin Finck 	RECT	rcCalloutRect;
1429c2c66affSColin Finck 	DWORD	dwTextAlign;
1430c2c66affSColin Finck } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
1431c2c66affSColin Finck typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
1432c2c66affSColin Finck 
1433c2c66affSColin Finck typedef struct _DIDEVICEIMAGEINFOW {
1434c2c66affSColin Finck 	WCHAR	tszImagePath[MAX_PATH];
1435c2c66affSColin Finck 	DWORD	dwFlags;
1436c2c66affSColin Finck 	DWORD	dwViewID;
1437c2c66affSColin Finck 	RECT	rcOverlay;
1438c2c66affSColin Finck 	DWORD	dwObjID;
1439c2c66affSColin Finck 	DWORD	dwcValidPts;
1440c2c66affSColin Finck 	POINT	rgptCalloutLine[5];
1441c2c66affSColin Finck 	RECT	rcCalloutRect;
1442c2c66affSColin Finck 	DWORD	dwTextAlign;
1443c2c66affSColin Finck } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
1444c2c66affSColin Finck typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
1445c2c66affSColin Finck 
1446c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
1447c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
1448c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
1449c2c66affSColin Finck 
1450c2c66affSColin Finck typedef struct _DIDEVICEIMAGEINFOHEADERA {
1451c2c66affSColin Finck 	DWORD	dwSize;
1452c2c66affSColin Finck 	DWORD	dwSizeImageInfo;
1453c2c66affSColin Finck 	DWORD	dwcViews;
1454c2c66affSColin Finck 	DWORD	dwcButtons;
1455c2c66affSColin Finck 	DWORD	dwcAxes;
1456c2c66affSColin Finck 	DWORD	dwcPOVs;
1457c2c66affSColin Finck 	DWORD	dwBufferSize;
1458c2c66affSColin Finck 	DWORD	dwBufferUsed;
1459c2c66affSColin Finck 	LPDIDEVICEIMAGEINFOA	lprgImageInfoArray;
1460c2c66affSColin Finck } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
1461c2c66affSColin Finck typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
1462c2c66affSColin Finck 
1463c2c66affSColin Finck typedef struct _DIDEVICEIMAGEINFOHEADERW {
1464c2c66affSColin Finck 	DWORD	dwSize;
1465c2c66affSColin Finck 	DWORD	dwSizeImageInfo;
1466c2c66affSColin Finck 	DWORD	dwcViews;
1467c2c66affSColin Finck 	DWORD	dwcButtons;
1468c2c66affSColin Finck 	DWORD	dwcAxes;
1469c2c66affSColin Finck 	DWORD	dwcPOVs;
1470c2c66affSColin Finck 	DWORD	dwBufferSize;
1471c2c66affSColin Finck 	DWORD	dwBufferUsed;
1472c2c66affSColin Finck 	LPDIDEVICEIMAGEINFOW	lprgImageInfoArray;
1473c2c66affSColin Finck } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
1474c2c66affSColin Finck typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
1475c2c66affSColin Finck 
1476c2c66affSColin Finck DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
1477c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
1478c2c66affSColin Finck DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
1479c2c66affSColin Finck 
1480c2c66affSColin Finck 
1481c2c66affSColin Finck /*****************************************************************************
1482c2c66affSColin Finck  * IDirectInputEffect interface
1483c2c66affSColin Finck  */
1484c2c66affSColin Finck #define INTERFACE IDirectInputEffect
1485c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputEffect,IUnknown)
1486c2c66affSColin Finck {
1487c2c66affSColin Finck     /*** IUnknown methods ***/
1488c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1489c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1490c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1491c2c66affSColin Finck     /*** IDirectInputEffect methods ***/
1492c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;
1493c2c66affSColin Finck     STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
1494c2c66affSColin Finck     STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;
1495c2c66affSColin Finck     STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;
1496c2c66affSColin Finck     STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;
1497c2c66affSColin Finck     STDMETHOD(Stop)(THIS) PURE;
1498c2c66affSColin Finck     STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
1499c2c66affSColin Finck     STDMETHOD(Download)(THIS) PURE;
1500c2c66affSColin Finck     STDMETHOD(Unload)(THIS) PURE;
1501c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1502c2c66affSColin Finck };
1503c2c66affSColin Finck #undef INTERFACE
1504c2c66affSColin Finck 
1505c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
1506c2c66affSColin Finck /*** IUnknown methods ***/
1507c2c66affSColin Finck #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1508c2c66affSColin Finck #define IDirectInputEffect_AddRef(p)             (p)->lpVtbl->AddRef(p)
1509c2c66affSColin Finck #define IDirectInputEffect_Release(p)            (p)->lpVtbl->Release(p)
1510c2c66affSColin Finck /*** IDirectInputEffect methods ***/
1511c2c66affSColin Finck #define IDirectInputEffect_Initialize(p,a,b,c)    (p)->lpVtbl->Initialize(p,a,b,c)
1512c2c66affSColin Finck #define IDirectInputEffect_GetEffectGuid(p,a)     (p)->lpVtbl->GetEffectGuid(p,a)
1513c2c66affSColin Finck #define IDirectInputEffect_GetParameters(p,a,b)   (p)->lpVtbl->GetParameters(p,a,b)
1514c2c66affSColin Finck #define IDirectInputEffect_SetParameters(p,a,b)   (p)->lpVtbl->SetParameters(p,a,b)
1515c2c66affSColin Finck #define IDirectInputEffect_Start(p,a,b)           (p)->lpVtbl->Start(p,a,b)
1516c2c66affSColin Finck #define IDirectInputEffect_Stop(p)                (p)->lpVtbl->Stop(p)
1517c2c66affSColin Finck #define IDirectInputEffect_GetEffectStatus(p,a)   (p)->lpVtbl->GetEffectStatus(p,a)
1518c2c66affSColin Finck #define IDirectInputEffect_Download(p)            (p)->lpVtbl->Download(p)
1519c2c66affSColin Finck #define IDirectInputEffect_Unload(p)              (p)->lpVtbl->Unload(p)
1520c2c66affSColin Finck #define IDirectInputEffect_Escape(p,a)            (p)->lpVtbl->Escape(p,a)
1521c2c66affSColin Finck #else
1522c2c66affSColin Finck /*** IUnknown methods ***/
1523c2c66affSColin Finck #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1524c2c66affSColin Finck #define IDirectInputEffect_AddRef(p)             (p)->AddRef()
1525c2c66affSColin Finck #define IDirectInputEffect_Release(p)            (p)->Release()
1526c2c66affSColin Finck /*** IDirectInputEffect methods ***/
1527c2c66affSColin Finck #define IDirectInputEffect_Initialize(p,a,b,c)    (p)->Initialize(a,b,c)
1528c2c66affSColin Finck #define IDirectInputEffect_GetEffectGuid(p,a)     (p)->GetEffectGuid(a)
1529c2c66affSColin Finck #define IDirectInputEffect_GetParameters(p,a,b)   (p)->GetParameters(a,b)
1530c2c66affSColin Finck #define IDirectInputEffect_SetParameters(p,a,b)   (p)->SetParameters(a,b)
1531c2c66affSColin Finck #define IDirectInputEffect_Start(p,a,b)           (p)->Start(a,b)
1532c2c66affSColin Finck #define IDirectInputEffect_Stop(p)                (p)->Stop()
1533c2c66affSColin Finck #define IDirectInputEffect_GetEffectStatus(p,a)   (p)->GetEffectStatus(a)
1534c2c66affSColin Finck #define IDirectInputEffect_Download(p)            (p)->Download()
1535c2c66affSColin Finck #define IDirectInputEffect_Unload(p)              (p)->Unload()
1536c2c66affSColin Finck #define IDirectInputEffect_Escape(p,a)            (p)->Escape(a)
1537c2c66affSColin Finck #endif
1538c2c66affSColin Finck 
1539c2c66affSColin Finck 
1540c2c66affSColin Finck /*****************************************************************************
1541c2c66affSColin Finck  * IDirectInputDeviceA interface
1542c2c66affSColin Finck  */
1543c2c66affSColin Finck #define INTERFACE IDirectInputDeviceA
1544c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)
1545c2c66affSColin Finck {
1546c2c66affSColin Finck     /*** IUnknown methods ***/
1547c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1548c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1549c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1550c2c66affSColin Finck     /*** IDirectInputDeviceA methods ***/
1551c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1552c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1553c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1554c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1555c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1556c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1557c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1558c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1559c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1560c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1561c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1562c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1563c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1564c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1565c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1566c2c66affSColin Finck };
1567c2c66affSColin Finck #undef INTERFACE
1568c2c66affSColin Finck 
1569c2c66affSColin Finck /*****************************************************************************
1570c2c66affSColin Finck  * IDirectInputDeviceW interface
1571c2c66affSColin Finck  */
1572c2c66affSColin Finck #define INTERFACE IDirectInputDeviceW
1573c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)
1574c2c66affSColin Finck {
1575c2c66affSColin Finck     /*** IUnknown methods ***/
1576c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1577c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1578c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1579c2c66affSColin Finck     /*** IDirectInputDeviceW methods ***/
1580c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1581c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1582c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1583c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1584c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1585c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1586c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1587c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1588c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1589c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1590c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1591c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1592c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1593c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1594c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1595c2c66affSColin Finck };
1596c2c66affSColin Finck #undef INTERFACE
1597c2c66affSColin Finck 
1598c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
1599c2c66affSColin Finck /*** IUnknown methods ***/
1600c2c66affSColin Finck #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1601c2c66affSColin Finck #define IDirectInputDevice_AddRef(p)             (p)->lpVtbl->AddRef(p)
1602c2c66affSColin Finck #define IDirectInputDevice_Release(p)            (p)->lpVtbl->Release(p)
1603c2c66affSColin Finck /*** IDirectInputDevice methods ***/
1604c2c66affSColin Finck #define IDirectInputDevice_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1605c2c66affSColin Finck #define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1606c2c66affSColin Finck #define IDirectInputDevice_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1607c2c66affSColin Finck #define IDirectInputDevice_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1608c2c66affSColin Finck #define IDirectInputDevice_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1609c2c66affSColin Finck #define IDirectInputDevice_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1610c2c66affSColin Finck #define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1611c2c66affSColin Finck #define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1612c2c66affSColin Finck #define IDirectInputDevice_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1613c2c66affSColin Finck #define IDirectInputDevice_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1614c2c66affSColin Finck #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1615c2c66affSColin Finck #define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1616c2c66affSColin Finck #define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1617c2c66affSColin Finck #define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1618c2c66affSColin Finck #define IDirectInputDevice_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1619c2c66affSColin Finck #else
1620c2c66affSColin Finck /*** IUnknown methods ***/
1621c2c66affSColin Finck #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1622c2c66affSColin Finck #define IDirectInputDevice_AddRef(p)             (p)->AddRef()
1623c2c66affSColin Finck #define IDirectInputDevice_Release(p)            (p)->Release()
1624c2c66affSColin Finck /*** IDirectInputDevice methods ***/
1625c2c66affSColin Finck #define IDirectInputDevice_GetCapabilities(p,a)       (p)->GetCapabilities(a)
1626c2c66affSColin Finck #define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
1627c2c66affSColin Finck #define IDirectInputDevice_GetProperty(p,a,b)         (p)->GetProperty(a,b)
1628c2c66affSColin Finck #define IDirectInputDevice_SetProperty(p,a,b)         (p)->SetProperty(a,b)
1629c2c66affSColin Finck #define IDirectInputDevice_Acquire(p)                 (p)->Acquire()
1630c2c66affSColin Finck #define IDirectInputDevice_Unacquire(p)               (p)->Unacquire()
1631c2c66affSColin Finck #define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
1632c2c66affSColin Finck #define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
1633c2c66affSColin Finck #define IDirectInputDevice_SetDataFormat(p,a)         (p)->SetDataFormat(a)
1634c2c66affSColin Finck #define IDirectInputDevice_SetEventNotification(p,a)  (p)->SetEventNotification(a)
1635c2c66affSColin Finck #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1636c2c66affSColin Finck #define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
1637c2c66affSColin Finck #define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
1638c2c66affSColin Finck #define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
1639c2c66affSColin Finck #define IDirectInputDevice_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
1640c2c66affSColin Finck #endif
1641c2c66affSColin Finck 
1642c2c66affSColin Finck 
1643c2c66affSColin Finck /*****************************************************************************
1644c2c66affSColin Finck  * IDirectInputDevice2A interface
1645c2c66affSColin Finck  */
1646c2c66affSColin Finck #define INTERFACE IDirectInputDevice2A
1647c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)
1648c2c66affSColin Finck {
1649c2c66affSColin Finck     /*** IUnknown methods ***/
1650c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1651c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1652c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1653c2c66affSColin Finck     /*** IDirectInputDeviceA methods ***/
1654c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1655c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1656c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1657c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1658c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1659c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1660c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1661c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1662c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1663c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1664c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1665c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1666c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1667c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1668c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1669c2c66affSColin Finck     /*** IDirectInputDevice2A methods ***/
1670c2c66affSColin Finck     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1671c2c66affSColin Finck     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1672c2c66affSColin Finck     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
1673c2c66affSColin Finck     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1674c2c66affSColin Finck     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1675c2c66affSColin Finck     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1676c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1677c2c66affSColin Finck     STDMETHOD(Poll)(THIS) PURE;
1678c2c66affSColin Finck     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1679c2c66affSColin Finck };
1680c2c66affSColin Finck #undef INTERFACE
1681c2c66affSColin Finck 
1682c2c66affSColin Finck /*****************************************************************************
1683c2c66affSColin Finck  * IDirectInputDevice2W interface
1684c2c66affSColin Finck  */
1685c2c66affSColin Finck #define INTERFACE IDirectInputDevice2W
1686c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)
1687c2c66affSColin Finck {
1688c2c66affSColin Finck     /*** IUnknown methods ***/
1689c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1690c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1691c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1692c2c66affSColin Finck     /*** IDirectInputDeviceW methods ***/
1693c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1694c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1695c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1696c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1697c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1698c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1699c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1700c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1701c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1702c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1703c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1704c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1705c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1706c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1707c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1708c2c66affSColin Finck     /*** IDirectInputDevice2W methods ***/
1709c2c66affSColin Finck     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1710c2c66affSColin Finck     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1711c2c66affSColin Finck     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
1712c2c66affSColin Finck     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1713c2c66affSColin Finck     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1714c2c66affSColin Finck     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1715c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1716c2c66affSColin Finck     STDMETHOD(Poll)(THIS) PURE;
1717c2c66affSColin Finck     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1718c2c66affSColin Finck };
1719c2c66affSColin Finck #undef INTERFACE
1720c2c66affSColin Finck 
1721c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
1722c2c66affSColin Finck /*** IUnknown methods ***/
1723c2c66affSColin Finck #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1724c2c66affSColin Finck #define IDirectInputDevice2_AddRef(p)             (p)->lpVtbl->AddRef(p)
1725c2c66affSColin Finck #define IDirectInputDevice2_Release(p)            (p)->lpVtbl->Release(p)
1726c2c66affSColin Finck /*** IDirectInputDevice methods ***/
1727c2c66affSColin Finck #define IDirectInputDevice2_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1728c2c66affSColin Finck #define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1729c2c66affSColin Finck #define IDirectInputDevice2_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1730c2c66affSColin Finck #define IDirectInputDevice2_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1731c2c66affSColin Finck #define IDirectInputDevice2_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1732c2c66affSColin Finck #define IDirectInputDevice2_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1733c2c66affSColin Finck #define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1734c2c66affSColin Finck #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1735c2c66affSColin Finck #define IDirectInputDevice2_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1736c2c66affSColin Finck #define IDirectInputDevice2_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1737c2c66affSColin Finck #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1738c2c66affSColin Finck #define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1739c2c66affSColin Finck #define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1740c2c66affSColin Finck #define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1741c2c66affSColin Finck #define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1742c2c66affSColin Finck /*** IDirectInputDevice2 methods ***/
1743c2c66affSColin Finck #define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1744c2c66affSColin Finck #define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
1745c2c66affSColin Finck #define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
1746c2c66affSColin Finck #define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
1747c2c66affSColin Finck #define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1748c2c66affSColin Finck #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1749c2c66affSColin Finck #define IDirectInputDevice2_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
1750c2c66affSColin Finck #define IDirectInputDevice2_Poll(p)                           (p)->lpVtbl->Poll(p)
1751c2c66affSColin Finck #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1752c2c66affSColin Finck #else
1753c2c66affSColin Finck /*** IUnknown methods ***/
1754c2c66affSColin Finck #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1755c2c66affSColin Finck #define IDirectInputDevice2_AddRef(p)             (p)->AddRef()
1756c2c66affSColin Finck #define IDirectInputDevice2_Release(p)            (p)->Release()
1757c2c66affSColin Finck /*** IDirectInputDevice methods ***/
1758c2c66affSColin Finck #define IDirectInputDevice2_GetCapabilities(p,a)       (p)->GetCapabilities(a)
1759c2c66affSColin Finck #define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
1760c2c66affSColin Finck #define IDirectInputDevice2_GetProperty(p,a,b)         (p)->GetProperty(a,b)
1761c2c66affSColin Finck #define IDirectInputDevice2_SetProperty(p,a,b)         (p)->SetProperty(a,b)
1762c2c66affSColin Finck #define IDirectInputDevice2_Acquire(p)                 (p)->Acquire()
1763c2c66affSColin Finck #define IDirectInputDevice2_Unacquire(p)               (p)->Unacquire()
1764c2c66affSColin Finck #define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
1765c2c66affSColin Finck #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
1766c2c66affSColin Finck #define IDirectInputDevice2_SetDataFormat(p,a)         (p)->SetDataFormat(a)
1767c2c66affSColin Finck #define IDirectInputDevice2_SetEventNotification(p,a)  (p)->SetEventNotification(a)
1768c2c66affSColin Finck #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1769c2c66affSColin Finck #define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
1770c2c66affSColin Finck #define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
1771c2c66affSColin Finck #define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
1772c2c66affSColin Finck #define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
1773c2c66affSColin Finck /*** IDirectInputDevice2 methods ***/
1774c2c66affSColin Finck #define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
1775c2c66affSColin Finck #define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
1776c2c66affSColin Finck #define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
1777c2c66affSColin Finck #define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
1778c2c66affSColin Finck #define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
1779c2c66affSColin Finck #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1780c2c66affSColin Finck #define IDirectInputDevice2_Escape(p,a)                       (p)->Escape(a)
1781c2c66affSColin Finck #define IDirectInputDevice2_Poll(p)                           (p)->Poll()
1782c2c66affSColin Finck #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
1783c2c66affSColin Finck #endif
1784c2c66affSColin Finck 
1785c2c66affSColin Finck /*****************************************************************************
1786c2c66affSColin Finck  * IDirectInputDevice7A interface
1787c2c66affSColin Finck  */
1788c2c66affSColin Finck #define INTERFACE IDirectInputDevice7A
1789c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)
1790c2c66affSColin Finck {
1791c2c66affSColin Finck     /*** IUnknown methods ***/
1792c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1793c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1794c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1795c2c66affSColin Finck     /*** IDirectInputDeviceA methods ***/
1796c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1797c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1798c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1799c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1800c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1801c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1802c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1803c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1804c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1805c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1806c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1807c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1808c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1809c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1810c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1811c2c66affSColin Finck     /*** IDirectInputDevice2A methods ***/
1812c2c66affSColin Finck     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1813c2c66affSColin Finck     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1814c2c66affSColin Finck     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
1815c2c66affSColin Finck     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1816c2c66affSColin Finck     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1817c2c66affSColin Finck     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1818c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1819c2c66affSColin Finck     STDMETHOD(Poll)(THIS) PURE;
1820c2c66affSColin Finck     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1821c2c66affSColin Finck     /*** IDirectInputDevice7A methods ***/
1822c2c66affSColin Finck     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1823c2c66affSColin Finck     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1824c2c66affSColin Finck };
1825c2c66affSColin Finck #undef INTERFACE
1826c2c66affSColin Finck 
1827c2c66affSColin Finck /*****************************************************************************
1828c2c66affSColin Finck  * IDirectInputDevice7W interface
1829c2c66affSColin Finck  */
1830c2c66affSColin Finck #define INTERFACE IDirectInputDevice7W
1831c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)
1832c2c66affSColin Finck {
1833c2c66affSColin Finck     /*** IUnknown methods ***/
1834c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1835c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1836c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1837c2c66affSColin Finck     /*** IDirectInputDeviceW methods ***/
1838c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1839c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1840c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1841c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1842c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1843c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1844c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1845c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1846c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1847c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1848c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1849c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1850c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
1851c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1852c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1853c2c66affSColin Finck     /*** IDirectInputDevice2W methods ***/
1854c2c66affSColin Finck     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1855c2c66affSColin Finck     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1856c2c66affSColin Finck     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
1857c2c66affSColin Finck     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1858c2c66affSColin Finck     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1859c2c66affSColin Finck     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1860c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1861c2c66affSColin Finck     STDMETHOD(Poll)(THIS) PURE;
1862c2c66affSColin Finck     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1863c2c66affSColin Finck     /*** IDirectInputDevice7W methods ***/
1864c2c66affSColin Finck     STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1865c2c66affSColin Finck     STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1866c2c66affSColin Finck };
1867c2c66affSColin Finck #undef INTERFACE
1868c2c66affSColin Finck 
1869c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
1870c2c66affSColin Finck /*** IUnknown methods ***/
1871c2c66affSColin Finck #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1872c2c66affSColin Finck #define IDirectInputDevice7_AddRef(p)             (p)->lpVtbl->AddRef(p)
1873c2c66affSColin Finck #define IDirectInputDevice7_Release(p)            (p)->lpVtbl->Release(p)
1874c2c66affSColin Finck /*** IDirectInputDevice methods ***/
1875c2c66affSColin Finck #define IDirectInputDevice7_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1876c2c66affSColin Finck #define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1877c2c66affSColin Finck #define IDirectInputDevice7_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1878c2c66affSColin Finck #define IDirectInputDevice7_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1879c2c66affSColin Finck #define IDirectInputDevice7_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1880c2c66affSColin Finck #define IDirectInputDevice7_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1881c2c66affSColin Finck #define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1882c2c66affSColin Finck #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1883c2c66affSColin Finck #define IDirectInputDevice7_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1884c2c66affSColin Finck #define IDirectInputDevice7_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1885c2c66affSColin Finck #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1886c2c66affSColin Finck #define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1887c2c66affSColin Finck #define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1888c2c66affSColin Finck #define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1889c2c66affSColin Finck #define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1890c2c66affSColin Finck /*** IDirectInputDevice2 methods ***/
1891c2c66affSColin Finck #define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1892c2c66affSColin Finck #define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
1893c2c66affSColin Finck #define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
1894c2c66affSColin Finck #define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
1895c2c66affSColin Finck #define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1896c2c66affSColin Finck #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1897c2c66affSColin Finck #define IDirectInputDevice7_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
1898c2c66affSColin Finck #define IDirectInputDevice7_Poll(p)                           (p)->lpVtbl->Poll(p)
1899c2c66affSColin Finck #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1900c2c66affSColin Finck /*** IDirectInputDevice7 methods ***/
1901c2c66affSColin Finck #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1902c2c66affSColin Finck #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1903c2c66affSColin Finck #else
1904c2c66affSColin Finck /*** IUnknown methods ***/
1905c2c66affSColin Finck #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1906c2c66affSColin Finck #define IDirectInputDevice7_AddRef(p)             (p)->AddRef()
1907c2c66affSColin Finck #define IDirectInputDevice7_Release(p)            (p)->Release()
1908c2c66affSColin Finck /*** IDirectInputDevice methods ***/
1909c2c66affSColin Finck #define IDirectInputDevice7_GetCapabilities(p,a)       (p)->GetCapabilities(a)
1910c2c66affSColin Finck #define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
1911c2c66affSColin Finck #define IDirectInputDevice7_GetProperty(p,a,b)         (p)->GetProperty(a,b)
1912c2c66affSColin Finck #define IDirectInputDevice7_SetProperty(p,a,b)         (p)->SetProperty(a,b)
1913c2c66affSColin Finck #define IDirectInputDevice7_Acquire(p)                 (p)->Acquire()
1914c2c66affSColin Finck #define IDirectInputDevice7_Unacquire(p)               (p)->Unacquire()
1915c2c66affSColin Finck #define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
1916c2c66affSColin Finck #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
1917c2c66affSColin Finck #define IDirectInputDevice7_SetDataFormat(p,a)         (p)->SetDataFormat(a)
1918c2c66affSColin Finck #define IDirectInputDevice7_SetEventNotification(p,a)  (p)->SetEventNotification(a)
1919c2c66affSColin Finck #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1920c2c66affSColin Finck #define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
1921c2c66affSColin Finck #define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
1922c2c66affSColin Finck #define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
1923c2c66affSColin Finck #define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
1924c2c66affSColin Finck /*** IDirectInputDevice2 methods ***/
1925c2c66affSColin Finck #define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
1926c2c66affSColin Finck #define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
1927c2c66affSColin Finck #define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
1928c2c66affSColin Finck #define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
1929c2c66affSColin Finck #define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
1930c2c66affSColin Finck #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1931c2c66affSColin Finck #define IDirectInputDevice7_Escape(p,a)                       (p)->Escape(a)
1932c2c66affSColin Finck #define IDirectInputDevice7_Poll(p)                           (p)->Poll()
1933c2c66affSColin Finck #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
1934c2c66affSColin Finck /*** IDirectInputDevice7 methods ***/
1935c2c66affSColin Finck #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
1936c2c66affSColin Finck #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
1937c2c66affSColin Finck #endif
1938c2c66affSColin Finck 
1939c2c66affSColin Finck 
1940c2c66affSColin Finck /*****************************************************************************
1941c2c66affSColin Finck  * IDirectInputDevice8A interface
1942c2c66affSColin Finck  */
1943c2c66affSColin Finck #define INTERFACE IDirectInputDevice8A
1944c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)
1945c2c66affSColin Finck {
1946c2c66affSColin Finck     /*** IUnknown methods ***/
1947c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1948c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1949c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1950c2c66affSColin Finck     /*** IDirectInputDeviceA methods ***/
1951c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1952c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1953c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
1954c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
1955c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
1956c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
1957c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
1958c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
1959c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
1960c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
1961c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
1962c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
1963c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
1964c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
1965c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1966c2c66affSColin Finck     /*** IDirectInputDevice2A methods ***/
1967c2c66affSColin Finck     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
1968c2c66affSColin Finck     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
1969c2c66affSColin Finck     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
1970c2c66affSColin Finck     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
1971c2c66affSColin Finck     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
1972c2c66affSColin Finck     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
1973c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
1974c2c66affSColin Finck     STDMETHOD(Poll)(THIS) PURE;
1975c2c66affSColin Finck     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1976c2c66affSColin Finck     /*** IDirectInputDevice7A methods ***/
1977c2c66affSColin Finck     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
1978c2c66affSColin Finck     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1979c2c66affSColin Finck     /*** IDirectInputDevice8A methods ***/
1980c2c66affSColin Finck     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
1981c2c66affSColin Finck     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
1982c2c66affSColin Finck     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
1983c2c66affSColin Finck };
1984c2c66affSColin Finck #undef INTERFACE
1985c2c66affSColin Finck 
1986c2c66affSColin Finck /*****************************************************************************
1987c2c66affSColin Finck  * IDirectInputDevice8W interface
1988c2c66affSColin Finck  */
1989c2c66affSColin Finck #define INTERFACE IDirectInputDevice8W
1990c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)
1991c2c66affSColin Finck {
1992c2c66affSColin Finck     /*** IUnknown methods ***/
1993c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1994c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1995c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
1996c2c66affSColin Finck     /*** IDirectInputDeviceW methods ***/
1997c2c66affSColin Finck     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
1998c2c66affSColin Finck     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
1999c2c66affSColin Finck     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
2000c2c66affSColin Finck     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
2001c2c66affSColin Finck     STDMETHOD(Acquire)(THIS) PURE;
2002c2c66affSColin Finck     STDMETHOD(Unacquire)(THIS) PURE;
2003c2c66affSColin Finck     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
2004c2c66affSColin Finck     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
2005c2c66affSColin Finck     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
2006c2c66affSColin Finck     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
2007c2c66affSColin Finck     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
2008c2c66affSColin Finck     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
2009c2c66affSColin Finck     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
2010c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2011c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
2012c2c66affSColin Finck     /*** IDirectInputDevice2W methods ***/
2013c2c66affSColin Finck     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
2014c2c66affSColin Finck     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
2015c2c66affSColin Finck     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
2016c2c66affSColin Finck     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
2017c2c66affSColin Finck     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
2018c2c66affSColin Finck     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
2019c2c66affSColin Finck     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
2020c2c66affSColin Finck     STDMETHOD(Poll)(THIS) PURE;
2021c2c66affSColin Finck     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
2022c2c66affSColin Finck     /*** IDirectInputDevice7W methods ***/
2023c2c66affSColin Finck     STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
2024c2c66affSColin Finck     STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
2025c2c66affSColin Finck     /*** IDirectInputDevice8W methods ***/
2026c2c66affSColin Finck     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
2027c2c66affSColin Finck     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
2028c2c66affSColin Finck     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
2029c2c66affSColin Finck };
2030c2c66affSColin Finck #undef INTERFACE
2031c2c66affSColin Finck 
2032c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
2033c2c66affSColin Finck /*** IUnknown methods ***/
2034c2c66affSColin Finck #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2035c2c66affSColin Finck #define IDirectInputDevice8_AddRef(p)             (p)->lpVtbl->AddRef(p)
2036c2c66affSColin Finck #define IDirectInputDevice8_Release(p)            (p)->lpVtbl->Release(p)
2037c2c66affSColin Finck /*** IDirectInputDevice methods ***/
2038c2c66affSColin Finck #define IDirectInputDevice8_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
2039c2c66affSColin Finck #define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
2040c2c66affSColin Finck #define IDirectInputDevice8_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
2041c2c66affSColin Finck #define IDirectInputDevice8_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
2042c2c66affSColin Finck #define IDirectInputDevice8_Acquire(p)                 (p)->lpVtbl->Acquire(p)
2043c2c66affSColin Finck #define IDirectInputDevice8_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
2044c2c66affSColin Finck #define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
2045c2c66affSColin Finck #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
2046c2c66affSColin Finck #define IDirectInputDevice8_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
2047c2c66affSColin Finck #define IDirectInputDevice8_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
2048c2c66affSColin Finck #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
2049c2c66affSColin Finck #define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
2050c2c66affSColin Finck #define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
2051c2c66affSColin Finck #define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
2052c2c66affSColin Finck #define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
2053c2c66affSColin Finck /*** IDirectInputDevice2 methods ***/
2054c2c66affSColin Finck #define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
2055c2c66affSColin Finck #define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
2056c2c66affSColin Finck #define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
2057c2c66affSColin Finck #define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
2058c2c66affSColin Finck #define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
2059c2c66affSColin Finck #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
2060c2c66affSColin Finck #define IDirectInputDevice8_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
2061c2c66affSColin Finck #define IDirectInputDevice8_Poll(p)                           (p)->lpVtbl->Poll(p)
2062c2c66affSColin Finck #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
2063c2c66affSColin Finck /*** IDirectInputDevice7 methods ***/
2064c2c66affSColin Finck #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
2065c2c66affSColin Finck #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
2066c2c66affSColin Finck /*** IDirectInputDevice8 methods ***/
2067c2c66affSColin Finck #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
2068c2c66affSColin Finck #define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->lpVtbl->SetActionMap(p,a,b,c)
2069c2c66affSColin Finck #define IDirectInputDevice8_GetImageInfo(p,a)       (p)->lpVtbl->GetImageInfo(p,a)
2070c2c66affSColin Finck #else
2071c2c66affSColin Finck /*** IUnknown methods ***/
2072c2c66affSColin Finck #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2073c2c66affSColin Finck #define IDirectInputDevice8_AddRef(p)             (p)->AddRef()
2074c2c66affSColin Finck #define IDirectInputDevice8_Release(p)            (p)->Release()
2075c2c66affSColin Finck /*** IDirectInputDevice methods ***/
2076c2c66affSColin Finck #define IDirectInputDevice8_GetCapabilities(p,a)       (p)->GetCapabilities(a)
2077c2c66affSColin Finck #define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
2078c2c66affSColin Finck #define IDirectInputDevice8_GetProperty(p,a,b)         (p)->GetProperty(a,b)
2079c2c66affSColin Finck #define IDirectInputDevice8_SetProperty(p,a,b)         (p)->SetProperty(a,b)
2080c2c66affSColin Finck #define IDirectInputDevice8_Acquire(p)                 (p)->Acquire()
2081c2c66affSColin Finck #define IDirectInputDevice8_Unacquire(p)               (p)->Unacquire()
2082c2c66affSColin Finck #define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
2083c2c66affSColin Finck #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
2084c2c66affSColin Finck #define IDirectInputDevice8_SetDataFormat(p,a)         (p)->SetDataFormat(a)
2085c2c66affSColin Finck #define IDirectInputDevice8_SetEventNotification(p,a)  (p)->SetEventNotification(a)
2086c2c66affSColin Finck #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
2087c2c66affSColin Finck #define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
2088c2c66affSColin Finck #define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
2089c2c66affSColin Finck #define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
2090c2c66affSColin Finck #define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
2091c2c66affSColin Finck /*** IDirectInputDevice2 methods ***/
2092c2c66affSColin Finck #define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
2093c2c66affSColin Finck #define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
2094c2c66affSColin Finck #define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
2095c2c66affSColin Finck #define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
2096c2c66affSColin Finck #define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
2097c2c66affSColin Finck #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
2098c2c66affSColin Finck #define IDirectInputDevice8_Escape(p,a)                       (p)->Escape(a)
2099c2c66affSColin Finck #define IDirectInputDevice8_Poll(p)                           (p)->Poll()
2100c2c66affSColin Finck #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
2101c2c66affSColin Finck /*** IDirectInputDevice7 methods ***/
2102c2c66affSColin Finck #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
2103c2c66affSColin Finck #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
2104c2c66affSColin Finck /*** IDirectInputDevice8 methods ***/
2105c2c66affSColin Finck #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
2106c2c66affSColin Finck #define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->SetActionMap(a,b,c)
2107c2c66affSColin Finck #define IDirectInputDevice8_GetImageInfo(p,a)       (p)->GetImageInfo(a)
2108c2c66affSColin Finck #endif
2109c2c66affSColin Finck 
2110c2c66affSColin Finck /* "Standard" Mouse report... */
2111c2c66affSColin Finck typedef struct DIMOUSESTATE {
2112c2c66affSColin Finck   LONG lX;
2113c2c66affSColin Finck   LONG lY;
2114c2c66affSColin Finck   LONG lZ;
2115c2c66affSColin Finck   BYTE rgbButtons[4];
2116c2c66affSColin Finck } DIMOUSESTATE;
2117c2c66affSColin Finck 
2118c2c66affSColin Finck /* "Standard" Mouse report for DInput 7... */
2119c2c66affSColin Finck typedef struct DIMOUSESTATE2 {
2120c2c66affSColin Finck   LONG lX;
2121c2c66affSColin Finck   LONG lY;
2122c2c66affSColin Finck   LONG lZ;
2123c2c66affSColin Finck   BYTE rgbButtons[8];
2124c2c66affSColin Finck } DIMOUSESTATE2;
2125c2c66affSColin Finck 
2126c2c66affSColin Finck #define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
2127c2c66affSColin Finck #define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
2128c2c66affSColin Finck #define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
2129c2c66affSColin Finck #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
2130c2c66affSColin Finck #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
2131c2c66affSColin Finck #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
2132c2c66affSColin Finck #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
2133c2c66affSColin Finck #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
2134c2c66affSColin Finck #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
2135c2c66affSColin Finck #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
2136c2c66affSColin Finck #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
2137c2c66affSColin Finck 
2138c2c66affSColin Finck /* New DirectInput8 mouse definitions */
2139c2c66affSColin Finck 
2140c2c66affSColin Finck #define DIMOUSE_XAXISAB            (0x82000200 | DIMOFS_X)
2141c2c66affSColin Finck #define DIMOUSE_YAXISAB            (0x82000200 | DIMOFS_Y)
2142c2c66affSColin Finck #define DIMOUSE_XAXIS              (0x82000300 | DIMOFS_X)
2143c2c66affSColin Finck #define DIMOUSE_YAXIS              (0x82000300 | DIMOFS_Y)
2144c2c66affSColin Finck #define DIMOUSE_WHEEL              (0x82000300 | DIMOFS_Z)
2145c2c66affSColin Finck #define DIMOUSE_BUTTON0            (0x82000400 | DIMOFS_BUTTON0)
2146c2c66affSColin Finck #define DIMOUSE_BUTTON1            (0x82000400 | DIMOFS_BUTTON1)
2147c2c66affSColin Finck #define DIMOUSE_BUTTON2            (0x82000400 | DIMOFS_BUTTON2)
2148c2c66affSColin Finck #define DIMOUSE_BUTTON3            (0x82000400 | DIMOFS_BUTTON3)
2149c2c66affSColin Finck #define DIMOUSE_BUTTON4            (0x82000400 | DIMOFS_BUTTON4)
2150c2c66affSColin Finck #define DIMOUSE_BUTTON5            (0x82000400 | DIMOFS_BUTTON5)
2151c2c66affSColin Finck #define DIMOUSE_BUTTON6            (0x82000400 | DIMOFS_BUTTON6)
2152c2c66affSColin Finck #define DIMOUSE_BUTTON7            (0x82000400 | DIMOFS_BUTTON7)
2153c2c66affSColin Finck 
2154c2c66affSColin Finck #ifdef __cplusplus
2155c2c66affSColin Finck extern "C" {
2156c2c66affSColin Finck #endif
2157c2c66affSColin Finck extern const DIDATAFORMAT c_dfDIMouse;
2158c2c66affSColin Finck extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
2159c2c66affSColin Finck extern const DIDATAFORMAT c_dfDIKeyboard;
2160c2c66affSColin Finck extern const DIDATAFORMAT c_dfDIJoystick;
2161c2c66affSColin Finck extern const DIDATAFORMAT c_dfDIJoystick2;
2162c2c66affSColin Finck #ifdef __cplusplus
2163c2c66affSColin Finck };
2164c2c66affSColin Finck #endif
2165c2c66affSColin Finck 
2166c2c66affSColin Finck #define DIAXIS_ANY_X_1             0xFF00C201
2167c2c66affSColin Finck #define DIAXIS_ANY_X_2             0xFF00C202
2168c2c66affSColin Finck #define DIAXIS_ANY_Y_1             0xFF014201
2169c2c66affSColin Finck #define DIAXIS_ANY_Y_2             0xFF014202
2170c2c66affSColin Finck #define DIAXIS_ANY_Z_1             0xFF01C201
2171c2c66affSColin Finck #define DIAXIS_ANY_Z_2             0xFF01C202
2172c2c66affSColin Finck #define DIAXIS_ANY_R_1             0xFF024201
2173c2c66affSColin Finck #define DIAXIS_ANY_R_2             0xFF024202
2174c2c66affSColin Finck #define DIAXIS_ANY_U_1             0xFF02C201
2175c2c66affSColin Finck #define DIAXIS_ANY_U_2             0xFF02C202
2176c2c66affSColin Finck #define DIAXIS_ANY_V_1             0xFF034201
2177c2c66affSColin Finck #define DIAXIS_ANY_V_2             0xFF034202
2178c2c66affSColin Finck #define DIAXIS_ANY_A_1             0xFF03C201
2179c2c66affSColin Finck #define DIAXIS_ANY_A_2             0xFF03C202
2180c2c66affSColin Finck #define DIAXIS_ANY_B_1             0xFF044201
2181c2c66affSColin Finck #define DIAXIS_ANY_B_2             0xFF044202
2182c2c66affSColin Finck #define DIAXIS_ANY_C_1             0xFF04C201
2183c2c66affSColin Finck #define DIAXIS_ANY_C_2             0xFF04C202
2184c2c66affSColin Finck #define DIAXIS_ANY_S_1             0xFF054201
2185c2c66affSColin Finck #define DIAXIS_ANY_S_2             0xFF054202
2186c2c66affSColin Finck #define DIAXIS_ANY_1               0xFF004201
2187c2c66affSColin Finck #define DIAXIS_ANY_2               0xFF004202
2188c2c66affSColin Finck #define DIAXIS_ANY_3               0xFF004203
2189c2c66affSColin Finck #define DIAXIS_ANY_4               0xFF004204
2190c2c66affSColin Finck #define DIPOV_ANY_1                0xFF004601
2191c2c66affSColin Finck #define DIPOV_ANY_2                0xFF004602
2192c2c66affSColin Finck #define DIPOV_ANY_3                0xFF004603
2193c2c66affSColin Finck #define DIPOV_ANY_4                0xFF004604
2194c2c66affSColin Finck #define DIBUTTON_ANY(instance)     (0xFF004400 | (instance))
2195c2c66affSColin Finck 
2196*1477b2deSAmine Khaldi #define DIVIRTUAL_FLYING_HELICOPTER        0x06000000
2197*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_MENU              0x060004fd
2198*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_FIRE              0x06001401
2199*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_WEAPONS           0x06001402
2200*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_TARGET            0x06001403
2201*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_DEVICE            0x060044fe
2202*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_PAUSE             0x060044fc
2203*1477b2deSAmine Khaldi #define DIHATSWITCH_FLYINGH_GLANCE         0x06004601
2204*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_FIRESECONDARY     0x06004c07
2205*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_COUNTER           0x06005404
2206*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_VIEW              0x06006405
2207*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_GEAR              0x06006406
2208*1477b2deSAmine Khaldi #define DIAXIS_FLYINGH_BANK                0x06008a01
2209*1477b2deSAmine Khaldi #define DIAXIS_FLYINGH_PITCH               0x06010a02
2210*1477b2deSAmine Khaldi #define DIAXIS_FLYINGH_COLLECTIVE          0x06018a03
2211*1477b2deSAmine Khaldi #define DIAXIS_FLYINGH_TORQUE              0x06025a04
2212*1477b2deSAmine Khaldi #define DIAXIS_FLYINGH_THROTTLE            0x0603da05
2213*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_FASTER_LINK       0x0603dce0
2214*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_SLOWER_LINK       0x0603dce8
2215*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_GLANCE_LEFT_LINK  0x0607c4e4
2216*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK 0x0607c4ec
2217*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_GLANCE_UP_LINK    0x0607c4e0
2218*1477b2deSAmine Khaldi #define DIBUTTON_FLYINGH_GLANCE_DOWN_LINK  0x0607c4e8
2219*1477b2deSAmine Khaldi 
2220*1477b2deSAmine Khaldi #define DIVIRTUAL_SPACESIM                  0x07000000
2221*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_FIRE              0x07000401
2222*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_WEAPONS           0x07000402
2223*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_TARGET            0x07000403
2224*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_MENU              0x070004fd
2225*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_VIEW              0x07004404
2226*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_DISPLAY           0x07004405
2227*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_RAISE             0x07004406
2228*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_LOWER             0x07004407
2229*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_GEAR              0x07004408
2230*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_FIRESECONDARY     0x07004409
2231*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_PAUSE             0x070044fc
2232*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_DEVICE            0x070044fe
2233*1477b2deSAmine Khaldi #define DIHATSWITCH_SPACESIM_GLANCE         0x07004601
2234*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_LEFT_LINK         0x0700c4e4
2235*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_RIGHT_LINK        0x0700c4ec
2236*1477b2deSAmine Khaldi #define DIAXIS_SPACESIM_LATERAL             0x07008201
2237*1477b2deSAmine Khaldi #define DIAXIS_SPACESIM_MOVE                0x07010202
2238*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_FORWARD_LINK      0x070144e0
2239*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_BACKWARD_LINK     0x070144e8
2240*1477b2deSAmine Khaldi #define DIAXIS_SPACESIM_CLIMB               0x0701c204
2241*1477b2deSAmine Khaldi #define DIAXIS_SPACESIM_ROTATE              0x07024205
2242*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_TURN_LEFT_LINK    0x070244e4
2243*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_TURN_RIGHT_LINK   0x070244ec
2244*1477b2deSAmine Khaldi #define DIAXIS_SPACESIM_THROTTLE            0x07038203
2245*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_FASTER_LINK       0x0703c4e0
2246*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_SLOWER_LINK       0x0703c4e8
2247*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_GLANCE_UP_LINK    0x0707c4e0
2248*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_GLANCE_LEFT_LINK  0x0707c4e4
2249*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_GLANCE_DOWN_LINK  0x0707c4e8
2250*1477b2deSAmine Khaldi #define DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK 0x0707c4ec
2251c2c66affSColin Finck 
2252c2c66affSColin Finck /*****************************************************************************
2253c2c66affSColin Finck  * IDirectInputA interface
2254c2c66affSColin Finck  */
2255c2c66affSColin Finck #define INTERFACE IDirectInputA
2256c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputA,IUnknown)
2257c2c66affSColin Finck {
2258c2c66affSColin Finck     /*** IUnknown methods ***/
2259c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2260c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2261c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2262c2c66affSColin Finck     /*** IDirectInputA methods ***/
2263c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2264c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2265c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2266c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2267c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2268c2c66affSColin Finck };
2269c2c66affSColin Finck #undef INTERFACE
2270c2c66affSColin Finck 
2271c2c66affSColin Finck /*****************************************************************************
2272c2c66affSColin Finck  * IDirectInputW interface
2273c2c66affSColin Finck  */
2274c2c66affSColin Finck #define INTERFACE IDirectInputW
2275c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInputW,IUnknown)
2276c2c66affSColin Finck {
2277c2c66affSColin Finck     /*** IUnknown methods ***/
2278c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2279c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2280c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2281c2c66affSColin Finck     /*** IDirectInputW methods ***/
2282c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2283c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2284c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2285c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2286c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2287c2c66affSColin Finck };
2288c2c66affSColin Finck #undef INTERFACE
2289c2c66affSColin Finck 
2290c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
2291c2c66affSColin Finck /*** IUnknown methods ***/
2292c2c66affSColin Finck #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2293c2c66affSColin Finck #define IDirectInput_AddRef(p)             (p)->lpVtbl->AddRef(p)
2294c2c66affSColin Finck #define IDirectInput_Release(p)            (p)->lpVtbl->Release(p)
2295c2c66affSColin Finck /*** IDirectInput methods ***/
2296c2c66affSColin Finck #define IDirectInput_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
2297c2c66affSColin Finck #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2298c2c66affSColin Finck #define IDirectInput_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
2299c2c66affSColin Finck #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2300c2c66affSColin Finck #define IDirectInput_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
2301c2c66affSColin Finck #else
2302c2c66affSColin Finck /*** IUnknown methods ***/
2303c2c66affSColin Finck #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2304c2c66affSColin Finck #define IDirectInput_AddRef(p)             (p)->AddRef()
2305c2c66affSColin Finck #define IDirectInput_Release(p)            (p)->Release()
2306c2c66affSColin Finck /*** IDirectInput methods ***/
2307c2c66affSColin Finck #define IDirectInput_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
2308c2c66affSColin Finck #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2309c2c66affSColin Finck #define IDirectInput_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
2310c2c66affSColin Finck #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2311c2c66affSColin Finck #define IDirectInput_Initialize(p,a,b)      (p)->Initialize(a,b)
2312c2c66affSColin Finck #endif
2313c2c66affSColin Finck 
2314c2c66affSColin Finck /*****************************************************************************
2315c2c66affSColin Finck  * IDirectInput2A interface
2316c2c66affSColin Finck  */
2317c2c66affSColin Finck #define INTERFACE IDirectInput2A
2318c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)
2319c2c66affSColin Finck {
2320c2c66affSColin Finck     /*** IUnknown methods ***/
2321c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2322c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2323c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2324c2c66affSColin Finck     /*** IDirectInputA methods ***/
2325c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2326c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2327c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2328c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2329c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2330c2c66affSColin Finck     /*** IDirectInput2A methods ***/
2331c2c66affSColin Finck     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
2332c2c66affSColin Finck };
2333c2c66affSColin Finck #undef INTERFACE
2334c2c66affSColin Finck 
2335c2c66affSColin Finck /*****************************************************************************
2336c2c66affSColin Finck  * IDirectInput2W interface
2337c2c66affSColin Finck  */
2338c2c66affSColin Finck #define INTERFACE IDirectInput2W
2339c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)
2340c2c66affSColin Finck {
2341c2c66affSColin Finck     /*** IUnknown methods ***/
2342c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2343c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2344c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2345c2c66affSColin Finck     /*** IDirectInputW methods ***/
2346c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2347c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2348c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2349c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2350c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2351c2c66affSColin Finck     /*** IDirectInput2W methods ***/
2352c2c66affSColin Finck     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
2353c2c66affSColin Finck };
2354c2c66affSColin Finck #undef INTERFACE
2355c2c66affSColin Finck 
2356c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
2357c2c66affSColin Finck /*** IUnknown methods ***/
2358c2c66affSColin Finck #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2359c2c66affSColin Finck #define IDirectInput2_AddRef(p)             (p)->lpVtbl->AddRef(p)
2360c2c66affSColin Finck #define IDirectInput2_Release(p)            (p)->lpVtbl->Release(p)
2361c2c66affSColin Finck /*** IDirectInput methods ***/
2362c2c66affSColin Finck #define IDirectInput2_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
2363c2c66affSColin Finck #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2364c2c66affSColin Finck #define IDirectInput2_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
2365c2c66affSColin Finck #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2366c2c66affSColin Finck #define IDirectInput2_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
2367c2c66affSColin Finck /*** IDirectInput2 methods ***/
2368c2c66affSColin Finck #define IDirectInput2_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
2369c2c66affSColin Finck #else
2370c2c66affSColin Finck /*** IUnknown methods ***/
2371c2c66affSColin Finck #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2372c2c66affSColin Finck #define IDirectInput2_AddRef(p)             (p)->AddRef()
2373c2c66affSColin Finck #define IDirectInput2_Release(p)            (p)->Release()
2374c2c66affSColin Finck /*** IDirectInput methods ***/
2375c2c66affSColin Finck #define IDirectInput2_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
2376c2c66affSColin Finck #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2377c2c66affSColin Finck #define IDirectInput2_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
2378c2c66affSColin Finck #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2379c2c66affSColin Finck #define IDirectInput2_Initialize(p,a,b)      (p)->Initialize(a,b)
2380c2c66affSColin Finck /*** IDirectInput2 methods ***/
2381c2c66affSColin Finck #define IDirectInput2_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)
2382c2c66affSColin Finck #endif
2383c2c66affSColin Finck 
2384c2c66affSColin Finck /*****************************************************************************
2385c2c66affSColin Finck  * IDirectInput7A interface
2386c2c66affSColin Finck  */
2387c2c66affSColin Finck #define INTERFACE IDirectInput7A
2388c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)
2389c2c66affSColin Finck {
2390c2c66affSColin Finck     /*** IUnknown methods ***/
2391c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2392c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2393c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2394c2c66affSColin Finck     /*** IDirectInputA methods ***/
2395c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2396c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2397c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2398c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2399c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2400c2c66affSColin Finck     /*** IDirectInput2A methods ***/
2401c2c66affSColin Finck     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
2402c2c66affSColin Finck     /*** IDirectInput7A methods ***/
2403c2c66affSColin Finck     STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
2404c2c66affSColin Finck };
2405c2c66affSColin Finck #undef INTERFACE
2406c2c66affSColin Finck 
2407c2c66affSColin Finck /*****************************************************************************
2408c2c66affSColin Finck  * IDirectInput7W interface
2409c2c66affSColin Finck  */
2410c2c66affSColin Finck #define INTERFACE IDirectInput7W
2411c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)
2412c2c66affSColin Finck {
2413c2c66affSColin Finck     /*** IUnknown methods ***/
2414c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2415c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2416c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2417c2c66affSColin Finck     /*** IDirectInputW methods ***/
2418c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2419c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2420c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2421c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2422c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2423c2c66affSColin Finck     /*** IDirectInput2W methods ***/
2424c2c66affSColin Finck     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
2425c2c66affSColin Finck     /*** IDirectInput7W methods ***/
2426c2c66affSColin Finck     STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
2427c2c66affSColin Finck };
2428c2c66affSColin Finck #undef INTERFACE
2429c2c66affSColin Finck 
2430c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
2431c2c66affSColin Finck /*** IUnknown methods ***/
2432c2c66affSColin Finck #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2433c2c66affSColin Finck #define IDirectInput7_AddRef(p)             (p)->lpVtbl->AddRef(p)
2434c2c66affSColin Finck #define IDirectInput7_Release(p)            (p)->lpVtbl->Release(p)
2435c2c66affSColin Finck /*** IDirectInput methods ***/
2436c2c66affSColin Finck #define IDirectInput7_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
2437c2c66affSColin Finck #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2438c2c66affSColin Finck #define IDirectInput7_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
2439c2c66affSColin Finck #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
2440c2c66affSColin Finck #define IDirectInput7_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
2441c2c66affSColin Finck /*** IDirectInput2 methods ***/
2442c2c66affSColin Finck #define IDirectInput7_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
2443c2c66affSColin Finck /*** IDirectInput7 methods ***/
2444c2c66affSColin Finck #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
2445c2c66affSColin Finck #else
2446c2c66affSColin Finck /*** IUnknown methods ***/
2447c2c66affSColin Finck #define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2448c2c66affSColin Finck #define IDirectInput7_AddRef(p)             (p)->AddRef()
2449c2c66affSColin Finck #define IDirectInput7_Release(p)            (p)->Release()
2450c2c66affSColin Finck /*** IDirectInput methods ***/
2451c2c66affSColin Finck #define IDirectInput7_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
2452c2c66affSColin Finck #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
2453c2c66affSColin Finck #define IDirectInput7_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
2454c2c66affSColin Finck #define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
2455c2c66affSColin Finck #define IDirectInput7_Initialize(p,a,b)      (p)->Initialize(a,b)
2456c2c66affSColin Finck /*** IDirectInput2 methods ***/
2457c2c66affSColin Finck #define IDirectInput7_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)
2458c2c66affSColin Finck /*** IDirectInput7 methods ***/
2459c2c66affSColin Finck #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
2460c2c66affSColin Finck #endif
2461c2c66affSColin Finck 
2462c2c66affSColin Finck 
2463c2c66affSColin Finck /*****************************************************************************
2464c2c66affSColin Finck  * IDirectInput8A interface
2465c2c66affSColin Finck  */
2466c2c66affSColin Finck #define INTERFACE IDirectInput8A
2467c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInput8A,IUnknown)
2468c2c66affSColin Finck {
2469c2c66affSColin Finck     /*** IUnknown methods ***/
2470c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2471c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2472c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2473c2c66affSColin Finck     /*** IDirectInput8A methods ***/
2474c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2475c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2476c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2477c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2478c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2479c2c66affSColin Finck     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
2480c2c66affSColin Finck     STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2481c2c66affSColin Finck     STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
2482c2c66affSColin Finck };
2483c2c66affSColin Finck #undef INTERFACE
2484c2c66affSColin Finck 
2485c2c66affSColin Finck /*****************************************************************************
2486c2c66affSColin Finck  * IDirectInput8W interface
2487c2c66affSColin Finck  */
2488c2c66affSColin Finck #define INTERFACE IDirectInput8W
2489c2c66affSColin Finck DECLARE_INTERFACE_(IDirectInput8W,IUnknown)
2490c2c66affSColin Finck {
2491c2c66affSColin Finck     /*** IUnknown methods ***/
2492c2c66affSColin Finck     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
2493c2c66affSColin Finck     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
2494c2c66affSColin Finck     STDMETHOD_(ULONG,Release)(THIS) PURE;
2495c2c66affSColin Finck     /*** IDirectInput8W methods ***/
2496c2c66affSColin Finck     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
2497c2c66affSColin Finck     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2498c2c66affSColin Finck     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
2499c2c66affSColin Finck     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
2500c2c66affSColin Finck     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
2501c2c66affSColin Finck     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
2502c2c66affSColin Finck     STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
2503c2c66affSColin Finck     STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
2504c2c66affSColin Finck };
2505c2c66affSColin Finck #undef INTERFACE
2506c2c66affSColin Finck 
2507c2c66affSColin Finck #if !defined(__cplusplus) || defined(CINTERFACE)
2508c2c66affSColin Finck /*** IUnknown methods ***/
2509c2c66affSColin Finck #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2510c2c66affSColin Finck #define IDirectInput8_AddRef(p)             (p)->lpVtbl->AddRef(p)
2511c2c66affSColin Finck #define IDirectInput8_Release(p)            (p)->lpVtbl->Release(p)
2512c2c66affSColin Finck /*** IDirectInput8 methods ***/
2513c2c66affSColin Finck #define IDirectInput8_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
2514c2c66affSColin Finck #define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
2515c2c66affSColin Finck #define IDirectInput8_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
2516c2c66affSColin Finck #define IDirectInput8_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
2517c2c66affSColin Finck #define IDirectInput8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
2518c2c66affSColin Finck #define IDirectInput8_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
2519c2c66affSColin Finck #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
2520c2c66affSColin Finck #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
2521c2c66affSColin Finck #else
2522c2c66affSColin Finck /*** IUnknown methods ***/
2523c2c66affSColin Finck #define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
2524c2c66affSColin Finck #define IDirectInput8_AddRef(p)             (p)->AddRef()
2525c2c66affSColin Finck #define IDirectInput8_Release(p)            (p)->Release()
2526c2c66affSColin Finck /*** IDirectInput8 methods ***/
2527c2c66affSColin Finck #define IDirectInput8_CreateDevice(p,a,b,c)       (p)->CreateDevice(a,b,c)
2528c2c66affSColin Finck #define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->EnumDevices(a,b,c,d)
2529c2c66affSColin Finck #define IDirectInput8_GetDeviceStatus(p,a)        (p)->GetDeviceStatus(a)
2530c2c66affSColin Finck #define IDirectInput8_RunControlPanel(p,a,b)      (p)->RunControlPanel(a,b)
2531c2c66affSColin Finck #define IDirectInput8_Initialize(p,a,b)           (p)->Initialize(a,b)
2532c2c66affSColin Finck #define IDirectInput8_FindDevice(p,a,b,c)         (p)->FindDevice(a,b,c)
2533c2c66affSColin Finck #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
2534c2c66affSColin Finck #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
2535c2c66affSColin Finck #endif
2536c2c66affSColin Finck 
2537c2c66affSColin Finck 
2538c2c66affSColin Finck /* Export functions */
2539c2c66affSColin Finck 
2540c2c66affSColin Finck #ifdef __cplusplus
2541c2c66affSColin Finck extern "C" {
2542c2c66affSColin Finck #endif
2543c2c66affSColin Finck 
2544c2c66affSColin Finck HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
2545c2c66affSColin Finck 
2546c2c66affSColin Finck HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
2547c2c66affSColin Finck HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);
2548c2c66affSColin Finck #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
2549c2c66affSColin Finck 
2550c2c66affSColin Finck HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
2551c2c66affSColin Finck 
2552c2c66affSColin Finck #ifdef __cplusplus
2553c2c66affSColin Finck };
2554c2c66affSColin Finck #endif
2555c2c66affSColin Finck 
2556c2c66affSColin Finck #endif /* __DINPUT_INCLUDED__ */
2557