wined3d: Use wined3d_mask_from_size() in wined3d_ffp_get_fs_settings().
[wine.git] / include / dinputd.h
blob141e634b59d474366c586398a1eafb6e9e1ba2d7
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);
30 DEFINE_GUID(IID_IDirectInputPIDDriver, 0xeec6993a,0xb3fd,0x11d2,0xa9,0x16,0x00,0xc0,0x4f,0xb9,0x86,0x38);
32 typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
35 typedef BOOL (CALLBACK *LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
37 #define MAX_JOYSTRING 256
38 #ifndef MAX_JOYSTICKOEMVXDNAME
39 #define MAX_JOYSTICKOEMVXDNAME 260
40 #endif
42 #define JOY_POV_NUMDIRS 4
43 #define JOY_POVVAL_FORWARD 0
44 #define JOY_POVVAL_BACKWARD 1
45 #define JOY_POVVAL_LEFT 2
46 #define JOY_POVVAL_RIGHT 3
48 #define DIERR_NOMOREITEMS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
50 typedef struct joypos_tag
52 DWORD dwX;
53 DWORD dwY;
54 DWORD dwZ;
55 DWORD dwR;
56 DWORD dwU;
57 DWORD dwV;
58 } JOYPOS, *LPJOYPOS;
60 typedef struct joyrange_tag
62 JOYPOS jpMin;
63 JOYPOS jpMax;
64 JOYPOS jpCenter;
65 } JOYRANGE, *LPJOYRANGE;
67 typedef struct joyreguservalues_tag
69 DWORD dwTimeOut;
70 JOYRANGE jrvRanges;
71 JOYPOS jpDeadZone;
72 } JOYREGUSERVALUES, *LPJOYREGUSERVALUES;
74 typedef struct joyreghwsettings_tag
76 DWORD dwFlags;
77 DWORD dwNumButtons;
78 } JOYREGHWSETTINGS, *LPJOYHWSETTINGS;
80 typedef struct joyreghwvalues_tag
82 JOYRANGE jrvHardware;
83 DWORD dwPOVValues[JOY_POV_NUMDIRS];
84 DWORD dwCalFlags;
85 } JOYREGHWVALUES, *LPJOYREGHWVALUES;
87 typedef struct joyreghwconfig_tag
89 JOYREGHWSETTINGS hws;
90 DWORD dwUsageSettings;
91 JOYREGHWVALUES hwv;
92 DWORD dwType;
93 DWORD dwReserved;
94 } JOYREGHWCONFIG, *LPJOYREGHWCONFIG;
96 typedef struct DIJOYTYPEINFO_DX5
98 DWORD dwSize;
99 JOYREGHWSETTINGS hws;
100 CLSID clsidConfig;
101 WCHAR wszDisplayName[MAX_JOYSTRING];
102 WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
103 } DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
104 typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
106 typedef struct DIJOYTYPEINFO_DX6
108 DWORD dwSize;
109 JOYREGHWSETTINGS hws;
110 CLSID clsidConfig;
111 WCHAR wszDisplayName[MAX_JOYSTRING];
112 WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
113 WCHAR wszHardwareId[MAX_JOYSTRING];
114 DWORD dwFlags1;
115 } DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6;
116 typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6;
118 typedef struct DIJOYTYPEINFO
120 DWORD dwSize;
121 JOYREGHWSETTINGS hws;
122 CLSID clsidConfig;
123 WCHAR wszDisplayName[MAX_JOYSTRING];
124 WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
125 WCHAR wszHardwareId[MAX_JOYSTRING];
126 DWORD dwFlags1;
127 DWORD dwFlags2;
128 WCHAR wszMapFile[MAX_JOYSTRING];
129 } DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
130 typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
131 #define DIJC_GUIDINSTANCE 0x00000001
132 #define DIJC_REGHWCONFIGTYPE 0x00000002
133 #define DIJC_GAIN 0x00000004
134 #define DIJC_CALLOUT 0x00000008
135 #define DIJC_WDMGAMEPORT 0x00000010
137 typedef struct DIJOYCONFIG_DX5
139 DWORD dwSize;
140 GUID guidInstance;
141 JOYREGHWCONFIG hwc;
142 DWORD dwGain;
143 WCHAR wszType[MAX_JOYSTRING];
144 WCHAR wszCallout[MAX_JOYSTRING];
145 } DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
146 typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
148 typedef struct DIJOYCONFIG
150 DWORD dwSize;
151 GUID guidInstance;
152 JOYREGHWCONFIG hwc;
153 DWORD dwGain;
154 WCHAR wszType[MAX_JOYSTRING];
155 WCHAR wszCallout[MAX_JOYSTRING];
156 GUID guidGameport;
157 } DIJOYCONFIG, *LPDIJOYCONFIG;
158 typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
160 typedef struct DIJOYUSERVALUES
162 DWORD dwSize;
163 JOYREGUSERVALUES ruv;
164 WCHAR wszGlobalDriver[MAX_JOYSTRING];
165 WCHAR wszGameportEmulator[MAX_JOYSTRING];
166 } DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
167 typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
170 /*****************************************************************************
171 * IDirectInputJoyConfig8 interface
173 #define INTERFACE IDirectInputJoyConfig8
174 DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
176 /*** IUnknown methods ***/
177 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
178 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
179 STDMETHOD_(ULONG,Release)(THIS) PURE;
180 /*** IDirectInputJoyConfig8 methods ***/
181 STDMETHOD(Acquire)(THIS) PURE;
182 STDMETHOD(Unacquire)(THIS) PURE;
183 STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
184 STDMETHOD(SendNotify)(THIS) PURE;
185 STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK, LPVOID) PURE;
186 STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR, LPDIJOYTYPEINFO, DWORD) PURE;
187 STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR, LPCDIJOYTYPEINFO, DWORD, LPWSTR) PURE;
188 STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
189 STDMETHOD(GetConfig)(THIS_ UINT, LPDIJOYCONFIG, DWORD) PURE;
190 STDMETHOD(SetConfig)(THIS_ UINT, LPCDIJOYCONFIG, DWORD) PURE;
191 STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
192 STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES, DWORD) PURE;
193 STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES, DWORD) PURE;
194 STDMETHOD(AddNewHardware)(THIS_ HWND, REFGUID) PURE;
195 STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR, DWORD, PHKEY) PURE;
196 STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
198 #undef INTERFACE
200 #if !defined(__cplusplus) || defined(CINTERFACE)
201 /*** IUnknown methods ***/
202 #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
203 #define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
204 #define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
205 /*** IDirectInputJoyConfig8 methods ***/
206 #define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
207 #define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
208 #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
209 #define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
210 #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
211 #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
212 #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
213 #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
214 #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
215 #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
216 #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
217 #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
218 #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
219 #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
220 #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
221 #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
222 #else
223 /*** IUnknown methods ***/
224 #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
225 #define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
226 #define IDirectInputJoyConfig8_Release(p) (p)->Release()
227 /*** IDirectInputJoyConfig8 methods ***/
228 #define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
229 #define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
230 #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
231 #define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
232 #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
233 #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
234 #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
235 #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
236 #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
237 #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
238 #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
239 #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
240 #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
241 #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
242 #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
243 #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
244 #endif
246 #endif /* __DINPUTD_INCLUDED__ */