Moved a few remaining 16-bit window functions to wnd16.c and moved it
[wine.git] / dlls / dinput / device_private.h
blobff59a8daf05161b288c1e3c6cf2197f59b1bd81a
1 /*
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
23 #include "winbase.h"
24 #include "dinput.h"
26 /* Device implementation */
27 typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl;
28 struct IDirectInputDevice2AImpl
30 ICOM_VFIELD(IDirectInputDevice2A);
31 DWORD ref;
32 GUID guid;
35 /* Routines to do DataFormat / WineFormat conversions */
36 typedef struct {
37 int size;
38 int offset_in;
39 int offset_out;
40 int value;
41 } DataTransform;
43 typedef struct {
44 int size;
45 int internal_format_size;
46 DataTransform *dt;
47 } DataFormat;
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) \
53 { \
54 /* If queue_len > 0, queuing is requested -> TRACE the event queued */ \
55 if (This->queue_len > 0) { \
56 DWORD nq; \
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; \
69 } \
70 } \
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) ;
80 /* And the stubs */
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,
95 LPVOID lpvRef,
96 DWORD dwFlags) ;
97 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
98 LPDIRECTINPUTDEVICE8A iface,
99 REFGUID rguid,
100 LPDIPROPHEADER pdiph) ;
101 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
102 LPDIRECTINPUTDEVICE8A iface,
103 LPDIDEVICEOBJECTINSTANCEA pdidoi,
104 DWORD dwObj,
105 DWORD dwHow) ;
106 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
107 LPDIRECTINPUTDEVICE8A iface,
108 LPDIDEVICEINSTANCEA pdidi) ;
109 extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
110 LPDIRECTINPUTDEVICE8A iface,
111 HWND hwndOwner,
112 DWORD dwFlags) ;
113 extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
114 LPDIRECTINPUTDEVICE8A iface,
115 HINSTANCE hinst,
116 DWORD dwVersion,
117 REFGUID rguid) ;
118 extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
119 LPDIRECTINPUTDEVICE8A iface,
120 REFGUID rguid,
121 LPCDIEFFECT lpeff,
122 LPDIRECTINPUTEFFECT *ppdef,
123 LPUNKNOWN pUnkOuter) ;
124 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
125 LPDIRECTINPUTDEVICE8A iface,
126 LPDIENUMEFFECTSCALLBACKA lpCallback,
127 LPVOID lpvRef,
128 DWORD dwFlags) ;
129 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
130 LPDIRECTINPUTDEVICE8A iface,
131 LPDIEFFECTINFOA lpdei,
132 REFGUID rguid) ;
133 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
134 LPDIRECTINPUTDEVICE8A iface,
135 LPDWORD pdwOut) ;
136 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
137 LPDIRECTINPUTDEVICE8A iface,
138 DWORD dwFlags) ;
139 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
140 LPDIRECTINPUTDEVICE8A iface,
141 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
142 LPVOID lpvRef,
143 DWORD dwFlags) ;
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,
151 DWORD cbObjectData,
152 LPCDIDEVICEOBJECTDATA rgdod,
153 LPDWORD pdwInOut,
154 DWORD dwFlags) ;
155 extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
156 LPCSTR lpszFileName,
157 LPDIENUMEFFECTSINFILECALLBACK pec,
158 LPVOID pvRef,
159 DWORD dwFlags) ;
160 extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
161 LPCSTR lpszFileName,
162 DWORD dwEntries,
163 LPDIFILEEFFECT rgDiFileEft,
164 DWORD dwFlags) ;
165 extern HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
166 LPDIACTIONFORMATA lpdiaf,
167 LPCSTR lpszUserName,
168 DWORD dwFlags);
169 extern HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
170 LPDIACTIONFORMATA lpdiaf,
171 LPCSTR lpszUserName,
172 DWORD dwFlags);
173 extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
174 LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader);
176 #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */