ReactOS 0.4.15-dev-7968-g24a56f8
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
29DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xEB0D7DFA,0x1990,0x4F27,0xB4,0xD6,0xED,0xF2,0xEE,0xC4,0xA4,0x4C);
30
31typedef 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
49typedef struct joypos_tag
50{
51 DWORD dwX;
52 DWORD dwY;
53 DWORD dwZ;
54 DWORD dwR;
55 DWORD dwU;
56 DWORD dwV;
58
59typedef struct joyrange_tag
60{
65
66typedef struct joyreguservalues_tag
67{
72
73typedef struct joyreghwsettings_tag
74{
78
79typedef struct joyreghwvalues_tag
80{
85
86typedef struct joyreghwconfig_tag
87{
94
95typedef struct DIJOYTYPEINFO_DX5
96{
104
105typedef struct DIJOYTYPEINFO_DX6
106{
116
117typedef 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
136typedef struct DIJOYCONFIG_DX5
137{
146
147typedef struct DIJOYCONFIG
148{
158
159typedef struct DIJOYUSERVALUES
160{
167
168
169/*****************************************************************************
170 * IDirectInputJoyConfig8 interface
171 */
172#define INTERFACE IDirectInputJoyConfig8
173DECLARE_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;
190 STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
191 STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES, 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__ */
BOOL SetConfig(LPCTSTR *ServiceArgs, INT ArgCount)
Definition: config.c:199
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
HANDLE * PHKEY
Definition: registry.h:26
_In_ BOOLEAN Release
Definition: cdrom.h:920
#define MAX_JOYSTRING
Definition: dinputd.h:36
const DIJOYUSERVALUES * LPCDIJOYUSERVALUES
Definition: dinputd.h:166
struct DIJOYTYPEINFO_DX6 * LPDIJOYTYPEINFO_DX6
struct DIJOYUSERVALUES * LPDIJOYUSERVALUES
#define MAX_JOYSTICKOEMVXDNAME
Definition: dinputd.h:38
struct joypos_tag * LPJOYPOS
struct joypos_tag JOYPOS
struct joyreghwsettings_tag * LPJOYHWSETTINGS
struct IDirectInputJoyConfig8 * LPDIRECTINPUTJOYCONFIG8
Definition: dinputd.h:31
struct joyreghwconfig_tag * LPJOYREGHWCONFIG
const DIJOYTYPEINFO * LPCDIJOYTYPEINFO
Definition: dinputd.h:129
struct joyreguservalues_tag * LPJOYREGUSERVALUES
BOOL(CALLBACK * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID)
Definition: dinputd.h:34
struct joyreghwvalues_tag JOYREGHWVALUES
struct DIJOYCONFIG * LPDIJOYCONFIG
const DIJOYTYPEINFO_DX6 * LPCDIJOYTYPEINFO_DX6
Definition: dinputd.h:115
struct joyreghwvalues_tag * LPJOYREGHWVALUES
const DIJOYCONFIG_DX5 * LPCDIJOYCONFIG_DX5
Definition: dinputd.h:145
struct joyreghwsettings_tag JOYREGHWSETTINGS
struct joyrange_tag JOYRANGE
struct joyrange_tag * LPJOYRANGE
struct joyreghwconfig_tag JOYREGHWCONFIG
const DIJOYCONFIG * LPCDIJOYCONFIG
Definition: dinputd.h:157
const DIJOYTYPEINFO_DX5 * LPCDIJOYTYPEINFO_DX5
Definition: dinputd.h:103
struct DIJOYCONFIG_DX5 * LPDIJOYCONFIG_DX5
struct DIJOYTYPEINFO * LPDIJOYTYPEINFO
struct joyreguservalues_tag JOYREGUSERVALUES
struct DIJOYTYPEINFO_DX5 * LPDIJOYTYPEINFO_DX5
HANDLE HWND
Definition: compat.h:19
#define CALLBACK
Definition: compat.h:35
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
#define LPVOID
Definition: nt_native.h:45
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFGUID
Definition: guiddef.h:116
#define REFIID
Definition: guiddef.h:118
#define JOY_POV_NUMDIRS
Definition: mmddk.h:222
DWORD dwGain
Definition: dinputd.h:141
WCHAR wszType[MAX_JOYSTRING]
Definition: dinputd.h:142
JOYREGHWCONFIG hwc
Definition: dinputd.h:140
DWORD dwSize
Definition: dinputd.h:138
WCHAR wszCallout[MAX_JOYSTRING]
Definition: dinputd.h:143
GUID guidInstance
Definition: dinputd.h:139
WCHAR wszType[MAX_JOYSTRING]
Definition: dinputd.h:153
DWORD dwSize
Definition: dinputd.h:149
GUID guidGameport
Definition: dinputd.h:155
JOYREGHWCONFIG hwc
Definition: dinputd.h:151
WCHAR wszCallout[MAX_JOYSTRING]
Definition: dinputd.h:154
DWORD dwGain
Definition: dinputd.h:152
GUID guidInstance
Definition: dinputd.h:150
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]
Definition: dinputd.h:101
WCHAR wszDisplayName[MAX_JOYSTRING]
Definition: dinputd.h:100
JOYREGHWSETTINGS hws
Definition: dinputd.h:98
CLSID clsidConfig
Definition: dinputd.h:99
WCHAR wszHardwareId[MAX_JOYSTRING]
Definition: dinputd.h:112
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]
Definition: dinputd.h:111
CLSID clsidConfig
Definition: dinputd.h:109
JOYREGHWSETTINGS hws
Definition: dinputd.h:108
WCHAR wszDisplayName[MAX_JOYSTRING]
Definition: dinputd.h:110
DWORD dwSize
Definition: dinputd.h:119
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]
Definition: dinputd.h:123
WCHAR wszDisplayName[MAX_JOYSTRING]
Definition: dinputd.h:122
DWORD dwFlags1
Definition: dinputd.h:125
DWORD dwFlags2
Definition: dinputd.h:126
WCHAR wszMapFile[MAX_JOYSTRING]
Definition: dinputd.h:127
JOYREGHWSETTINGS hws
Definition: dinputd.h:120
WCHAR wszHardwareId[MAX_JOYSTRING]
Definition: dinputd.h:124
CLSID clsidConfig
Definition: dinputd.h:121
WCHAR wszGameportEmulator[MAX_JOYSTRING]
Definition: dinputd.h:164
DWORD dwSize
Definition: dinputd.h:161
JOYREGUSERVALUES ruv
Definition: dinputd.h:162
WCHAR wszGlobalDriver[MAX_JOYSTRING]
Definition: dinputd.h:163
DWORD dwY
Definition: mmddk.h:272
DWORD dwR
Definition: mmddk.h:274
DWORD dwX
Definition: mmddk.h:271
DWORD dwZ
Definition: mmddk.h:273
DWORD dwV
Definition: mmddk.h:276
DWORD dwU
Definition: mmddk.h:275
JOYPOS jpCenter
Definition: mmddk.h:283
JOYPOS jpMax
Definition: mmddk.h:282
JOYPOS jpMin
Definition: mmddk.h:281
JOYREGHWSETTINGS hws
Definition: mmddk.h:308
DWORD dwUsageSettings
Definition: mmddk.h:309
DWORD dwReserved
Definition: mmddk.h:312
JOYREGHWVALUES hwv
Definition: mmddk.h:310
DWORD dwNumButtons
Definition: mmddk.h:296
DWORD dwCalFlags
Definition: mmddk.h:303
DWORD dwPOVValues[JOY_POV_NUMDIRS]
Definition: mmddk.h:302
JOYRANGE jrvHardware
Definition: mmddk.h:301
JOYRANGE jrvRanges
Definition: mmddk.h:288
JOYPOS jpDeadZone
Definition: mmddk.h:289
static LRESULT SendNotify(TreeListData *pData, NMHDR *pNotify)
Definition: treelist.c:530
uint32_t ULONG
Definition: typedefs.h:59
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185