dbghelp: Remove superfluous casts to self.
[wine.git] / dlls / dinput / dinput_private.h
blobc11b64585d98b4ddb1b06661e689fc99872d1716
1 /*
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
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "dinput.h"
27 #include "dinputd.h"
28 #include "wine/list.h"
30 extern HINSTANCE DINPUT_instance;
32 /* Implementation specification */
33 typedef struct IDirectInputImpl IDirectInputImpl;
34 struct IDirectInputImpl
36 IDirectInput7A IDirectInput7A_iface;
37 IDirectInput7W IDirectInput7W_iface;
38 IDirectInput8A IDirectInput8A_iface;
39 IDirectInput8W IDirectInput8W_iface;
40 IDirectInputJoyConfig8 IDirectInputJoyConfig8_iface;
42 LONG ref;
44 BOOL initialized;
45 struct list entry; /* entry into list of all IDirectInputs */
47 DWORD evsequence; /* unique sequence number for events */
48 DWORD dwVersion; /* direct input version number */
49 struct list device_players; /* device instance guid to player name */
52 extern const IDirectInput7AVtbl dinput7_a_vtbl DECLSPEC_HIDDEN;
53 extern const IDirectInput8AVtbl dinput8_a_vtbl DECLSPEC_HIDDEN;
55 /* Function called by all devices that Wine supports */
56 struct dinput_device {
57 const char *name;
58 HRESULT (*enum_device)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id);
59 HRESULT (*create_device)(IDirectInputImpl *dinput, REFGUID rguid, IDirectInputDevice8W **out);
62 struct DevicePlayer {
63 GUID instance_guid;
64 WCHAR username[MAX_PATH];
65 struct list entry;
68 extern const struct dinput_device mouse_device DECLSPEC_HIDDEN;
69 extern const struct dinput_device keyboard_device DECLSPEC_HIDDEN;
70 extern const struct dinput_device joystick_hid_device DECLSPEC_HIDDEN;
71 extern const struct dinput_device joystick_linux_device DECLSPEC_HIDDEN;
72 extern const struct dinput_device joystick_linuxinput_device DECLSPEC_HIDDEN;
73 extern const struct dinput_device joystick_osx_device DECLSPEC_HIDDEN;
75 extern void dinput_hooks_acquire_device(LPDIRECTINPUTDEVICE8W iface);
76 extern void dinput_hooks_unacquire_device(LPDIRECTINPUTDEVICE8W iface);
77 extern int dinput_mouse_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam );
78 extern int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam );
79 extern void dinput_mouse_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam,
80 RAWINPUT *raw );
82 extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8W, BOOL) DECLSPEC_HIDDEN;
83 extern void check_dinput_events(void) DECLSPEC_HIDDEN;
85 extern HRESULT _configure_devices(IDirectInput8W *iface, LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) DECLSPEC_HIDDEN;
87 extern WCHAR* get_mapping_path(const WCHAR *device, const WCHAR *username) DECLSPEC_HIDDEN;
88 extern DWORD get_device_type(DWORD version, BOOL is_joystick) DECLSPEC_HIDDEN;
90 #define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0)
92 #define DIKEYBOARD_MASK 0x81000000
93 #define DIMOUSE_MASK 0x82000000
94 #define DIGENRE_ANY 0xFF000000
96 #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */