Ignore:
Timestamp:
Apr 30, 2002, 4:51:01 PM (23 years ago)
Author:
sandervl
Message:

header updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/win/dinput.h

    r7557 r8345  
    44#include "windef.h" /* for MAX_PATH */
    55#include "unknwn.h"
    6 #include "mouse.h"
    76
    87#define DIRECTINPUT_VERSION     0x0500
     
    1716DEFINE_GUID(IID_IDirectInput2A,         0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
    1817DEFINE_GUID(IID_IDirectInput2W,         0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
     18DEFINE_GUID(IID_IDirectInput7A,         0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
     19DEFINE_GUID(IID_IDirectInput7W,         0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
    1920DEFINE_GUID(IID_IDirectInputDeviceA,    0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
    2021DEFINE_GUID(IID_IDirectInputDeviceW,    0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
    2122DEFINE_GUID(IID_IDirectInputDevice2A,   0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
    2223DEFINE_GUID(IID_IDirectInputDevice2W,   0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
     24DEFINE_GUID(IID_IDirectInputDevice7A,   0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
     25DEFINE_GUID(IID_IDirectInputDevice7W,   0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
    2326DEFINE_GUID(IID_IDirectInputEffect,     0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
    2427
     
    5659
    5760typedef struct IDirectInputA IDirectInputA,*LPDIRECTINPUTA;
     61typedef struct IDirectInput2A IDirectInput2A,*LPDIRECTINPUT2A;
     62typedef struct IDirectInput7A IDirectInput7A,*LPDIRECTINPUT7A;
    5863typedef struct IDirectInputDeviceA IDirectInputDeviceA,*LPDIRECTINPUTDEVICEA;
    5964typedef struct IDirectInputDevice2A IDirectInputDevice2A,*LPDIRECTINPUTDEVICE2A;
     65typedef struct IDirectInputDevice7A IDirectInputDevice7A,*LPDIRECTINPUTDEVICE7A;
    6066typedef struct IDirectInputEffect IDirectInputEffect,*LPDIRECTINPUTEFFECT;
    6167typedef struct SysKeyboardA SysKeyboardA,*LPSYSKEYBOARDA;
    6268typedef struct SysMouseA SysMouseA,*LPSYSMOUSEA;
     69
     70#define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
     71DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
     72#define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
     73DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
     74#define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
     75DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
     76#define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
     77DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
    6378
    6479#define DI_OK                           S_OK
     
    121136#define DIENUM_CONTINUE                 1
    122137
     138#define DIEDFL_ALLDEVICES               0x00000000
     139#define DIEDFL_ATTACHEDONLY             0x00000000
     140#define DIEDFL_FORCEFEEDBACK            0x00000100
     141#define DIEDFL_INCLUDEALIASES           0x00010000
     142#define DIEDFL_INCLUDEPHANTOMS          0x00020000
     143
    123144#define DIDEVTYPE_DEVICE                1
    124145#define DIDEVTYPE_MOUSE                 2
     
    154175#define DIDEVTYPEJOYSTICK_WHEEL         6
    155176#define DIDEVTYPEJOYSTICK_HEADTRACKER   7
     177
     178#define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
     179#define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
    156180
    157181typedef struct {
     
    403427#define DIGDD_PEEK              0x00000001
    404428
    405 typedef struct {
     429typedef struct DIDEVICEOBJECTDATA {
    406430    DWORD       dwOfs;
    407431    DWORD       dwData;
     
    424448    DWORD                       dwNumObjs;
    425449    LPDIOBJECTDATAFORMAT        rgodf;
    426 } DIDATAFORMAT, *LPDIDATAFORMAT,*LPCDIDATAFORMAT;
     450} DIDATAFORMAT, *LPDIDATAFORMAT;
     451typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
    427452
    428453typedef struct {
     
    431456    DWORD       dwObj;
    432457    DWORD       dwHow;
    433 } DIPROPHEADER,*LPDIPROPHEADER,*LPCDIPROPHEADER;
     458} DIPROPHEADER,*LPDIPROPHEADER;
     459typedef const DIPROPHEADER *LPCDIPROPHEADER;
    434460
    435461#define DIPH_DEVICE     0
     
    471497
    472498/* special property GUIDs */
     499#ifdef __cplusplus
     500#define MAKEDIPROP(prop)        (*(const GUID *)(prop))
     501#else
    473502#define MAKEDIPROP(prop)        ((REFGUID)(prop))
     503#endif
    474504#define DIPROP_BUFFERSIZE       MAKEDIPROP(1)
    475505#define DIPROP_AXISMODE         MAKEDIPROP(2)
     
    733763#define DIJOFS_BUTTON31         DIJOFS_BUTTON(31)
    734764
     765/* DInput 7 structures, types */
     766typedef struct DIFILEEFFECT {
     767  DWORD       dwSize;
     768  GUID        GuidEffect;
     769  LPCDIEFFECT lpDiEffect;
     770  CHAR        szFriendlyName[MAX_PATH];
     771} DIFILEEFFECT, *LPDIFILEEFFECT;
     772
     773typedef const DIFILEEFFECT *LPCDIFILEEFFECT;                                           
     774typedef BOOL (* CALLBACK LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
     775
     776
    735777/*****************************************************************************
    736778 * IDirectInputEffect interface
     
    870912#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         ICOM_CALL4(SendDeviceData,p,a,b,c,d)
    871913
     914/*****************************************************************************
     915 * IDirectInputDevice7A interface
     916 */
     917#define ICOM_INTERFACE IDirectInputDevice7A
     918#define IDirectInputDevice7A_METHODS \
     919    ICOM_METHOD4(HRESULT,EnumEffectsInFile,LPCSTR,lpszFileName,LPDIENUMEFFECTSINFILECALLBACK,pec,LPVOID,pvRef,DWORD,dwFlags) \
     920    ICOM_METHOD4(HRESULT,WriteEffectToFile,LPCSTR,lpszFileName,DWORD,dwEntries,LPDIFILEEFFECT,rgDiFileEft,DWORD,dwFlags)
     921#define IDirectInputDevice7A_IMETHODS \
     922    IDirectInputDeviceA_IMETHODS \
     923    IDirectInputDevice2A_METHODS \
     924    IDirectInputDevice7A_METHODS
     925ICOM_DEFINE(IDirectInputDevice7A,IDirectInputDevice2A)
     926#undef ICOM_INTERFACE
     927
     928/*** IUnknown methods ***/
     929#define IDirectInputDevice7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     930#define IDirectInputDevice7_AddRef(p)             ICOM_CALL (AddRef,p)
     931#define IDirectInputDevice7_Release(p)            ICOM_CALL (Release,p)
     932/*** IDirectInputDevice methods ***/
     933#define IDirectInputDevice7_GetCapabilities(p,a)       ICOM_CALL1(GetCapabilities,p,a)
     934#define IDirectInputDevice7_EnumObjects(p,a,b,c)       ICOM_CALL3(EnumObjects,p,a,b,c)
     935#define IDirectInputDevice7_GetProperty(p,a,b)         ICOM_CALL2(GetProperty,p,a,b)
     936#define IDirectInputDevice7_SetProperty(p,a,b)         ICOM_CALL2(SetProperty,p,a,b)
     937#define IDirectInputDevice7_Acquire(p)                 ICOM_CALL (Acquire,p)
     938#define IDirectInputDevice7_Unacquire(p)               ICOM_CALL (Unacquire,p)
     939#define IDirectInputDevice7_GetDeviceState(p,a,b)      ICOM_CALL2(GetDeviceState,p,a,b)
     940#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   ICOM_CALL4(GetDeviceData,p,a,b,c,d)
     941#define IDirectInputDevice7_SetDataFormat(p,a)         ICOM_CALL1(SetDataFormat,p,a)
     942#define IDirectInputDevice7_SetEventNotification(p,a)  ICOM_CALL1(SetEventNotification,p,a)
     943#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
     944#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     ICOM_CALL3(GetObjectInfo,p,a,b,c)
     945#define IDirectInputDevice7_GetDeviceInfo(p,a)         ICOM_CALL1(GetDeviceInfo,p,a)
     946#define IDirectInputDevice7_RunControlPanel(p,a,b)     ICOM_CALL2(RunControlPanel,p,a,b)
     947#define IDirectInputDevice7_Initialize(p,a,b,c)        ICOM_CALL3(Initialize,p,a,b,c)
     948/*** IDirectInputDevice2 methods ***/
     949#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           ICOM_CALL4(CreateEffect,p,a,b,c,d)
     950#define IDirectInputDevice7_EnumEffects(p,a,b,c)              ICOM_CALL3(EnumEffects,p,a,b,c)
     951#define IDirectInputDevice7_GetEffectInfo(p,a,b)              ICOM_CALL2(GetEffectInfo,p,a,b)
     952#define IDirectInputDevice7_GetForceFeedbackState(p,a)        ICOM_CALL1(GetForceFeedbackState,p,a)
     953#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     ICOM_CALL1(SendForceFeedbackCommand,p,a)
     954#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) ICOM_CALL3(EnumCreatedEffectObjects,p,a,b,c)
     955#define IDirectInputDevice7_Escape(p,a)                       ICOM_CALL1(Escape,p,a)
     956#define IDirectInputDevice7_Poll(p)                           ICOM_CALL (Poll,p)
     957#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         ICOM_CALL4(SendDeviceData,p,a,b,c,d)
     958/*** IDirectInputDevice7 methods ***/
     959#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) ICOM_CALL4(EnumEffectsInFile,p,a,b,c,d)
     960#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) ICOM_CALL4(WriteEffectToFile,p,a,b,c,d)
     961
    872962/* "Standard" Mouse report... */
    873963typedef struct DIMOUSESTATE {
     
    878968} DIMOUSESTATE;
    879969
     970/* "Standard" Mouse report for DInput 7... */
     971typedef struct DIMOUSESTATE2 {
     972  LONG lX;
     973  LONG lY;
     974  LONG lZ;
     975  BYTE rgbButtons[8];
     976} DIMOUSESTATE2;
     977
    880978#define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
    881979#define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
     
    886984#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
    887985
     986#ifdef __cplusplus
     987extern "C" {
     988#endif
     989extern const DIDATAFORMAT c_dfDIMouse;
     990extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
     991extern const DIDATAFORMAT c_dfDIKeyboard;
     992extern const DIDATAFORMAT c_dfDIJoystick;
     993extern const DIDATAFORMAT c_dfDIJoystick2;
     994#ifdef __cplusplus
     995};
     996#endif
    888997
    889998/*****************************************************************************
     
    9141023#define IDirectInputA_Initialize(p,a,b)      ICOM_CALL2(Initialize,p,a,b)
    9151024
     1025/*****************************************************************************
     1026 * IDirectInput2A interface
     1027 */
     1028#define ICOM_INTERFACE IDirectInput2A
     1029#define IDirectInput2A_METHODS \
     1030    ICOM_METHOD3(HRESULT,FindDevice,      REFGUID,rguid, LPCSTR,pszName, LPGUID,pguidInstance)
     1031#define IDirectInput2A_IMETHODS \
     1032    IDirectInputA_IMETHODS \
     1033    IDirectInput2A_METHODS
     1034ICOM_DEFINE(IDirectInput2A,IDirectInputA)
     1035#undef ICOM_INTERFACE
     1036
     1037/*** IUnknown methods ***/
     1038#define IDirectInput2A_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1039#define IDirectInput2A_AddRef(p)             ICOM_CALL (AddRef,p)
     1040#define IDirectInput2A_Release(p)            ICOM_CALL (Release,p)
     1041        /*** IDirectInputA methods ***/
     1042#define IDirectInput2A_CreateDevice(p,a,b,c)  ICOM_CALL3(CreateDevice,p,a,b,c)
     1043#define IDirectInput2A_EnumDevices(p,a,b,c,d) ICOM_CALL4(EnumDevices,p,a,b,c,d)
     1044#define IDirectInput2A_GetDeviceStatus(p,a)   ICOM_CALL1(GetDeviceStatus,p,a)
     1045#define IDirectInput2A_RunControlPanel(p,a,b) ICOM_CALL2(RunControlPanel,p,a,b)
     1046#define IDirectInput2A_Initialize(p,a,b)      ICOM_CALL2(Initialize,p,a,b)
     1047        /*** IDirectInput2A methods ***/
     1048#define IDirectInput2A_FindDevice(p,a,b,c)    ICOM_CALL3(FindDevice,p,a,b,c)
     1049
     1050/*****************************************************************************
     1051 * IDirectInput7A interface
     1052 */
     1053#define ICOM_INTERFACE IDirectInput7A
     1054#define IDirectInput7A_METHODS \
     1055    ICOM_METHOD4(HRESULT,CreateDeviceEx,  REFGUID,rguid, REFIID,riid, LPVOID*,pvOut, LPUNKNOWN,lpUnknownOuter)
     1056#define IDirectInput7A_IMETHODS \
     1057    IDirectInput2A_IMETHODS \
     1058    IDirectInput7A_METHODS
     1059ICOM_DEFINE(IDirectInput7A,IDirectInput2A)
     1060#undef ICOM_INTERFACE
     1061
     1062/*** IUnknown methods ***/
     1063#define IDirectInput7A_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1064#define IDirectInput7A_AddRef(p)             ICOM_CALL (AddRef,p)
     1065#define IDirectInput7A_Release(p)            ICOM_CALL (Release,p)
     1066        /*** IDirectInputA methods ***/
     1067#define IDirectInput7A_CreateDevice(p,a,b,c)  ICOM_CALL3(CreateDevice,p,a,b,c)
     1068#define IDirectInput7A_EnumDevices(p,a,b,c,d) ICOM_CALL4(EnumDevices,p,a,b,c,d)
     1069#define IDirectInput7A_GetDeviceStatus(p,a)   ICOM_CALL1(GetDeviceStatus,p,a)
     1070#define IDirectInput7A_RunControlPanel(p,a,b) ICOM_CALL2(RunControlPanel,p,a,b)
     1071#define IDirectInput7A_Initialize(p,a,b)      ICOM_CALL2(Initialize,p,a,b)
     1072        /*** IDirectInput2A methods ***/
     1073#define IDirectInput7A_FindDevice(p,a,b,c)    ICOM_CALL3(FindDevice,p,a,b,c)
     1074        /*** IDirectInput7A methods ***/
     1075#define IDirectInput7A_CreateDeviceEx(p,a,b,c,d) ICOM_CALL4(CreateDeviceEx,p,a,b,c,d)
     1076
    9161077/* Export functions */
     1078
     1079#ifdef __cplusplus
     1080extern "C" {
     1081#endif
    9171082
    9181083HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
     
    9201085#define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
    9211086
     1087HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
     1088
     1089#ifdef __cplusplus
     1090};
     1091#endif
     1092
    9221093#endif /* __WINE_DINPUT_H */
Note: See TracChangeset for help on using the changeset viewer.