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

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

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  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, DWORD size, const void *in, const DataFormat *df) ;
 80 extern void release_DataFormat(DataFormat *df) ;
 81 extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq);
 82 /* Helper functions to work with data format */
 83 extern int id_to_object(LPCDIDATAFORMAT df, int id);
 84 extern int id_to_offset(const DataFormat *df, int id);
 85 extern int find_property(const DataFormat *df, LPCDIPROPHEADER ph);
 86 
 87 /* Common joystick stuff */
 88 typedef struct
 89 {
 90     LONG lDevMin;
 91     LONG lDevMax;
 92     LONG lMin;
 93     LONG lMax;
 94     LONG lDeadZone;
 95     LONG lSaturation;
 96 } ObjProps;
 97 
 98 extern DWORD joystick_map_pov(POINTL *p);
 99 extern LONG joystick_map_axis(ObjProps *props, int val);
100 
101 typedef struct
102 {
103     struct list entry;
104     LPDIRECTINPUTEFFECT ref;
105 } effect_list_item;
106 
107 /**
108  * Callback Data used by specific callback 
109  *  for EnumObject on 'W' interfaces
110  */
111 typedef struct {
112   LPDIENUMDEVICEOBJECTSCALLBACKW lpCallBack;
113   LPVOID lpvRef;
114 } device_enumobjects_AtoWcb_data;
115 
116 extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
117 
118 extern const GUID DInput_Wine_Keyboard_GUID;
119 extern const GUID DInput_Wine_Mouse_GUID;
120 
121 /* Various debug tools */
122 extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) ;
123 extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) ;
124 extern void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) ;
125 extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) ;
126 extern const char *_dump_dinput_GUID(const GUID *guid) ;
127 
128 /* And the stubs */
129 extern HRESULT WINAPI IDirectInputDevice2AImpl_Acquire(LPDIRECTINPUTDEVICE8A iface);
130 extern HRESULT WINAPI IDirectInputDevice2AImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);
131 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
132         LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df ) ;
133 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
134         LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags ) ;
135 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
136         LPDIRECTINPUTDEVICE8A iface,HANDLE hnd ) ;
137 extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface) ;
138 extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj);
139 extern HRESULT WINAPI IDirectInputDevice2WImpl_QueryInterface(LPDIRECTINPUTDEVICE8W iface,REFIID riid,LPVOID *ppobj);
140 extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
141         LPDIRECTINPUTDEVICE8A iface) ;
142 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
143         LPDIRECTINPUTDEVICE8A iface,
144         LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
145         LPVOID lpvRef,
146         DWORD dwFlags) ;
147 extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(
148         LPDIRECTINPUTDEVICE8W iface,
149         LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
150         LPVOID lpvRef,
151         DWORD dwFlags) ;
152 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPDIPROPHEADER pdiph);
153 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPCDIPROPHEADER pdiph);
154 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
155         LPDIRECTINPUTDEVICE8A iface,
156         LPDIDEVICEOBJECTINSTANCEA pdidoi,
157         DWORD dwObj,
158         DWORD dwHow) ;
159 extern HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, 
160                                                              LPDIDEVICEOBJECTINSTANCEW pdidoi,
161                                                              DWORD dwObj,
162                                                              DWORD dwHow);
163 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
164         DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags);
165 extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
166         LPDIRECTINPUTDEVICE8A iface,
167         HWND hwndOwner,
168         DWORD dwFlags) ;
169 extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
170         LPDIRECTINPUTDEVICE8A iface,
171         HINSTANCE hinst,
172         DWORD dwVersion,
173         REFGUID rguid) ;
174 extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
175         LPDIRECTINPUTDEVICE8A iface,
176         REFGUID rguid,
177         LPCDIEFFECT lpeff,
178         LPDIRECTINPUTEFFECT *ppdef,
179         LPUNKNOWN pUnkOuter) ;
180 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
181         LPDIRECTINPUTDEVICE8A iface,
182         LPDIENUMEFFECTSCALLBACKA lpCallback,
183         LPVOID lpvRef,
184         DWORD dwFlags) ;
185 extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects(
186         LPDIRECTINPUTDEVICE8W iface,
187         LPDIENUMEFFECTSCALLBACKW lpCallback,
188         LPVOID lpvRef,
189         DWORD dwFlags) ;
190 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
191         LPDIRECTINPUTDEVICE8A iface,
192         LPDIEFFECTINFOA lpdei,
193         REFGUID rguid) ;
194 extern HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo(
195         LPDIRECTINPUTDEVICE8W iface,
196         LPDIEFFECTINFOW lpdei,
197         REFGUID rguid) ;
198 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
199         LPDIRECTINPUTDEVICE8A iface,
200         LPDWORD pdwOut) ;
201 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
202         LPDIRECTINPUTDEVICE8A iface,
203         DWORD dwFlags) ;
204 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
205         LPDIRECTINPUTDEVICE8A iface,
206         LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
207         LPVOID lpvRef,
208         DWORD dwFlags) ;
209 extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
210         LPDIRECTINPUTDEVICE8A iface,
211         LPDIEFFESCAPE lpDIEEsc) ;
212 extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
213         LPDIRECTINPUTDEVICE8A iface) ;
214 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
215         LPDIRECTINPUTDEVICE8A iface,
216         DWORD cbObjectData,
217         LPCDIDEVICEOBJECTDATA rgdod,
218         LPDWORD pdwInOut,
219         DWORD dwFlags) ;
220 extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
221                                                                  LPCSTR lpszFileName,
222                                                                  LPDIENUMEFFECTSINFILECALLBACK pec,
223                                                                  LPVOID pvRef,
224                                                                  DWORD dwFlags) ;
225 extern HRESULT WINAPI IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface,
226                                                                  LPCWSTR lpszFileName,
227                                                                  LPDIENUMEFFECTSINFILECALLBACK pec,
228                                                                  LPVOID pvRef,
229                                                                  DWORD dwFlags) ;
230 extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
231                                                                  LPCSTR lpszFileName,
232                                                                  DWORD dwEntries,
233                                                                  LPDIFILEEFFECT rgDiFileEft,
234                                                                  DWORD dwFlags) ;
235 extern HRESULT WINAPI IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface,
236                                                                  LPCWSTR lpszFileName,
237                                                                  DWORD dwEntries,
238                                                                  LPDIFILEEFFECT rgDiFileEft,
239                                                                  DWORD dwFlags) ;
240 extern HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
241                                                               LPDIACTIONFORMATA lpdiaf,
242                                                               LPCSTR lpszUserName,
243                                                               DWORD dwFlags);
244 extern HRESULT WINAPI IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
245                                                               LPDIACTIONFORMATW lpdiaf,
246                                                               LPCWSTR lpszUserName,
247                                                               DWORD dwFlags);
248 extern HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
249                                                             LPDIACTIONFORMATA lpdiaf,
250                                                             LPCSTR lpszUserName,
251                                                             DWORD dwFlags);
252 extern HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface,
253                                                             LPDIACTIONFORMATW lpdiaf,
254                                                             LPCWSTR lpszUserName,
255                                                             DWORD dwFlags);
256 extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
257                                                             LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader);
258 extern HRESULT WINAPI IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface,
259                                                             LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader);
260 
261 #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */
262 

~ [ 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.