~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/dinput/device_private.h

Version: ~ [ wine-1.0-rc1 ] ~ [ wine-0.9.61 ] ~ [ wine-0.9.60 ] ~ [ wine-0.9.59 ] ~ [ wine-0.9.58 ] ~ [ wine-0.9.57 ] ~ [ wine-0.9.56 ] ~ [ wine-0.9.55 ] ~ [ wine-0.9.54 ] ~ [ wine-0.9.53 ] ~ [ wine-0.9.52 ] ~ [ wine-0.9.51 ] ~ [ wine-0.9.50 ] ~ [ wine-0.9.49 ] ~ [ wine-0.9.48 ] ~ [ wine-0.9.47 ] ~ [ wine-0.9.46 ] ~ [ wine-0.9.45 ] ~ [ wine-0.9.44 ] ~ [ wine-0.9.43 ] ~ [ wine-0.9.42 ] ~ [ wine-0.9.41 ] ~ [ wine-0.9.40 ] ~ [ wine-0.9.39 ] ~ [ wine-0.9.38 ] ~ [ wine-0.9.37 ] ~ [ wine-0.9.36 ] ~ [ wine-0.9.35 ] ~ [ wine-0.9.34 ] ~ [ wine-0.9.33 ] ~ [ wine-0.9.32 ] ~ [ wine-0.9.31 ] ~ [ wine-0.9.30 ] ~ [ wine-0.9.29 ] ~ [ wine-0.9.28 ] ~ [ wine-0.9.27 ] ~ [ wine-0.9.26 ] ~ [ wine-0.9.25 ] ~ [ wine-0.9.24 ] ~ [ wine-0.9.23 ] ~ [ wine-0.9.22 ] ~ [ wine-0.9.21 ] ~ [ wine-0.9.20 ] ~ [ wine-0.9.19 ] ~ [ wine-0.9.18 ] ~ [ wine-0.9.17 ] ~ [ wine-0.9.16 ] ~ [ wine-0.9.15 ] ~ [ wine-0.9.14 ] ~ [ wine-0.9.13 ] ~ [ wine-0.9.12 ] ~ [ wine-0.9.11 ] ~ [ wine-0.9.10 ] ~ [ wine-0.9.9 ] ~ [ wine-0.9.8 ] ~ [ wine-0.9.7 ] ~ [ wine-0.9.6 ] ~ [ wine-0.9.5 ] ~ [ wine-0.9.4 ] ~ [ wine-0.9.3 ] ~ [ wine-0.9.2 ] ~ [ wine-0.9.1 ] ~ [ wine-0.9 ] ~ [ wine20050930 ] ~ [ wine20050830 ] ~ [ wine20050725 ] ~ [ wine20050628 ] ~ [ wine20050524 ] ~ [ wine20050419 ] ~ [ wine20050310 ] ~ [ wine20050211 ] ~ [ wine20050111 ] ~ [ wine20041201 ] ~ [ wine20041019 ] ~ [ wine20040914 ] ~ [ wine20040813 ] ~ [ wine20040716 ] ~ [ wine20040615 ] ~ [ wine20040505 ] ~ [ wine20040408 ] ~ [ wine20040309 ] ~ [ wine20040213 ] ~ [ wine20040121 ] ~ [ wine20031212 ] ~ [ wine20031118 ] ~ [ wine20031016 ] ~ [ wine20030911 ] ~ [ wine20030813 ] ~ [ wine20030709 ] ~ [ wine20030618 ] ~ [ wine20030508 ] ~ [ wine20030408 ] ~ [ wine20030318 ] ~ [ wine20030219 ] ~ [ wine20030115 ] ~ [ wine20021219 ] ~ [ wine20021125 ] ~ [ wine20021031 ] ~ [ wine20021007 ] ~ [ wine20020904 ] ~ [ wine20020804 ] ~ [ wine20020710 ] ~ [ wine20020605 ] ~ [ wine20020509 ] ~ [ wine20020411 ] ~ [ wine20020310 ] ~ [ wine20020228 ] ~ [ wine20011226 ] ~ [ wine20011108 ] ~ [ wine20011004 ] ~ [ wine20010824 ] ~ [ wine20010731 ] ~ [ wine20010629 ] ~ [ wine20010510 ] ~ [ wine20010418 ] ~ [ wine20010326 ] ~ [ wine20010305 ] ~ [ wine20010216 ] ~ [ wine20010112 ] ~ [ wine20001222 ] ~ [ wine20001202 ] ~ [ wine20001026 ] ~ [ wine20001002 ] ~ [ wine20000909 ] ~ [ wine20000821 ] ~ [ wine20000801 ] ~ [ wine20000716 ] ~ [ wine20000326 ] ~ [ wine20000227 ] ~ [ wine20000130 ] ~ [ wine20000109 ] ~

  1 /*
  2  * Copyright 2000 Lionel Ulmer
  3  * Copyright 2000-2001 TransGaming Technologies Inc.
  4  *
  5  * This library is free software; you can redistribute it and/or
  6  * modify it under the terms of the GNU Lesser General Public
  7  * License as published by the Free Software Foundation; either
  8  * version 2.1 of the License, or (at your option) any later version.
  9  *
 10  * This library is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  * Lesser General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU Lesser General Public
 16  * License along with this library; if not, write to the Free Software
 17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 18  */
 19 
 20 #ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
 21 #define __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
 22 
 23 #include <stdarg.h>
 24 
 25 #include "windef.h"
 26 #include "winbase.h"
 27 #include "dinput.h"
 28 #include "wine/list.h"
 29 #include "dinput_private.h"
 30 
 31 typedef struct
 32 {
 33     int size;
 34     int offset_in;
 35     int offset_out;
 36     int value;
 37 } DataTransform;
 38 
 39 typedef struct
 40 {
 41     int                         size;
 42     int                         internal_format_size;
 43     DataTransform              *dt;
 44 
 45     int                        *offsets;     /* object offsets */
 46     LPDIDATAFORMAT              wine_df;     /* wine internal data format */
 47     LPDIDATAFORMAT              user_df;     /* user defined data format */
 48 } DataFormat;
 49 
 50 /* Device implementation */
 51 typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl;
 52 struct IDirectInputDevice2AImpl
 53 {
 54     const void                 *lpVtbl;
 55     LONG                        ref;
 56     GUID                        guid;
 57     CRITICAL_SECTION            crit;
 58     IDirectInputImpl           *dinput;
 59     struct list                 entry;       /* entry into IDirectInput devices list */
 60     HANDLE                      hEvent;
 61     DWORD                       dwCoopLevel;
 62     HWND                        win;
 63     int                         acquired;
 64     DI_EVENT_PROC               event_proc;  /* function to receive mouse & keyboard events */
 65 
 66     LPDIDEVICEOBJECTDATA        data_queue;  /* buffer for 'GetDeviceData'.                 */
 67     int                         queue_len;   /* size of the queue - set in 'SetProperty'    */
 68     int                         queue_head;  /* position to write new event into queue      */
 69     int                         queue_tail;  /* next event to read from queue               */
 70     BOOL                        overflow;    /* return DI_BUFFEROVERFLOW in 'GetDeviceData' */
 71 
 72     DataFormat                  data_format; /* user data format and wine to user format converter */
 73 };
 74 
 75 extern BOOL get_app_key(HKEY*, HKEY*);
 76 extern DWORD get_config_key(HKEY, HKEY, const char*, char*, DWORD);
 77 
 78 /* Routines to do DataFormat / WineFormat conversions */
 79 extern void fill_DataFormat(void *out, const void *in, const DataFormat *df) ;
 80 extern HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format);
 81 extern void release_DataFormat(DataFormat *df) ;
 82 extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq);
 83 /* Helper functions to work with data format */
 84 extern int id_to_object(LPCDIDATAFORMAT df, int id);
 85 extern int id_to_offset(const DataFormat *df, int id);
 86 extern int find_property(const DataFormat *df, LPCDIPROPHEADER ph);
 87 
 88 /* Common joystick stuff */
 89 typedef struct
 90 {
 91     LONG lDevMin;
 92     LONG lDevMax;
 93     LONG lMin;
 94     LONG lMax;
 95     LONG lDeadZone;
 96     LONG lSaturation;
 97 } ObjProps;
 98 
 99 extern DWORD joystick_map_pov(POINTL *p);
100 extern LONG joystick_map_axis(ObjProps *props, int val);
101 
102 /**
103  * Callback Data used by specific callback 
104  *  for EnumObject on 'W' interfaces
105  */
106 typedef struct {
107   LPDIENUMDEVICEOBJECTSCALLBACKW lpCallBack;
108   LPVOID lpvRef;
109 } device_enumobjects_AtoWcb_data;
110 
111 extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
112 
113 extern const GUID DInput_Wine_Keyboard_GUID;
114 extern const GUID DInput_Wine_Mouse_GUID;
115 
116 /* Various debug tools */
117 extern void _dump_cooperativelevel_DI(DWORD dwFlags) ;
118 extern void _dump_EnumObjects_flags(DWORD dwFlags) ;
119 extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) ;
120 extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) ;
121 extern void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) ;
122 extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) ;
123 extern const char *_dump_dinput_GUID(const GUID *guid) ;
124 
125 /* And the stubs */
126 extern HRESULT WINAPI IDirectInputDevice2AImpl_Acquire(LPDIRECTINPUTDEVICE8A iface);
127 extern HRESULT WINAPI IDirectInputDevice2AImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);
128 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
129         LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df ) ;
130 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
131         LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags ) ;
132 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
133         LPDIRECTINPUTDEVICE8A iface,HANDLE hnd ) ;
134 extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface) ;
135 extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj);
136 extern HRESULT WINAPI IDirectInputDevice2WImpl_QueryInterface(LPDIRECTINPUTDEVICE8W iface,REFIID riid,LPVOID *ppobj);
137 extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
138         LPDIRECTINPUTDEVICE8A iface) ;
139 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
140         LPDIRECTINPUTDEVICE8A iface,
141         LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
142         LPVOID lpvRef,
143         DWORD dwFlags) ;
144 extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(
145         LPDIRECTINPUTDEVICE8W iface,
146         LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
147         LPVOID lpvRef,
148         DWORD dwFlags) ;
149 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPDIPROPHEADER pdiph);
150 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPCDIPROPHEADER pdiph);
151 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
152         LPDIRECTINPUTDEVICE8A iface,
153         LPDIDEVICEOBJECTINSTANCEA pdidoi,
154         DWORD dwObj,
155         DWORD dwHow) ;
156 extern HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, 
157                                                              LPDIDEVICEOBJECTINSTANCEW pdidoi,
158                                                              DWORD dwObj,
159                                                              DWORD dwHow);
160 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
161         DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags);
162 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
163         LPDIRECTINPUTDEVICE8A iface,
164         LPDIDEVICEINSTANCEA pdidi) ;
165 extern HRESULT WINAPI IDirectInputDevice2WImpl_GetDeviceInfo(
166         LPDIRECTINPUTDEVICE8W iface,
167         LPDIDEVICEINSTANCEW pdidi) ;
168 extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
169         LPDIRECTINPUTDEVICE8A iface,
170         HWND hwndOwner,
171         DWORD dwFlags) ;
172 extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
173         LPDIRECTINPUTDEVICE8A iface,
174         HINSTANCE hinst,
175         DWORD dwVersion,
176         REFGUID rguid) ;
177 extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
178         LPDIRECTINPUTDEVICE8A iface,
179         REFGUID rguid,
180         LPCDIEFFECT lpeff,
181         LPDIRECTINPUTEFFECT *ppdef,
182         LPUNKNOWN pUnkOuter) ;
183 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
184         LPDIRECTINPUTDEVICE8A iface,
185         LPDIENUMEFFECTSCALLBACKA lpCallback,
186         LPVOID lpvRef,
187         DWORD dwFlags) ;
188 extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects(
189         LPDIRECTINPUTDEVICE8W iface,
190         LPDIENUMEFFECTSCALLBACKW lpCallback,
191         LPVOID lpvRef,
192         DWORD dwFlags) ;
193 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
194         LPDIRECTINPUTDEVICE8A iface,
195         LPDIEFFECTINFOA lpdei,
196         REFGUID rguid) ;
197 extern HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo(
198         LPDIRECTINPUTDEVICE8W iface,
199         LPDIEFFECTINFOW lpdei,
200         REFGUID rguid) ;
201 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
202         LPDIRECTINPUTDEVICE8A iface,
203         LPDWORD pdwOut) ;
204 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
205         LPDIRECTINPUTDEVICE8A iface,
206         DWORD dwFlags) ;
207 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
208         LPDIRECTINPUTDEVICE8A iface,
209         LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
210         LPVOID lpvRef,
211         DWORD dwFlags) ;
212 extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
213         LPDIRECTINPUTDEVICE8A iface,
214         LPDIEFFESCAPE lpDIEEsc) ;
215 extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
216         LPDIRECTINPUTDEVICE8A iface) ;
217 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
218         LPDIRECTINPUTDEVICE8A iface,
219         DWORD cbObjectData,
220         LPCDIDEVICEOBJECTDATA rgdod,
221         LPDWORD pdwInOut,
222         DWORD dwFlags) ;
223 extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
224                                                                  LPCSTR lpszFileName,
225                                                                  LPDIENUMEFFECTSINFILECALLBACK pec,
226                                                                  LPVOID pvRef,
227                                                                  DWORD dwFlags) ;
228 extern HRESULT WINAPI IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface,
229                                                                  LPCWSTR lpszFileName,
230                                                                  LPDIENUMEFFECTSINFILECALLBACK pec,
231                                                                  LPVOID pvRef,
232                                                                  DWORD dwFlags) ;
233 extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
234                                                                  LPCSTR lpszFileName,
235                                                                  DWORD dwEntries,
236                                                                  LPDIFILEEFFECT rgDiFileEft,
237                                                                  DWORD dwFlags) ;
238 extern HRESULT WINAPI IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface,
239                                                                  LPCWSTR lpszFileName,
240                                                                  DWORD dwEntries,
241                                                                  LPDIFILEEFFECT rgDiFileEft,
242                                                                  DWORD dwFlags) ;
243 extern HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
244                                                               LPDIACTIONFORMATA lpdiaf,
245                                                               LPCSTR lpszUserName,
246                                                               DWORD dwFlags);
247 extern HRESULT WINAPI IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
248                                                               LPDIACTIONFORMATW lpdiaf,
249                                                               LPCWSTR lpszUserName,
250                                                               DWORD dwFlags);
251 extern HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
252                                                             LPDIACTIONFORMATA lpdiaf,
253                                                             LPCSTR lpszUserName,
254                                                             DWORD dwFlags);
255 extern HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface,
256                                                             LPDIACTIONFORMATW lpdiaf,
257                                                             LPCWSTR lpszUserName,
258                                                             DWORD dwFlags);
259 extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
260                                                             LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader);
261 extern HRESULT WINAPI IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface,
262                                                             LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader);
263 
264 #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */
265 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.