Commit 6301e94e authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

- reorganized DInput DLL

- added stubbing for DInput 7a - 'fixed' the mouse problem in Fallout
parent 96569102
......@@ -7003,6 +7003,9 @@ dlls/ddraw/ddraw \
dlls/ddraw/direct3d \
dlls/ddraw/dpalette \
dlls/ddraw/dsurface \
dlls/dinput/joystick \
dlls/dinput/keyboard \
dlls/dinput/mouse \
dlls/kernel/messages \
dlls/user/resources \
"
......
......@@ -1026,6 +1026,9 @@ dlls/ddraw/ddraw \
dlls/ddraw/direct3d \
dlls/ddraw/dpalette \
dlls/ddraw/dsurface \
dlls/dinput/joystick \
dlls/dinput/keyboard \
dlls/dinput/mouse \
dlls/kernel/messages \
dlls/user/resources \
"
......
......@@ -7,7 +7,16 @@ SOVERSION = 1.0
IMPORTS = user32 kernel32 ntdll
C_SRCS = \
dinput_main.c
device.c \
dinput_main.c \
joystick/linux.c \
keyboard/main.c \
mouse/main.c
EXTRASUBDIRS = \
joystick \
keyboard \
mouse
@MAKE_DLL_RULES@
......
#ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
#define __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
#include "winbase.h"
#include "dinput.h"
/* Device implementation */
typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl;
struct IDirectInputDevice2AImpl
{
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref;
GUID guid;
};
/* Routines to do DataFormat / WineFormat conversions */
typedef struct {
int size;
int offset_in;
int offset_out;
int value;
} DataTransform;
typedef struct {
int size;
int internal_format_size;
DataTransform *dt;
} DataFormat;
extern void fill_DataFormat(void *out, void *in, DataFormat *df) ;
extern DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_format, int *offset) ;
/* Used to fill events in the queue */
#define GEN_EVENT(offset,data,xtime,seq) \
{ \
/* If queue_len > 0, queuing is requested -> TRACE the event queued */ \
if (This->queue_len > 0) { \
TRACE(" queueing %d at offset %d (queue pos %d / size %d)\n", \
(int) (data), (int) (offset), \
(int) (This->queue_pos), (int) (This->queue_len)); \
\
if ((offset >= 0) && (This->queue_pos < This->queue_len)) { \
This->data_queue[This->queue_pos].dwOfs = offset; \
This->data_queue[This->queue_pos].dwData = data; \
This->data_queue[This->queue_pos].dwTimeStamp = xtime; \
This->data_queue[This->queue_pos].dwSequence = seq; \
This->queue_pos++; \
} \
} \
}
/* Various debug tools */
extern void _dump_cooperativelevel_DI(DWORD dwFlags) ;
extern void _dump_EnumObjects_flags(DWORD dwFlags) ;
extern void _dump_DIPROPHEADER(DIPROPHEADER *diph) ;
extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
/* And the stubs */
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
LPDIRECTINPUTDEVICE2A iface,LPCDIDATAFORMAT df ) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags ) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
LPDIRECTINPUTDEVICE2A iface,HANDLE hnd ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
LPDIRECTINPUTDEVICE2A iface,REFIID riid,LPVOID *ppobj ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE2A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
LPDIRECTINPUTDEVICE2A iface,
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE2A iface,
REFGUID rguid,
LPDIPROPHEADER pdiph) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIDEVICEOBJECTINSTANCEA pdidoi,
DWORD dwObj,
DWORD dwHow) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIDEVICEINSTANCEA pdidi) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE2A iface,
HWND hwndOwner,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
LPDIRECTINPUTDEVICE2A iface,
HINSTANCE hinst,
DWORD dwVersion,
REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
LPDIRECTINPUTDEVICE2A iface,
REFGUID rguid,
LPCDIEFFECT lpeff,
LPDIRECTINPUTEFFECT *ppdef,
LPUNKNOWN pUnkOuter) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
LPDIRECTINPUTDEVICE2A iface,
LPDIENUMEFFECTSCALLBACKA lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIEFFECTINFOA lpdei,
REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE2A iface,
LPDWORD pdwOut) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
LPDIRECTINPUTDEVICE2A iface,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
LPDIRECTINPUTDEVICE2A iface,
LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
LPDIRECTINPUTDEVICE2A iface,
LPDIEFFESCAPE lpDIEEsc) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
LPDIRECTINPUTDEVICE2A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
LPDIRECTINPUTDEVICE2A iface,
DWORD cbObjectData,
LPDIDEVICEOBJECTDATA rgdod,
LPDWORD pdwInOut,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface,
LPCSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface,
LPCSTR lpszFileName,
DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft,
DWORD dwFlags) ;
#endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */
#ifndef __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
#define __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
#include "winbase.h"
#include "dinput.h"
/* Implementation specification */
typedef struct IDirectInputAImpl IDirectInputAImpl;
struct IDirectInputAImpl
{
ICOM_VFIELD(IDirectInputA);
DWORD ref;
/* Used to have an unique sequence number for all the events */
DWORD evsequence;
};
/* Function called by all devices that Wine supports */
typedef struct dinput_device {
BOOL (*enum_device)(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi);
HRESULT (*create_device)(IDirectInputAImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev);
} dinput_device;
extern void dinput_register_device(dinput_device *device) ;
#endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
/* DirectInput Keyboard device
*
* Copyright 1998 Marcus Meissner
* Copyright 1998,1999 Lionel Ulmer
*
*/
#include "config.h"
#include <string.h>
#ifdef HAVE_SYS_ERRNO_H
# include <sys/errno.h>
#endif
#include "debugtools.h"
#include "user.h"
#include "winerror.h"
#include "windef.h"
#include "dinput.h"
#include "dinput_private.h"
#include "device_private.h"
DEFAULT_DEBUG_CHANNEL(dinput);
extern BYTE InputKeyStateTable[256];
extern int min_keycode, max_keycode;
extern WORD keyc2vkey[256];
static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt;
static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt;
typedef struct SysKeyboardAImpl SysKeyboardAImpl;
struct SysKeyboardAImpl
{
/* IDirectInputDevice2AImpl */
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref;
GUID guid;
IDirectInputAImpl *dinput;
/* SysKeyboardAImpl */
BYTE keystate[256];
KEYBOARD_CONFIG initial_config;
int acquired;
};
static GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */
0x0ab8648a,
0x7735,
0x11d2,
{0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41}
};
static BOOL keyboarddev_enum_device(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi)
{
if ((dwDevType == 0) || (dwDevType == DIDEVTYPE_KEYBOARD)) {
TRACE("Enumerating the Keyboard device\n");
lpddi->guidInstance = GUID_SysKeyboard;/* DInput's GUID */
lpddi->guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */
lpddi->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
strcpy(lpddi->tszInstanceName, "Keyboard");
strcpy(lpddi->tszProductName, "Wine Keyboard");
return TRUE;
}
return FALSE;
}
static SysKeyboardAImpl *alloc_device(REFGUID rguid, ICOM_VTABLE(IDirectInputDevice2A) *kvt, IDirectInputAImpl *dinput)
{
SysKeyboardAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl));
newDevice->ref = 1;
ICOM_VTBL(newDevice) = kvt;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
memset(newDevice->keystate,0,256);
newDevice->dinput = dinput;
return newDevice;
}
static HRESULT keyboarddev_create_device(IDirectInputAImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev)
{
if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */
(IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */
if ((riid == NULL) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid)) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid))) {
*pdev=(IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput);
TRACE("Creating a Keyboard device (%p)\n", *pdev);
return DI_OK;
} else if (IsEqualGUID(&IID_IDirectInputDevice7A,riid)) {
*pdev=(IDirectInputDeviceA*) alloc_device(rguid, (ICOM_VTABLE(IDirectInputDevice2A) *) &SysKeyboard7Avt, dinput);
TRACE("Creating a Keyboard DInput7A device (%p)\n", *pdev);
return DI_OK;
} else
return DIERR_NOINTERFACE;
}
return DIERR_DEVICENOTREG;
}
static dinput_device keyboarddev = {
keyboarddev_enum_device,
keyboarddev_create_device
};
DECL_GLOBAL_CONSTRUCTOR(keyboarddev_register) { dinput_register_device(&keyboarddev); }
static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
LPDIRECTINPUTDEVICE2A iface,REFGUID rguid,LPCDIPROPHEADER ph
)
{
ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
TRACE("(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
ph->dwSize,ph->dwHeaderSize,ph->dwObj,ph->dwHow);
if (!HIWORD(rguid)) {
switch ((DWORD)rguid) {
case (DWORD) DIPROP_BUFFERSIZE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
TRACE("(buffersize=%ld)\n",pd->dwData);
break;
}
default:
WARN("Unknown type %ld\n",(DWORD)rguid);
break;
}
}
return 0;
}
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr
)
{
return USER_Driver.pGetDIState(len, ptr)?DI_OK:E_FAIL;
}
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
LPDIRECTINPUTDEVICE2A iface,DWORD dodsize,LPDIDEVICEOBJECTDATA dod,
LPDWORD entries,DWORD flags
)
{
ICOM_THIS(SysKeyboardAImpl,iface);
HRESULT ret;
int i;
TRACE("(this=%p,%ld,%p,%p(%ld)),0x%08lx)\n",
This,dodsize,dod,entries,entries?*entries:0,flags);
ret=USER_Driver.pGetDIData(
This->keystate, dodsize, dod, entries, flags)?DI_OK:E_FAIL;
for (i=0;i<*entries;i++) {
dod[i].dwTimeStamp = GetTickCount();
dod[i].dwSequence = (This->dinput->evsequence)++;
}
return ret;
}
static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
{
ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p)\n",This);
if (This->acquired == 0) {
KEYBOARD_CONFIG no_auto;
/* Save the original config */
USER_Driver.pGetKeyboardConfig(&(This->initial_config));
/* Now, remove auto-repeat */
no_auto.auto_repeat = FALSE;
USER_Driver.pSetKeyboardConfig(&no_auto, WINE_KEYBOARD_CONFIG_AUTO_REPEAT);
This->acquired = 1;
}
return DI_OK;
}
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
{
ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p)\n",This);
if (This->acquired == 1) {
/* Restore the original configuration */
USER_Driver.pSetKeyboardConfig(&(This->initial_config), 0xFFFFFFFF);
This->acquired = 0;
} else {
ERR("Unacquiring a not-acquired device !!!\n");
}
return DI_OK;
}
/******************************************************************************
* GetCapabilities : get the device capablitites
*/
static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
LPDIRECTINPUTDEVICE2A iface,
LPDIDEVCAPS lpDIDevCaps)
{
ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p,%p)\n",This,lpDIDevCaps);
if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) {
lpDIDevCaps->dwFlags = DIDC_ATTACHED;
lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD;
lpDIDevCaps->dwAxes = 0;
lpDIDevCaps->dwButtons = 0;
lpDIDevCaps->dwPOVs = 0;
lpDIDevCaps->dwFFSamplePeriod = 0;
lpDIDevCaps->dwFFMinTimeResolution = 0;
lpDIDevCaps->dwFirmwareRevision = 100;
lpDIDevCaps->dwHardwareRevision = 100;
lpDIDevCaps->dwFFDriverVersion = 0;
} else {
/* DirectX 3.0 */
FIXME("DirectX 3.0 not supported....\n");
}
return DI_OK;
}
static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectInputDevice2AImpl_QueryInterface,
IDirectInputDevice2AImpl_AddRef,
IDirectInputDevice2AImpl_Release,
SysKeyboardAImpl_GetCapabilities,
IDirectInputDevice2AImpl_EnumObjects,
IDirectInputDevice2AImpl_GetProperty,
SysKeyboardAImpl_SetProperty,
SysKeyboardAImpl_Acquire,
SysKeyboardAImpl_Unacquire,
SysKeyboardAImpl_GetDeviceState,
SysKeyboardAImpl_GetDeviceData,
IDirectInputDevice2AImpl_SetDataFormat,
IDirectInputDevice2AImpl_SetEventNotification,
IDirectInputDevice2AImpl_SetCooperativeLevel,
IDirectInputDevice2AImpl_GetObjectInfo,
IDirectInputDevice2AImpl_GetDeviceInfo,
IDirectInputDevice2AImpl_RunControlPanel,
IDirectInputDevice2AImpl_Initialize,
IDirectInputDevice2AImpl_CreateEffect,
IDirectInputDevice2AImpl_EnumEffects,
IDirectInputDevice2AImpl_GetEffectInfo,
IDirectInputDevice2AImpl_GetForceFeedbackState,
IDirectInputDevice2AImpl_SendForceFeedbackCommand,
IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
IDirectInputDevice2AImpl_Escape,
IDirectInputDevice2AImpl_Poll,
IDirectInputDevice2AImpl_SendDeviceData
};
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(SysKeyboard7Avt.fn##fun))
#else
# define XCAST(fun) (void*)
#endif
static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)IDirectInputDevice2AImpl_QueryInterface,
XCAST(AddRef)IDirectInputDevice2AImpl_AddRef,
XCAST(Release)IDirectInputDevice2AImpl_Release,
XCAST(GetCapabilities)SysKeyboardAImpl_GetCapabilities,
XCAST(EnumObjects)IDirectInputDevice2AImpl_EnumObjects,
XCAST(GetProperty)IDirectInputDevice2AImpl_GetProperty,
XCAST(SetProperty)SysKeyboardAImpl_SetProperty,
XCAST(Acquire)SysKeyboardAImpl_Acquire,
XCAST(Unacquire)SysKeyboardAImpl_Unacquire,
XCAST(GetDeviceState)SysKeyboardAImpl_GetDeviceState,
XCAST(GetDeviceData)SysKeyboardAImpl_GetDeviceData,
XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat,
XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification,
XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel,
XCAST(GetObjectInfo)IDirectInputDevice2AImpl_GetObjectInfo,
XCAST(GetDeviceInfo)IDirectInputDevice2AImpl_GetDeviceInfo,
XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel,
XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
XCAST(CreateEffect)IDirectInputDevice2AImpl_CreateEffect,
XCAST(EnumEffects)IDirectInputDevice2AImpl_EnumEffects,
XCAST(GetEffectInfo)IDirectInputDevice2AImpl_GetEffectInfo,
XCAST(GetForceFeedbackState)IDirectInputDevice2AImpl_GetForceFeedbackState,
XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand,
XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
XCAST(Escape)IDirectInputDevice2AImpl_Escape,
XCAST(Poll)IDirectInputDevice2AImpl_Poll,
XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData,
IDirectInputDevice7AImpl_EnumEffectsInFile,
IDirectInputDevice7AImpl_WriteEffectToFile
};
#undef XCAST
......@@ -62,6 +62,7 @@ typedef struct IDirectInput2A IDirectInput2A,*LPDIRECTINPUT2A;
typedef struct IDirectInput7A IDirectInput7A,*LPDIRECTINPUT7A;
typedef struct IDirectInputDeviceA IDirectInputDeviceA,*LPDIRECTINPUTDEVICEA;
typedef struct IDirectInputDevice2A IDirectInputDevice2A,*LPDIRECTINPUTDEVICE2A;
typedef struct IDirectInputDevice7A IDirectInputDevice7A,*LPDIRECTINPUTDEVICE7A;
typedef struct IDirectInputEffect IDirectInputEffect,*LPDIRECTINPUTEFFECT;
typedef struct SysKeyboardA SysKeyboardA,*LPSYSKEYBOARDA;
typedef struct SysMouseA SysMouseA,*LPSYSMOUSEA;
......@@ -758,6 +759,18 @@ typedef struct DIJOYSTATE2 {
#define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
#define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
/* DInput 7 structures, types */
typedef struct DIFILEEFFECT {
DWORD dwSize;
GUID GuidEffect;
LPCDIEFFECT lpDiEffect;
CHAR szFriendlyName[MAX_PATH];
} DIFILEEFFECT, *LPDIFILEEFFECT;
typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
typedef BOOL CALLBACK (*LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
/*****************************************************************************
* IDirectInputEffect interface
*/
......@@ -895,6 +908,54 @@ ICOM_DEFINE(IDirectInputDevice2A,IDirectInputDeviceA)
#define IDirectInputDevice2_Poll(p) ICOM_CALL (Poll,p)
#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) ICOM_CALL4(SendDeviceData,p,a,b,c,d)
/*****************************************************************************
* IDirectInputDevice7A interface
*/
#define ICOM_INTERFACE IDirectInputDevice7A
#define IDirectInputDevice7A_METHODS \
ICOM_METHOD4(HRESULT,EnumEffectsInFile,LPCSTR,lpszFileName,LPDIENUMEFFECTSINFILECALLBACK,pec,LPVOID,pvRef,DWORD,dwFlags) \
ICOM_METHOD4(HRESULT,WriteEffectToFile,LPCSTR,lpszFileName,DWORD,dwEntries,LPDIFILEEFFECT,rgDiFileEft,DWORD,dwFlags)
#define IDirectInputDevice7A_IMETHODS \
IDirectInputDeviceA_IMETHODS \
IDirectInputDevice2A_METHODS \
IDirectInputDevice7A_METHODS
ICOM_DEFINE(IDirectInputDevice7A,IDirectInputDevice2A)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define IDirectInputDevice7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectInputDevice7_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectInputDevice7_Release(p) ICOM_CALL (Release,p)
/*** IDirectInputDevice methods ***/
#define IDirectInputDevice7_GetCapabilities(p,a) ICOM_CALL1(GetCapabilities,p,a)
#define IDirectInputDevice7_EnumObjects(p,a,b,c) ICOM_CALL3(EnumObjects,p,a,b,c)
#define IDirectInputDevice7_GetProperty(p,a,b) ICOM_CALL2(GetProperty,p,a,b)
#define IDirectInputDevice7_SetProperty(p,a,b) ICOM_CALL2(SetProperty,p,a,b)
#define IDirectInputDevice7_Acquire(p) ICOM_CALL (Acquire,p)
#define IDirectInputDevice7_Unacquire(p) ICOM_CALL (Unacquire,p)
#define IDirectInputDevice7_GetDeviceState(p,a,b) ICOM_CALL2(GetDeviceState,p,a,b)
#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) ICOM_CALL4(GetDeviceData,p,a,b,c,d)
#define IDirectInputDevice7_SetDataFormat(p,a) ICOM_CALL1(SetDataFormat,p,a)
#define IDirectInputDevice7_SetEventNotification(p,a) ICOM_CALL1(SetEventNotification,p,a)
#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) ICOM_CALL3(GetObjectInfo,p,a,b,c)
#define IDirectInputDevice7_GetDeviceInfo(p,a) ICOM_CALL1(GetDeviceInfo,p,a)
#define IDirectInputDevice7_RunControlPanel(p,a,b) ICOM_CALL2(RunControlPanel,p,a,b)
#define IDirectInputDevice7_Initialize(p,a,b,c) ICOM_CALL3(Initialize,p,a,b,c)
/*** IDirectInputDevice2 methods ***/
#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) ICOM_CALL4(CreateEffect,p,a,b,c,d)
#define IDirectInputDevice7_EnumEffects(p,a,b,c) ICOM_CALL3(EnumEffects,p,a,b,c)
#define IDirectInputDevice7_GetEffectInfo(p,a,b) ICOM_CALL2(GetEffectInfo,p,a,b)
#define IDirectInputDevice7_GetForceFeedbackState(p,a) ICOM_CALL1(GetForceFeedbackState,p,a)
#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) ICOM_CALL1(SendForceFeedbackCommand,p,a)
#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) ICOM_CALL3(EnumCreatedEffectObjects,p,a,b,c)
#define IDirectInputDevice7_Escape(p,a) ICOM_CALL1(Escape,p,a)
#define IDirectInputDevice7_Poll(p) ICOM_CALL (Poll,p)
#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) ICOM_CALL4(SendDeviceData,p,a,b,c,d)
/*** IDirectInputDevice7 methods ***/
#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) ICOM_CALL4(EnumEffectsInFile,p,a,b,c,d)
#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) ICOM_CALL4(WriteEffectToFile,p,a,b,c,d)
/* "Standard" Mouse report... */
typedef struct DIMOUSESTATE {
LONG lX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment