2009-03-09 16:06:41 +01:00
|
|
|
/*
|
2009-04-20 14:47:23 +02:00
|
|
|
* Copyright 2009, Aric Stewart, CodeWeavers
|
2009-03-09 16:06:41 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H
|
|
|
|
#define __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "dinput.h"
|
|
|
|
#include "wine/list.h"
|
|
|
|
#include "wine/unicode.h"
|
|
|
|
#include "dinput_private.h"
|
|
|
|
#include "device_private.h"
|
|
|
|
|
2009-04-20 04:33:27 +02:00
|
|
|
/* Number of objects in the default data format */
|
|
|
|
#define MAX_PROPS 164
|
2009-03-09 16:06:57 +01:00
|
|
|
struct JoystickGenericImpl;
|
|
|
|
|
2021-05-25 18:48:53 +02:00
|
|
|
typedef void joy_polldev_handler( IDirectInputDevice8W *iface );
|
2009-03-09 16:06:57 +01:00
|
|
|
|
2009-03-09 16:06:41 +01:00
|
|
|
typedef struct JoystickGenericImpl
|
|
|
|
{
|
2011-01-03 15:25:07 +01:00
|
|
|
struct IDirectInputDeviceImpl base;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2009-04-20 04:33:27 +02:00
|
|
|
ObjProps props[MAX_PROPS];
|
2009-03-09 16:06:41 +01:00
|
|
|
DIDEVCAPS devcaps;
|
2009-03-09 16:06:57 +01:00
|
|
|
DIJOYSTATE2 js; /* wine data */
|
2009-03-09 16:06:50 +01:00
|
|
|
GUID guidProduct;
|
2009-04-20 04:33:22 +02:00
|
|
|
GUID guidInstance;
|
2009-03-09 16:06:50 +01:00
|
|
|
char *name;
|
2009-08-15 19:58:34 +02:00
|
|
|
int device_axis_count; /* Total number of axes in the device */
|
2009-08-15 20:52:48 +02:00
|
|
|
int *axis_map; /* User axes remapping */
|
|
|
|
LONG deadzone; /* Default dead-zone */
|
|
|
|
|
2009-03-09 16:06:57 +01:00
|
|
|
joy_polldev_handler *joy_polldev;
|
2009-03-09 16:06:41 +01:00
|
|
|
} JoystickGenericImpl;
|
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
LONG joystick_map_axis(ObjProps *props, int val) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_map) DECLSPEC_HIDDEN;
|
2009-03-09 16:07:07 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
DWORD joystick_map_pov(const POINTL *p) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2012-08-24 09:55:07 +02:00
|
|
|
BOOL device_disabled_registry(const char* name) DECLSPEC_HIDDEN;
|
|
|
|
|
2021-05-31 10:23:58 +02:00
|
|
|
ULONG WINAPI JoystickWGenericImpl_Release(LPDIRECTINPUTDEVICE8W iface);
|
|
|
|
|
2009-03-09 16:06:41 +01:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
|
2011-05-17 23:16:42 +02:00
|
|
|
LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPDIPROPHEADER pdiph) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface, LPDIDEVCAPS lpDIDevCaps) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPCDIPROPHEADER ph) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2009-03-09 16:06:50 +01:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_GetDeviceInfo( LPDIRECTINPUTDEVICE8W iface,
|
2011-05-17 23:16:42 +02:00
|
|
|
LPDIDEVICEINSTANCEW pdidi) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:41 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_Poll(LPDIRECTINPUTDEVICE8W iface) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:57 +01:00
|
|
|
|
2011-05-17 23:16:42 +02:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface, DWORD len, LPVOID ptr) DECLSPEC_HIDDEN;
|
2009-03-09 16:06:57 +01:00
|
|
|
|
2011-07-12 03:36:56 +02:00
|
|
|
HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
HRESULT WINAPI JoystickWGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN;
|
|
|
|
|
2013-05-23 21:58:12 +02:00
|
|
|
DWORD typeFromGUID(REFGUID guid) DECLSPEC_HIDDEN;
|
|
|
|
void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) DECLSPEC_HIDDEN;
|
2019-06-04 23:53:44 +02:00
|
|
|
BOOL is_xinput_device(const DIDEVCAPS *devcaps, WORD vid, WORD pid) DECLSPEC_HIDDEN;
|
2013-05-23 21:58:12 +02:00
|
|
|
|
2009-03-09 16:06:41 +01:00
|
|
|
#endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */
|