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
28 #include "wine/list.h"
30 extern HINSTANCE DINPUT_instance
;
34 IDirectInput7A IDirectInput7A_iface
;
35 IDirectInput7W IDirectInput7W_iface
;
36 IDirectInput8A IDirectInput8A_iface
;
37 IDirectInput8W IDirectInput8W_iface
;
38 IDirectInputJoyConfig8 IDirectInputJoyConfig8_iface
;
42 DWORD dwVersion
; /* direct input version number */
43 DWORD evsequence
; /* unique sequence number for events */
44 struct list device_players
; /* device instance guid to player name */
47 extern const IDirectInput7AVtbl dinput7_a_vtbl DECLSPEC_HIDDEN
;
48 extern const IDirectInput8AVtbl dinput8_a_vtbl DECLSPEC_HIDDEN
;
50 extern void dinput_internal_addref( struct dinput
*dinput
);
51 extern void dinput_internal_release( struct dinput
*dinput
);
53 extern HRESULT
mouse_enum_device( DWORD type
, DWORD flags
, DIDEVICEINSTANCEW
*instance
, DWORD version
);
54 extern HRESULT
mouse_create_device( struct dinput
*dinput
, const GUID
*guid
, IDirectInputDevice8W
**out
);
55 extern HRESULT
keyboard_enum_device( DWORD type
, DWORD flags
, DIDEVICEINSTANCEW
*instance
, DWORD version
);
56 extern HRESULT
keyboard_create_device( struct dinput
*dinput
, const GUID
*guid
, IDirectInputDevice8W
**out
);
57 extern HRESULT
hid_joystick_enum_device( DWORD type
, DWORD flags
, DIDEVICEINSTANCEW
*instance
, DWORD version
, int index
);
58 extern HRESULT
hid_joystick_create_device( struct dinput
*dinput
, const GUID
*guid
, IDirectInputDevice8W
**out
);
62 WCHAR username
[MAX_PATH
];
66 extern void input_thread_add_user(void);
67 extern void input_thread_remove_user(void);
69 extern void dinput_hooks_acquire_device( IDirectInputDevice8W
*iface
);
70 extern void dinput_hooks_unacquire_device( IDirectInputDevice8W
*iface
);
71 extern int dinput_mouse_hook( IDirectInputDevice8W
*iface
, WPARAM wparam
, LPARAM lparam
);
72 extern int dinput_keyboard_hook( IDirectInputDevice8W
*iface
, WPARAM wparam
, LPARAM lparam
);
73 extern void dinput_mouse_rawinput_hook( IDirectInputDevice8W
*iface
, WPARAM wparam
, LPARAM lparam
,
76 extern void check_dinput_events(void) DECLSPEC_HIDDEN
;
78 extern HRESULT
_configure_devices(IDirectInput8W
*iface
, LPDICONFIGUREDEVICESCALLBACK lpdiCallback
, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams
, DWORD dwFlags
, LPVOID pvRefData
) DECLSPEC_HIDDEN
;
80 extern WCHAR
* get_mapping_path(const WCHAR
*device
, const WCHAR
*username
) DECLSPEC_HIDDEN
;
81 extern DWORD
get_device_type(DWORD version
, BOOL is_joystick
) DECLSPEC_HIDDEN
;
83 #define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0)
85 #define DIKEYBOARD_MASK 0x81000000
86 #define DIMOUSE_MASK 0x82000000
87 #define DIGENRE_ANY 0xFF000000
89 #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */