source: trunk/src/dinput/device_private.h@ 8663

Last change on this file since 8663 was 8346, checked in by sandervl, 23 years ago

Resync with last X11 licensed Wine

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