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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
20 #define __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
27 #include "wine/list.h"
29 /* Implementation specification */
30 typedef struct IDirectInputImpl IDirectInputImpl;
31 struct IDirectInputImpl
33 const IDirectInput7AVtbl *lpVtbl;
34 const IDirectInput7WVtbl *lpVtbl7w;
35 const IDirectInput8AVtbl *lpVtbl8a;
36 const IDirectInput8WVtbl *lpVtbl8w;
40 CRITICAL_SECTION crit;
41 struct list entry; /* entry into list of all IDirectInputs */
43 DWORD evsequence; /* unique sequence number for events */
44 DWORD dwVersion; /* direct input version number */
45 struct list devices_list; /* list of all created dinput devices */
48 /* Function called by all devices that Wine supports */
49 struct dinput_device {
51 BOOL (*enum_deviceA)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id);
52 BOOL (*enum_deviceW)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id);
53 HRESULT (*create_deviceA)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev);
54 HRESULT (*create_deviceW)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev);
57 extern const struct dinput_device mouse_device;
58 extern const struct dinput_device keyboard_device;
59 extern const struct dinput_device joystick_linux_device;
60 extern const struct dinput_device joystick_linuxinput_device;
61 extern const struct dinput_device joystick_osx_device;
63 extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8A);
64 typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM);
66 extern void _dump_diactionformatA(LPDIACTIONFORMATA);
68 #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */