2 * Copyright 2000 Lionel Ulmer
3 * Copyright 2000-2001 TransGaming Technologies Inc.
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
21 #define __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
26 /* Device implementation */
27 typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl
;
28 struct IDirectInputDevice2AImpl
30 ICOM_VFIELD(IDirectInputDevice2A
);
35 /* Routines to do DataFormat / WineFormat conversions */
45 int internal_format_size
;
48 extern void fill_DataFormat(void *out
, void *in
, DataFormat
*df
) ;
49 extern DataFormat
*create_DataFormat(DIDATAFORMAT
*wine_format
, LPCDIDATAFORMAT asked_format
, int *offset
) ;
51 /* Used to fill events in the queue */
52 #define GEN_EVENT(offset,data,xtime,seq) \
54 /* If queue_len > 0, queuing is requested -> TRACE the event queued */ \
55 if (This->queue_len > 0) { \
57 TRACE(" queueing %d at offset %d (queue head %d / size %d)\n", \
58 (int) (data), (int) (offset), \
59 (int) (This->queue_head), (int) (This->queue_len)); \
61 nq = This->queue_head+1; \
62 while (nq >= This->queue_len) nq -= This->queue_len; \
63 if ((offset >= 0) && (nq != This->queue_tail)) { \
64 This->data_queue[This->queue_head].dwOfs = offset; \
65 This->data_queue[This->queue_head].dwData = data; \
66 This->data_queue[This->queue_head].dwTimeStamp = xtime; \
67 This->data_queue[This->queue_head].dwSequence = seq; \
68 This->queue_head = nq; \
74 /* Various debug tools */
75 extern void _dump_cooperativelevel_DI(DWORD dwFlags
) ;
76 extern void _dump_EnumObjects_flags(DWORD dwFlags
) ;
77 extern void _dump_DIPROPHEADER(DIPROPHEADER
*diph
) ;
78 extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA
*ddoi
) ;
81 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SetDataFormat(
82 LPDIRECTINPUTDEVICE8A iface
,LPCDIDATAFORMAT df
) ;
83 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SetCooperativeLevel(
84 LPDIRECTINPUTDEVICE8A iface
,HWND hwnd
,DWORD dwflags
) ;
85 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SetEventNotification(
86 LPDIRECTINPUTDEVICE8A iface
,HANDLE hnd
) ;
87 extern ULONG WINAPI
IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface
) ;
88 extern HRESULT WINAPI
IDirectInputDevice2AImpl_QueryInterface(
89 LPDIRECTINPUTDEVICE8A iface
,REFIID riid
,LPVOID
*ppobj
) ;
90 extern ULONG WINAPI
IDirectInputDevice2AImpl_AddRef(
91 LPDIRECTINPUTDEVICE8A iface
) ;
92 extern HRESULT WINAPI
IDirectInputDevice2AImpl_EnumObjects(
93 LPDIRECTINPUTDEVICE8A iface
,
94 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback
,
97 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetProperty(
98 LPDIRECTINPUTDEVICE8A iface
,
100 LPDIPROPHEADER pdiph
) ;
101 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetObjectInfo(
102 LPDIRECTINPUTDEVICE8A iface
,
103 LPDIDEVICEOBJECTINSTANCEA pdidoi
,
106 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetDeviceInfo(
107 LPDIRECTINPUTDEVICE8A iface
,
108 LPDIDEVICEINSTANCEA pdidi
) ;
109 extern HRESULT WINAPI
IDirectInputDevice2AImpl_RunControlPanel(
110 LPDIRECTINPUTDEVICE8A iface
,
113 extern HRESULT WINAPI
IDirectInputDevice2AImpl_Initialize(
114 LPDIRECTINPUTDEVICE8A iface
,
118 extern HRESULT WINAPI
IDirectInputDevice2AImpl_CreateEffect(
119 LPDIRECTINPUTDEVICE8A iface
,
122 LPDIRECTINPUTEFFECT
*ppdef
,
123 LPUNKNOWN pUnkOuter
) ;
124 extern HRESULT WINAPI
IDirectInputDevice2AImpl_EnumEffects(
125 LPDIRECTINPUTDEVICE8A iface
,
126 LPDIENUMEFFECTSCALLBACKA lpCallback
,
129 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetEffectInfo(
130 LPDIRECTINPUTDEVICE8A iface
,
131 LPDIEFFECTINFOA lpdei
,
133 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetForceFeedbackState(
134 LPDIRECTINPUTDEVICE8A iface
,
136 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SendForceFeedbackCommand(
137 LPDIRECTINPUTDEVICE8A iface
,
139 extern HRESULT WINAPI
IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
140 LPDIRECTINPUTDEVICE8A iface
,
141 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback
,
144 extern HRESULT WINAPI
IDirectInputDevice2AImpl_Escape(
145 LPDIRECTINPUTDEVICE8A iface
,
146 LPDIEFFESCAPE lpDIEEsc
) ;
147 extern HRESULT WINAPI
IDirectInputDevice2AImpl_Poll(
148 LPDIRECTINPUTDEVICE8A iface
) ;
149 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SendDeviceData(
150 LPDIRECTINPUTDEVICE8A iface
,
152 LPCDIDEVICEOBJECTDATA rgdod
,
155 extern HRESULT WINAPI
IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface
,
157 LPDIENUMEFFECTSINFILECALLBACK pec
,
160 extern HRESULT WINAPI
IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface
,
163 LPDIFILEEFFECT rgDiFileEft
,
165 extern HRESULT WINAPI
IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface
,
166 LPDIACTIONFORMATA lpdiaf
,
169 extern HRESULT WINAPI
IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface
,
170 LPDIACTIONFORMATA lpdiaf
,
173 extern HRESULT WINAPI
IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface
,
174 LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader
);
176 #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */