HWNDhWnd;/* Window handle for 3DxWare messages. */
SiTransCtltransCtl;/* 3DxWare transport control handle. Reserved */
/* for the s80 transport mechanism. */
DWORDprocessID;/* The process ID for this application. */
WCHARexeFile[MAX_PATH];/* The executable name of the process. */
SPWint32libFlag;/* Library version flag. */
SiHintshints;/* Hints used by driver */
}SiOpenDataEx;
typedefstruct/* Get event Data. Drive use only. */
{
UINTmsg;
WPARAMwParam;
LPARAMlParam;
}SiGetEventData;
typedefstruct/* Device type mask */
{
unsignedcharmask[8];
}SiTypeMask;
typedefstruct/* Device port information */
{
SiDevIDdevID;/* Device ID */
intdevType;/* Device type */
intdevClass;/* Device class */
chardevName[SI_STRSIZE];/* Device name */
charportName[SI_MAXPORTNAME];/* Port name */
}SiDevPort;
typedefstruct/* Device information */
{
charfirmware[SI_STRSIZE];/* Firmware version */
intdevType;/* Device type */
intnumButtons;/* Number of buttons */
intnumDegrees;/* Number of degrees of freedom */
SPWboolcanBeep;/* Device beeps */
intmajorVersion;/* Major version number */
intminorVersion;/* Minor version number */
}SiDevInfo;
typedefstruct/* Button information */
{
charname[SI_STRSIZE];/* Contains the name of a button for display in an app's GUI */
}SiButtonName;
typedefstruct/* Button information */
{
charname[SI_STRSIZE];/* Contains the name of a device for display in an app's GUI */
}SiDeviceName;
typedefstruct/* Port information */
{
charname[SI_MAXPATH];/* The name of a port the device is located on */
}SiPortName;
typedefstruct/* Version information */
{
intmajor;/* Major version number */
intminor;/* Minor version number */
intbuild;/* Build number */
charversion[SI_STRSIZE];/* Version string */
chardate[SI_STRSIZE];/* Date string */
}SiVerInfo;
typedefstruct/* Sensitivity parameters */
{
chardummy;
}SiSensitivity;
typedefstruct/* Tuning parameters */
{
chardummy;
}SiTuning;
// Turn off "nonstandard extension used : nameless struct/union" warning
#pragma warning ( disable : 4201 )
typedefstruct
{
SPWuint8code;/* Out of band message code */
union{
SPWuint8message[SI_MAXBUF-1];/* The actual message */
SPWint32messageAsLongs[SI_MAXBUF/4];/* Access for longs/DWORDs */
void*pvoid[SI_MAXBUF/8];/* void ptrs. Enough room for 64bit ptrs */
};
}SiSpwOOB;
typedefstruct
{
union{
SPWuint8string[SI_KEY_MAXBUF];/* No longer used, but it establishes the total size of SiSpwEvent, so keep it around in case anyone cares about the old size. */
struct{
SiKeyboardEventTypetype;
union{
struct{intVirtualKeyCode;intScanCode;}keyData;// Data for KeyPress and KeyRelease SiKeyboardEventType
};
}keyboardEvent;
};
}SiKeyboardData;
// Turn warning back on
#pragma warning ( default : 4201 )
typedefstruct/* Bitmasks of button states */
{
SPWuint32last;/* Buttons pressed as of last event */
SPWuint32current;/* Buttons pressed as of this event */
SPWuint32pressed;/* Buttons pressed this event */
SPWuint32released;/* Buttons released this event */
}SiButtonData;
/*
* SI_BUTTON_PRESS_EVENT & SI_BUTTON_RELEASE_EVENT are hardware button
* events. Meaning that they are meant to be sent when a specific hardware
* button is pressed. The correlation between the actual hardware button
* and the resulting button number could be broken by careful editing of
* a config file, but it is intended that the correlation be intact.
* This is basically the same as SI_BUTTON_EVENT, but allows
* more than 29 buttons because it isn't limited to a 32-bit mask.
* For buttons <= 31, both SI_BUTTON_EVENTs and SI_BUTTON_PRESS/RELEASE_EVENTs are sent.
* In the future there may be a way to switch off one or the other.
* This event was introduced in 3DxWare driver v. 5.2, but not implemented
* until 3DxWare 10 (3DxWinCore 17 r8207).
*/
typedefstruct/* Data for SI_BUTTON_PRESS/RELEASE_EVENT */
{
V3DKeybuttonNumber;/* The V3DKey that went down/up in a *
* SI_BUTTON_PRESS/RELEASE_EVENT event */
}SiHWButtonData;
typedefstruct/* Data for SI_APP_EVENT */
{
SPWboolpressed;/* SPW_TRUE if the invoking button pressed, SPW_FALSE otherwise */
SiAppCmdIDid;/* The Application-specific function identifier *
* invoked by the user in a SI_APP_EVENT.
* The id is last so we can optimize the use of transport memory. */
}SiAppCommandData;
typedefstruct/* Data for SI_CMD_EVENT */
{
SPWboolpressed;/* SPW_TRUE if the invoking button pressed, SPW_FALSE otherwise */
SPWuint32functionNumber;/* The V3DCMD_ function number invoked by the *
* user in a SI_CMD_EVENT (see V3DCMD.h) */
SPWint32iArgs[16];/* Optional arguments on a V3DCMD_ basis */
SPWfloat32fArgs[16];
}SiCmdEventData;
typedefstruct/* Data for SI_DEVICE_CHANGE_EVENT */
{
SiDeviceChangeTypetype;/* The type of event that happened */
SiDevIDdevID;/* The device ID effected */
SiPortNameportName;/* The device path that changed */
}SiDeviceChangeEventData;
typedefstruct/* 3DxWare data */
{
SiButtonDatabData;/* Button data */
longmData[6];/* Motion data (index via SI_TX, etc) */
longperiod;/* Period (milliseconds) */
}SiSpwData;
typedefstruct/* 3DxWare event */
{
inttype;/* Event type */
union
{
SiSpwDataspwData;/* Button, motion, or combo data */
SiSpwOOBspwOOB;/* Out of band message */
SiOrientationspwOrientation;/* Which hand orientation is the device */
charexData[SI_MAXBUF];/* Exception data. Driver use only */
SiKeyboardDataspwKeyData;/* String for keyboard data */
SiSyncPacketsiSyncPacket;/* GUI SyncPacket sent to applications */
SiHWButtonDatahwButtonEvent;/* V3DKey that goes with *
* SI_BUTTON_PRESS/RELEASE_EVENT */
SiAppCommandDataappCommandData;/* Application command event function data that *
* goes with an SI_APP_EVENT event */
SiDeviceChangeEventDatadeviceChangeEventData;/* Data for connecting/disconnecting devices */
SiCmdEventDatacmdEventData;/* V3DCMD_* function data that *