dsound: Cleanup IDirectSoundImpl_Create() and move it.
[wine/multimedia.git] / include / dinputd.h
blobac24a2c56b13265b8e72cb324d215d5930ba8c4c
1 /*
2 * Copyright (C) the Wine project
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.
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.
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
19 #ifndef __DINPUTD_INCLUDED__
20 #define __DINPUTD_INCLUDED__
22 #define COM_NO_WINDOWS_H
23 #include <objbase.h>
25 #ifndef DIRECTINPUT_VERSION
26 #define DIRECTINPUT_VERSION 0x0800
27 #endif
29 DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xEB0D7DFA,0x1990,0x4F27,0xB4,0xD6,0xED,0xF2,0xEE,0xC4,0xA4,0x4C);
31 typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
34 typedef BOOL (CALLBACK *LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
36 #define MAX_JOYSTRING 256
37 #ifndef MAX_JOYSTICKOEMVXDNAME
38 #define MAX_JOYSTICKOEMVXDNAME 260
39 #endif
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
47 typedef struct joypos_tag
49 DWORD dwX;
50 DWORD dwY;
51 DWORD dwZ;
52 DWORD dwR;
53 DWORD dwU;
54 DWORD dwV;
55 } JOYPOS, *LPJOYPOS;
57 typedef struct joyrange_tag
59 JOYPOS jpMin;
60 JOYPOS jpMax;
61 JOYPOS jpCenter;
62 } JOYRANGE, *LPJOYRANGE;
64 typedef struct joyreguservalues_tag
66 DWORD dwTimeOut;
67 JOYRANGE jrvRanges;
68 JOYPOS jpDeadZone;
69 } JOYREGUSERVALUES, *LPJOYREGUSERVALUES;
71 typedef struct joyreghwsettings_tag
73 DWORD dwFlags;
74 DWORD dwNumButtons;
75 } JOYREGHWSETTINGS, *LPJOYHWSETTINGS;
77 typedef struct joyreghwvalues_tag
79 JOYRANGE jrvHardware;
80 DWORD dwPOVValues[JOY_POV_NUMDIRS];
81 DWORD dwCalFlags;
82 } JOYREGHWVALUES, *LPJOYREGHWVALUES;
84 typedef struct joyreghwconfig_tag
86 JOYREGHWSETTINGS hws;
87 DWORD dwUsageSettings;
88 JOYREGHWVALUES hwv;
89 DWORD dwType;
90 DWORD dwReserved;
91 } JOYREGHWCONFIG, *LPJOYREGHWCONFIG;
93 typedef struct DIJOYTYPEINFO_DX5
95 DWORD dwSize;
96 JOYREGHWSETTINGS hws;
97 CLSID clsidConfig;
98 WCHAR wszDisplayName[MAX_JOYSTRING];
99 WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
100 } DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
101 typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
103 typedef struct DIJOYTYPEINFO_DX6
105 DWORD dwSize;
106 JOYREGHWSETTINGS hws;
107 CLSID clsidConfig;
108 WCHAR wszDisplayName[MAX_JOYSTRING];
109 WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
110 WCHAR wszHardwareId[MAX_JOYSTRING];
111 DWORD dwFlags1;
112 } DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6;
113 typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6;
115 typedef struct DIJOYTYPEINFO
117 DWORD dwSize;
118 JOYREGHWSETTINGS hws;
119 CLSID clsidConfig;
120 WCHAR wszDisplayName[MAX_JOYSTRING];
121 WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
122 WCHAR wszHardwareId[MAX_JOYSTRING];
123 DWORD dwFlags1;
124 DWORD dwFlags2;
125 WCHAR wszMapFile[MAX_JOYSTRING];
126 } DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
127 typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
128 #define DIJC_GUIDINSTANCE 0x00000001
129 #define DIJC_REGHWCONFIGTYPE 0x00000002
130 #define DIJC_GAIN 0x00000004
131 #define DIJC_CALLOUT 0x00000008
132 #define DIJC_WDMGAMEPORT 0x00000010
134 typedef struct DIJOYCONFIG_DX5
136 DWORD dwSize;
137 GUID guidInstance;
138 JOYREGHWCONFIG hwc;
139 DWORD dwGain;
140 WCHAR wszType[MAX_JOYSTRING];
141 WCHAR wszCallout[MAX_JOYSTRING];
142 } DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
143 typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
145 typedef struct DIJOYCONFIG
147 DWORD dwSize;
148 GUID guidInstance;
149 JOYREGHWCONFIG hwc;
150 DWORD dwGain;
151 WCHAR wszType[MAX_JOYSTRING];
152 WCHAR wszCallout[MAX_JOYSTRING];
153 GUID guidGameport;
154 } DIJOYCONFIG, *LPDIJOYCONFIG;
155 typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
157 typedef struct DIJOYUSERVALUES
159 DWORD dwSize;
160 JOYREGUSERVALUES ruv;
161 WCHAR wszGlobalDriver[MAX_JOYSTRING];
162 WCHAR wszGameportEmulator[MAX_JOYSTRING];
163 } DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
164 typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
167 /*****************************************************************************
168 * IDirectInputJoyConfig8 interface
170 #define INTERFACE IDirectInputJoyConfig8
171 DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
173 /*** IUnknown methods ***/
174 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
175 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
176 STDMETHOD_(ULONG,Release)(THIS) PURE;
177 /*** IDirectInputJoyConfig8 methods ***/
178 STDMETHOD(Acquire)(THIS) PURE;
179 STDMETHOD(Unacquire)(THIS) PURE;
180 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
181 STDMETHOD(SendNotify)(THIS) PURE;
182 STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK, LPVOID) PURE;
183 STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR, LPDIJOYTYPEINFO, DWORD) PURE;
184 STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR, LPCDIJOYTYPEINFO, DWORD, LPWSTR) PURE;
185 STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
186 STDMETHOD(GetConfig)(THIS_ UINT, LPDIJOYCONFIG, DWORD) PURE;
187 STDMETHOD(SetConfig)(THIS_ UINT, LPCDIJOYCONFIG, DWORD) PURE;
188 STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
189 STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES, DWORD) PURE;
190 STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES, DWORD) PURE;
191 STDMETHOD(AddNewHardware)(THIS_ HWND, REFGUID) PURE;
192 STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR, DWORD, PHKEY) PURE;
193 STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
195 #undef INTERFACE
197 #if !defined(__cplusplus) || defined(CINTERFACE)
198 /*** IUnknown methods ***/
199 #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
200 #define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
201 #define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
202 /*** IDirectInputJoyConfig8 methods ***/
203 #define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
204 #define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
205 #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
206 #define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
207 #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
208 #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
209 #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
210 #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
211 #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
212 #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
213 #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
214 #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
215 #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
216 #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
217 #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
218 #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
219 #else
220 /*** IUnknown methods ***/
221 #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
222 #define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
223 #define IDirectInputJoyConfig8_Release(p) (p)->Release()
224 /*** IDirectInputJoyConfig8 methods ***/
225 #define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
226 #define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
227 #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
228 #define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
229 #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
230 #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
231 #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
232 #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
233 #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
234 #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
235 #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
236 #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
237 #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
238 #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
239 #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
240 #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
241 #endif
243 #endif /* __DINPUTD_INCLUDED__ */