joystick_private.h 2.79 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
/*
 * Copyright 2009, Aric Stewart, Codeweavers
 *
 * 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"

32 33 34 35
struct JoystickGenericImpl;

typedef void joy_polldev_handler(struct JoystickGenericImpl *This);

36 37 38 39 40 41
typedef struct JoystickGenericImpl
{
    struct IDirectInputDevice2AImpl base;

    ObjProps    *props;
    DIDEVCAPS   devcaps;
42
    DIJOYSTATE2 js;     /* wine data */
43 44
    GUID        guidProduct;
    char        *name;
45 46

    joy_polldev_handler *joy_polldev;
47 48
} JoystickGenericImpl;

49 50 51
LONG joystick_map_axis(ObjProps *props, int val);

DWORD joystick_map_pov(POINTL *p);
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69

HRESULT WINAPI JoystickWGenericImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
        LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow);

HRESULT WINAPI JoystickAGenericImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8A iface,
        LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow);

HRESULT WINAPI JoystickAGenericImpl_GetProperty( LPDIRECTINPUTDEVICE8A iface,
    REFGUID rguid, LPDIPROPHEADER pdiph);

HRESULT WINAPI JoystickAGenericImpl_GetCapabilities( LPDIRECTINPUTDEVICE8A iface,
    LPDIDEVCAPS lpDIDevCaps);

void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps);

HRESULT WINAPI JoystickAGenericImpl_SetProperty( LPDIRECTINPUTDEVICE8A iface,
    REFGUID rguid, LPCDIPROPHEADER ph);

70 71 72 73 74
HRESULT WINAPI JoystickAGenericImpl_GetDeviceInfo( LPDIRECTINPUTDEVICE8A iface,
    LPDIDEVICEINSTANCEA pdidi);

HRESULT WINAPI JoystickWGenericImpl_GetDeviceInfo( LPDIRECTINPUTDEVICE8W iface,
    LPDIDEVICEINSTANCEW pdidi);
75

76 77 78 79 80
HRESULT WINAPI JoystickAGenericImpl_Poll(LPDIRECTINPUTDEVICE8A iface);

HRESULT WINAPI JoystickAGenericImpl_GetDeviceState( LPDIRECTINPUTDEVICE8A iface,
    DWORD len, LPVOID ptr);

81 82 83 84
HRESULT WINAPI JoystickAGenericImpl_Acquire(LPDIRECTINPUTDEVICE8A iface);

HRESULT WINAPI JoystickAGenericImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);

85
#endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */