ReactOS  0.4.13-dev-249-gcba1a2f
dinputd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef __DINPUTD_INCLUDED__
20 #define __DINPUTD_INCLUDED__
21 
22 #define COM_NO_WINDOWS_H
23 #include <objbase.h>
24 
25 #ifndef DIRECTINPUT_VERSION
26 #define DIRECTINPUT_VERSION 0x0800
27 #endif
28 
29 DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xEB0D7DFA,0x1990,0x4F27,0xB4,0xD6,0xED,0xF2,0xEE,0xC4,0xA4,0x4C);
30 
31 typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
32 
33 
35 
36 #define MAX_JOYSTRING 256
37 #ifndef MAX_JOYSTICKOEMVXDNAME
38 #define MAX_JOYSTICKOEMVXDNAME 260
39 #endif
40 
41 #define JOY_POV_NUMDIRS 4
42 #define JOY_POVVAL_FORWARD 0
43 #define JOY_POVVAL_BACKWARD 1
44 #define JOY_POVVAL_LEFT 2
45 #define JOY_POVVAL_RIGHT 3
46 
47 #define DIERR_NOMOREITEMS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
48 
49 typedef struct joypos_tag
50 {
51  DWORD dwX;
52  DWORD dwY;
53  DWORD dwZ;
54  DWORD dwR;
55  DWORD dwU;
56  DWORD dwV;
57 } JOYPOS, *LPJOYPOS;
58 
59 typedef struct joyrange_tag
60 {
61  JOYPOS jpMin;
62  JOYPOS jpMax;
65 
66 typedef struct joyreguservalues_tag
67 {
72 
73 typedef struct joyreghwsettings_tag
74 {
75  DWORD dwFlags;
78 
79 typedef struct joyreghwvalues_tag
80 {
85 
86 typedef struct joyreghwconfig_tag
87 {
91  DWORD dwType;
94 
95 typedef struct DIJOYTYPEINFO_DX5
96 {
104 
105 typedef struct DIJOYTYPEINFO_DX6
106 {
116 
117 typedef struct DIJOYTYPEINFO
118 {
130 #define DIJC_GUIDINSTANCE 0x00000001
131 #define DIJC_REGHWCONFIGTYPE 0x00000002
132 #define DIJC_GAIN 0x00000004
133 #define DIJC_CALLOUT 0x00000008
134 #define DIJC_WDMGAMEPORT 0x00000010
135 
136 typedef struct DIJOYCONFIG_DX5
137 {
146 
147 typedef struct DIJOYCONFIG
148 {
158 
159 typedef struct DIJOYUSERVALUES
160 {
167 
168 
169 /*****************************************************************************
170  * IDirectInputJoyConfig8 interface
171  */
172 #define INTERFACE IDirectInputJoyConfig8
173 DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
174 {
175  /*** IUnknown methods ***/
179  /*** IDirectInputJoyConfig8 methods ***/
180  STDMETHOD(Acquire)(THIS) PURE;
181  STDMETHOD(Unacquire)(THIS) PURE;
182  STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
187  STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
188  STDMETHOD(GetConfig)(THIS_ UINT, LPDIJOYCONFIG, DWORD) PURE;
190  STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
191  STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES, DWORD) PURE;
192  STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES, DWORD) PURE;
193  STDMETHOD(AddNewHardware)(THIS_ HWND, REFGUID) PURE;
194  STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR, DWORD, PHKEY) PURE;
195  STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
196 };
197 #undef INTERFACE
198 
199 #if !defined(__cplusplus) || defined(CINTERFACE)
200 /*** IUnknown methods ***/
201 #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
202 #define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
203 #define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
204 /*** IDirectInputJoyConfig8 methods ***/
205 #define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
206 #define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
207 #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
208 #define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
209 #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
210 #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
211 #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
212 #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
213 #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
214 #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
215 #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
216 #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
217 #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
218 #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
219 #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
220 #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
221 #else
222 /*** IUnknown methods ***/
223 #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
224 #define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
225 #define IDirectInputJoyConfig8_Release(p) (p)->Release()
226 /*** IDirectInputJoyConfig8 methods ***/
227 #define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
228 #define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
229 #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
230 #define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
231 #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
232 #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
233 #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
234 #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
235 #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
236 #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
237 #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
238 #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
239 #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
240 #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
241 #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
242 #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
243 #endif
244 
245 #endif /* __DINPUTD_INCLUDED__ */
DWORD dwZ
Definition: mmddk.h:273
CLSID clsidConfig
Definition: dinputd.h:121
WCHAR wszDisplayName[MAX_JOYSTRING]
Definition: dinputd.h:122
#define REFGUID
Definition: guiddef.h:111
struct DIJOYTYPEINFO_DX5 DIJOYTYPEINFO_DX5
struct joyreguservalues_tag * LPJOYREGUSERVALUES
const DIJOYCONFIG_DX5 * LPCDIJOYCONFIG_DX5
Definition: dinputd.h:145
#define REFIID
Definition: guiddef.h:113
struct DIJOYTYPEINFO_DX5 * LPDIJOYTYPEINFO_DX5
DWORD dwNumButtons
Definition: mmddk.h:296
#define THIS_
Definition: basetyps.h:65
_In_ BOOLEAN Release
Definition: classpnp.h:929
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD dwGain
Definition: dinputd.h:152
BOOL(CALLBACK * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID)
Definition: dinputd.h:34
#define THIS
Definition: basetyps.h:66
JOYPOS jpMin
Definition: mmddk.h:281
struct joyreguservalues_tag JOYREGUSERVALUES
REFIID riid
Definition: precomp.h:44
DWORD dwSize
Definition: dinputd.h:161
JOYRANGE jrvRanges
Definition: mmddk.h:288
struct joypos_tag JOYPOS
#define CALLBACK
Definition: compat.h:27
CLSID clsidConfig
Definition: dinputd.h:109
JOYPOS jpCenter
Definition: mmddk.h:283
struct DIJOYUSERVALUES * LPDIJOYUSERVALUES
HANDLE HWND
Definition: compat.h:13
struct DIJOYUSERVALUES DIJOYUSERVALUES
JOYRANGE jrvHardware
Definition: mmddk.h:301
GUID guidInstance
Definition: dinputd.h:139
JOYPOS jpDeadZone
Definition: mmddk.h:289
JOYREGHWCONFIG hwc
Definition: dinputd.h:151
struct DIJOYCONFIG * LPDIJOYCONFIG
struct DIJOYTYPEINFO DIJOYTYPEINFO
JOYPOS jpMax
Definition: mmddk.h:282
NTSTATUS QueryInterface(IN PDEVICE_OBJECT DeviceObject, IN CONST GUID InterfaceType, IN LONG Size, IN LONG Version, OUT PVOID Interface)
Definition: fdo.c:532
DWORD dwPOVValues[JOY_POV_NUMDIRS]
Definition: mmddk.h:302
struct DIJOYTYPEINFO_DX6 * LPDIJOYTYPEINFO_DX6
#define BOOL
Definition: nt_native.h:43
DWORD dwU
Definition: mmddk.h:275
struct joyrange_tag JOYRANGE
#define DWORD
Definition: nt_native.h:44
DWORD dwSize
Definition: dinputd.h:149
#define STDMETHOD(m)
Definition: basetyps.h:62
const DIJOYUSERVALUES * LPCDIJOYUSERVALUES
Definition: dinputd.h:166
LRESULT WINAPI SendNotify(HWND hwndTo, HWND hwndFrom, UINT uCode, LPNMHDR lpHdr)
const DIJOYCONFIG * LPCDIJOYCONFIG
Definition: dinputd.h:157
JOYREGHWSETTINGS hws
Definition: dinputd.h:98
DWORD dwFlags1
Definition: dinputd.h:125
WCHAR wszGameportEmulator[MAX_JOYSTRING]
Definition: dinputd.h:164
DWORD dwY
Definition: mmddk.h:272
DWORD dwV
Definition: mmddk.h:276
WCHAR wszCallout[MAX_JOYSTRING]
Definition: dinputd.h:143
DWORD dwSize
Definition: dinputd.h:138
struct joyreghwvalues_tag * LPJOYREGHWVALUES
struct DIJOYCONFIG_DX5 DIJOYCONFIG_DX5
BOOL SetConfig(LPCTSTR *ServiceArgs, INT ArgCount)
Definition: config.c:199
WCHAR wszCallout[MAX_JOYSTRING]
Definition: dinputd.h:154
DWORD dwGain
Definition: dinputd.h:141
WCHAR wszMapFile[MAX_JOYSTRING]
Definition: dinputd.h:127
struct IDirectInputJoyConfig8 * LPDIRECTINPUTJOYCONFIG8
Definition: dinputd.h:31
DWORD dwX
Definition: mmddk.h:271
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
const DIJOYTYPEINFO * LPCDIJOYTYPEINFO
Definition: dinputd.h:129
unsigned long DWORD
Definition: ntddk_ex.h:95
struct joyrange_tag * LPJOYRANGE
JOYREGHWCONFIG hwc
Definition: dinputd.h:140
#define LPVOID
Definition: nt_native.h:45
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]
Definition: dinputd.h:123
struct DIJOYTYPEINFO_DX6 DIJOYTYPEINFO_DX6
DWORD dwFlags2
Definition: dinputd.h:126
DWORD dwSize
Definition: dinputd.h:119
const DIJOYTYPEINFO_DX6 * LPCDIJOYTYPEINFO_DX6
Definition: dinputd.h:115
#define MAX_JOYSTRING
Definition: dinputd.h:36
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define JOY_POV_NUMDIRS
Definition: dinputd.h:41
DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xEB0D7DFA, 0x1990, 0x4F27, 0xB4, 0xD6, 0xED, 0xF2, 0xEE, 0xC4, 0xA4, 0x4C)
JOYREGHWVALUES hwv
Definition: mmddk.h:310
WCHAR wszGlobalDriver[MAX_JOYSTRING]
Definition: dinputd.h:163
DWORD dwCalFlags
Definition: mmddk.h:303
WCHAR wszDisplayName[MAX_JOYSTRING]
Definition: dinputd.h:110
HANDLE * PHKEY
Definition: registry.h:24
JOYREGHWSETTINGS hws
Definition: mmddk.h:308
struct joypos_tag * LPJOYPOS
struct joyreghwconfig_tag * LPJOYREGHWCONFIG
WCHAR wszHardwareId[MAX_JOYSTRING]
Definition: dinputd.h:112
#define PURE
Definition: basetyps.h:64
unsigned int UINT
Definition: ndis.h:50
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
Definition: dinputd.h:173
struct DIJOYTYPEINFO * LPDIJOYTYPEINFO
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]
Definition: dinputd.h:101
DWORD dwR
Definition: mmddk.h:274
const DIJOYTYPEINFO_DX5 * LPCDIJOYTYPEINFO_DX5
Definition: dinputd.h:103
unsigned int ULONG
Definition: retypes.h:1
CLSID clsidConfig
Definition: dinputd.h:99
GUID guidInstance
Definition: dinputd.h:150
struct joyreghwsettings_tag * LPJOYHWSETTINGS
WCHAR wszType[MAX_JOYSTRING]
Definition: dinputd.h:153
DWORD dwReserved
Definition: mmddk.h:312
#define MAX_JOYSTICKOEMVXDNAME
Definition: dinputd.h:38
WCHAR wszType[MAX_JOYSTRING]
Definition: dinputd.h:142
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
WCHAR wszDisplayName[MAX_JOYSTRING]
Definition: dinputd.h:100
struct joyreghwsettings_tag JOYREGHWSETTINGS
WCHAR wszHardwareId[MAX_JOYSTRING]
Definition: dinputd.h:124
GUID guidGameport
Definition: dinputd.h:155
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]
Definition: dinputd.h:111
struct joyreghwconfig_tag JOYREGHWCONFIG
DWORD dwUsageSettings
Definition: mmddk.h:309
struct DIJOYCONFIG_DX5 * LPDIJOYCONFIG_DX5
JOYREGHWSETTINGS hws
Definition: dinputd.h:108
JOYREGHWSETTINGS hws
Definition: dinputd.h:120
struct joyreghwvalues_tag JOYREGHWVALUES
JOYREGUSERVALUES ruv
Definition: dinputd.h:162
struct DIJOYCONFIG DIJOYCONFIG