Added nls to EXTRASUBDIRS.
[wine/wine64.git] / dlls / dinput / device_private.h
blob8cb8924d7576256e248c55ae5f123b33de00dc04
1 #ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
2 #define __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
4 #include "winbase.h"
5 #include "dinput.h"
7 /* Device implementation */
8 typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl;
9 struct IDirectInputDevice2AImpl
11 ICOM_VFIELD(IDirectInputDevice2A);
12 DWORD ref;
13 GUID guid;
16 /* Routines to do DataFormat / WineFormat conversions */
17 typedef struct {
18 int size;
19 int offset_in;
20 int offset_out;
21 int value;
22 } DataTransform;
24 typedef struct {
25 int size;
26 int internal_format_size;
27 DataTransform *dt;
28 } DataFormat;
29 extern void fill_DataFormat(void *out, void *in, DataFormat *df) ;
30 extern DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_format, int *offset) ;
32 /* Used to fill events in the queue */
33 #define GEN_EVENT(offset,data,xtime,seq) \
34 { \
35 /* If queue_len > 0, queuing is requested -> TRACE the event queued */ \
36 if (This->queue_len > 0) { \
37 TRACE(" queueing %d at offset %d (queue pos %d / size %d)\n", \
38 (int) (data), (int) (offset), \
39 (int) (This->queue_pos), (int) (This->queue_len)); \
41 if ((offset >= 0) && (This->queue_pos < This->queue_len)) { \
42 This->data_queue[This->queue_pos].dwOfs = offset; \
43 This->data_queue[This->queue_pos].dwData = data; \
44 This->data_queue[This->queue_pos].dwTimeStamp = xtime; \
45 This->data_queue[This->queue_pos].dwSequence = seq; \
46 This->queue_pos++; \
47 } \
48 } \
52 /* Various debug tools */
53 extern void _dump_cooperativelevel_DI(DWORD dwFlags) ;
54 extern void _dump_EnumObjects_flags(DWORD dwFlags) ;
55 extern void _dump_DIPROPHEADER(DIPROPHEADER *diph) ;
56 extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
58 /* And the stubs */
59 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
60 LPDIRECTINPUTDEVICE2A iface,LPCDIDATAFORMAT df ) ;
61 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
62 LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags ) ;
63 extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
64 LPDIRECTINPUTDEVICE2A iface,HANDLE hnd ) ;
65 extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface) ;
66 extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
67 LPDIRECTINPUTDEVICE2A iface,REFIID riid,LPVOID *ppobj ) ;
68 extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
69 LPDIRECTINPUTDEVICE2A iface) ;
70 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
71 LPDIRECTINPUTDEVICE2A iface,
72 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
73 LPVOID lpvRef,
74 DWORD dwFlags) ;
75 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
76 LPDIRECTINPUTDEVICE2A iface,
77 REFGUID rguid,
78 LPDIPROPHEADER pdiph) ;
79 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
80 LPDIRECTINPUTDEVICE2A iface,
81 LPDIDEVICEOBJECTINSTANCEA pdidoi,
82 DWORD dwObj,
83 DWORD dwHow) ;
84 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
85 LPDIRECTINPUTDEVICE2A iface,
86 LPDIDEVICEINSTANCEA pdidi) ;
87 extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
88 LPDIRECTINPUTDEVICE2A iface,
89 HWND hwndOwner,
90 DWORD dwFlags) ;
91 extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
92 LPDIRECTINPUTDEVICE2A iface,
93 HINSTANCE hinst,
94 DWORD dwVersion,
95 REFGUID rguid) ;
96 extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
97 LPDIRECTINPUTDEVICE2A iface,
98 REFGUID rguid,
99 LPCDIEFFECT lpeff,
100 LPDIRECTINPUTEFFECT *ppdef,
101 LPUNKNOWN pUnkOuter) ;
102 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
103 LPDIRECTINPUTDEVICE2A iface,
104 LPDIENUMEFFECTSCALLBACKA lpCallback,
105 LPVOID lpvRef,
106 DWORD dwFlags) ;
107 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
108 LPDIRECTINPUTDEVICE2A iface,
109 LPDIEFFECTINFOA lpdei,
110 REFGUID rguid) ;
111 extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
112 LPDIRECTINPUTDEVICE2A iface,
113 LPDWORD pdwOut) ;
114 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
115 LPDIRECTINPUTDEVICE2A iface,
116 DWORD dwFlags) ;
117 extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
118 LPDIRECTINPUTDEVICE2A iface,
119 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
120 LPVOID lpvRef,
121 DWORD dwFlags) ;
122 extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
123 LPDIRECTINPUTDEVICE2A iface,
124 LPDIEFFESCAPE lpDIEEsc) ;
125 extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
126 LPDIRECTINPUTDEVICE2A iface) ;
127 extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
128 LPDIRECTINPUTDEVICE2A iface,
129 DWORD cbObjectData,
130 LPDIDEVICEOBJECTDATA rgdod,
131 LPDWORD pdwInOut,
132 DWORD dwFlags) ;
133 extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface,
134 LPCSTR lpszFileName,
135 LPDIENUMEFFECTSINFILECALLBACK pec,
136 LPVOID pvRef,
137 DWORD dwFlags) ;
138 extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface,
139 LPCSTR lpszFileName,
140 DWORD dwEntries,
141 LPDIFILEEFFECT rgDiFileEft,
142 DWORD dwFlags) ;
144 #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */