2 * Copyright 2000 Lionel Ulmer
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
20 #define __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
25 /* Device implementation */
26 typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl
;
27 struct IDirectInputDevice2AImpl
29 ICOM_VFIELD(IDirectInputDevice2A
);
34 /* Routines to do DataFormat / WineFormat conversions */
44 int internal_format_size
;
47 extern void fill_DataFormat(void *out
, void *in
, DataFormat
*df
) ;
48 extern DataFormat
*create_DataFormat(DIDATAFORMAT
*wine_format
, LPCDIDATAFORMAT asked_format
, int *offset
) ;
50 /* Used to fill events in the queue */
51 #define GEN_EVENT(offset,data,xtime,seq) \
53 /* If queue_len > 0, queuing is requested -> TRACE the event queued */ \
54 if (This->queue_len > 0) { \
56 TRACE(" queueing %d at offset %d (queue head %d / size %d)\n", \
57 (int) (data), (int) (offset), \
58 (int) (This->queue_head), (int) (This->queue_len)); \
60 nq = This->queue_head+1; \
61 while (nq >= This->queue_len) nq -= This->queue_len; \
62 if ((offset >= 0) && (nq != This->queue_tail)) { \
63 This->data_queue[This->queue_head].dwOfs = offset; \
64 This->data_queue[This->queue_head].dwData = data; \
65 This->data_queue[This->queue_head].dwTimeStamp = xtime; \
66 This->data_queue[This->queue_head].dwSequence = seq; \
67 This->queue_head = nq; \
73 /* Various debug tools */
74 extern void _dump_cooperativelevel_DI(DWORD dwFlags
) ;
75 extern void _dump_EnumObjects_flags(DWORD dwFlags
) ;
76 extern void _dump_DIPROPHEADER(DIPROPHEADER
*diph
) ;
77 extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA
*ddoi
) ;
80 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SetDataFormat(
81 LPDIRECTINPUTDEVICE2A iface
,LPCDIDATAFORMAT df
) ;
82 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SetCooperativeLevel(
83 LPDIRECTINPUTDEVICE2A iface
,HWND hwnd
,DWORD dwflags
) ;
84 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SetEventNotification(
85 LPDIRECTINPUTDEVICE2A iface
,HANDLE hnd
) ;
86 extern ULONG WINAPI
IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface
) ;
87 extern HRESULT WINAPI
IDirectInputDevice2AImpl_QueryInterface(
88 LPDIRECTINPUTDEVICE2A iface
,REFIID riid
,LPVOID
*ppobj
) ;
89 extern ULONG WINAPI
IDirectInputDevice2AImpl_AddRef(
90 LPDIRECTINPUTDEVICE2A iface
) ;
91 extern HRESULT WINAPI
IDirectInputDevice2AImpl_EnumObjects(
92 LPDIRECTINPUTDEVICE2A iface
,
93 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback
,
96 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetProperty(
97 LPDIRECTINPUTDEVICE2A iface
,
99 LPDIPROPHEADER pdiph
) ;
100 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetObjectInfo(
101 LPDIRECTINPUTDEVICE2A iface
,
102 LPDIDEVICEOBJECTINSTANCEA pdidoi
,
105 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetDeviceInfo(
106 LPDIRECTINPUTDEVICE2A iface
,
107 LPDIDEVICEINSTANCEA pdidi
) ;
108 extern HRESULT WINAPI
IDirectInputDevice2AImpl_RunControlPanel(
109 LPDIRECTINPUTDEVICE2A iface
,
112 extern HRESULT WINAPI
IDirectInputDevice2AImpl_Initialize(
113 LPDIRECTINPUTDEVICE2A iface
,
117 extern HRESULT WINAPI
IDirectInputDevice2AImpl_CreateEffect(
118 LPDIRECTINPUTDEVICE2A iface
,
121 LPDIRECTINPUTEFFECT
*ppdef
,
122 LPUNKNOWN pUnkOuter
) ;
123 extern HRESULT WINAPI
IDirectInputDevice2AImpl_EnumEffects(
124 LPDIRECTINPUTDEVICE2A iface
,
125 LPDIENUMEFFECTSCALLBACKA lpCallback
,
128 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetEffectInfo(
129 LPDIRECTINPUTDEVICE2A iface
,
130 LPDIEFFECTINFOA lpdei
,
132 extern HRESULT WINAPI
IDirectInputDevice2AImpl_GetForceFeedbackState(
133 LPDIRECTINPUTDEVICE2A iface
,
135 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SendForceFeedbackCommand(
136 LPDIRECTINPUTDEVICE2A iface
,
138 extern HRESULT WINAPI
IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
139 LPDIRECTINPUTDEVICE2A iface
,
140 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback
,
143 extern HRESULT WINAPI
IDirectInputDevice2AImpl_Escape(
144 LPDIRECTINPUTDEVICE2A iface
,
145 LPDIEFFESCAPE lpDIEEsc
) ;
146 extern HRESULT WINAPI
IDirectInputDevice2AImpl_Poll(
147 LPDIRECTINPUTDEVICE2A iface
) ;
148 extern HRESULT WINAPI
IDirectInputDevice2AImpl_SendDeviceData(
149 LPDIRECTINPUTDEVICE2A iface
,
151 LPDIDEVICEOBJECTDATA rgdod
,
154 extern HRESULT WINAPI
IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface
,
156 LPDIENUMEFFECTSINFILECALLBACK pec
,
159 extern HRESULT WINAPI
IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface
,
162 LPDIFILEEFFECT rgDiFileEft
,
165 #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */