Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2000 Lionel Ulmer |
| 3 | * |
| 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. |
| 8 | * |
| 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. |
| 13 | * |
| 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 |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 17 | */ |
| 18 | |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 19 | #ifndef __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H |
| 20 | #define __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H |
| 21 | |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 22 | #include <stdarg.h> |
| 23 | |
| 24 | #include "windef.h" |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 25 | #include "winbase.h" |
| 26 | #include "dinput.h" |
Vitaliy Margolen | 448dde9 | 2007-07-06 23:36:09 -0600 | [diff] [blame] | 27 | #include "wine/list.h" |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 28 | |
| 29 | /* Implementation specification */ |
Raphael Junqueira | c405019 | 2003-06-16 20:22:13 +0000 | [diff] [blame] | 30 | typedef struct IDirectInputImpl IDirectInputImpl; |
| 31 | struct IDirectInputImpl |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 32 | { |
Vitaliy Margolen | efdee19 | 2007-07-11 22:51:32 -0600 | [diff] [blame] | 33 | const IDirectInput7AVtbl *lpVtbl; |
| 34 | const IDirectInput7WVtbl *lpVtbl7w; |
| 35 | const IDirectInput8AVtbl *lpVtbl8a; |
| 36 | const IDirectInput8WVtbl *lpVtbl8w; |
| 37 | |
Vitaliy Margolen | 448dde9 | 2007-07-06 23:36:09 -0600 | [diff] [blame] | 38 | LONG ref; |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 39 | |
Vitaliy Margolen | 448dde9 | 2007-07-06 23:36:09 -0600 | [diff] [blame] | 40 | CRITICAL_SECTION crit; |
Vitaliy Margolen | fe1f136 | 2007-07-06 23:36:18 -0600 | [diff] [blame] | 41 | struct list entry; /* entry into list of all IDirectInputs */ |
Christian Costa | 77c00c9 | 2003-06-13 18:55:41 +0000 | [diff] [blame] | 42 | |
Vitaliy Margolen | 448dde9 | 2007-07-06 23:36:09 -0600 | [diff] [blame] | 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 */ |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | /* Function called by all devices that Wine supports */ |
Alexandre Julliard | 6451e22 | 2005-03-15 19:36:15 +0000 | [diff] [blame] | 49 | struct dinput_device { |
Lionel Ulmer | 4f64069 | 2004-06-04 18:06:37 +0000 | [diff] [blame] | 50 | const char *name; |
Robert Reif | 6dd763e | 2005-05-16 08:44:14 +0000 | [diff] [blame] | 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); |
Lionel Ulmer | 4f64069 | 2004-06-04 18:06:37 +0000 | [diff] [blame] | 53 | HRESULT (*create_deviceA)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev); |
| 54 | HRESULT (*create_deviceW)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev); |
Alexandre Julliard | 6451e22 | 2005-03-15 19:36:15 +0000 | [diff] [blame] | 55 | }; |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 56 | |
Alexandre Julliard | 6451e22 | 2005-03-15 19:36:15 +0000 | [diff] [blame] | 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; |
Aric Stewart | 225a494 | 2009-03-10 14:59:20 -0500 | [diff] [blame] | 61 | extern const struct dinput_device joystick_osx_device; |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 62 | |
Vitaliy Margolen | 8f28d43 | 2007-07-06 23:36:39 -0600 | [diff] [blame] | 63 | extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8A); |
Vitaliy Margolen | 74f2ecc | 2009-02-21 12:54:37 -0700 | [diff] [blame] | 64 | typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM); |
Vitaliy Margolen | 722a686 | 2006-09-10 16:47:39 -0600 | [diff] [blame] | 65 | |
Marcus Meissner | 9ce27fc | 2008-02-15 14:50:15 +0100 | [diff] [blame] | 66 | extern void _dump_diactionformatA(LPDIACTIONFORMATA); |
| 67 | |
Michael Stefaniuc | 2004db1 | 2010-02-02 00:11:49 +0100 | [diff] [blame] | 68 | #define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0) |
| 69 | |
Lionel Ulmer | 6301e94 | 2000-11-05 20:25:02 +0000 | [diff] [blame] | 70 | #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */ |