#ifndef TDx_InputDeviceH #define TDx_InputDeviceH // ========================================================================== // File: TDx_InputDevice.H // Authors: BCB_Code_Generator v1.70, // Darren Dwyer (source code, documentation, demos, website), // Hugh Edwards (documentation, icons, website), // Brian Austin (some source code, documentation) // Description: This file defines the TDx_InputDevice Component // // "TDx_Input_Library v1.70" // (c) 2003 BCB-Tools.com Pty. Ltd., Sydney, Australia. // All Rights Reserved. // // Refer to the 'Licence.Txt' file for licencing & copyright information. // ========================================================================== // -------------------------------------------------------------------------- // #includes // -------------------------------------------------------------------------- #include #include #include #include // -------------------------------------------------------------------------- #include "TDx_Library_Defns.H" #include "TDx_Library_Functions.H" // -------------------------------------------------------------------------- #include "TDx_Input_Library_Defns.H" #include "TDx_Input_Library_Functions.H" // -------------------------------------------------------------------------- // external classes used by the TDx_InputDevice component. class TDx_Input; // -------------------------------------------------------------------------- // external classes used by TDx_InputDevice methods. class TDIEffect; class TDx_InputEffect; class TDIEffEscape; class TDIDevCaps; class TDIDeviceObjectData; class TDIDeviceInstance; class TDIMouseState2; class TDIEffectInfo; class TDIDeviceObjectInstance; class TDIPropHeader; class TDIFileEffect; // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- // Definition for the OnEnumCreatedEffectObjects callback event. typedef __fastcall void (__closure* TDx_EnumCreatedEffectObjects) ( TObject* Sender, TDx_InputEffect* Effect, void* Context, bool& Finished ); // Definition for the OnEnumEffects callback event. typedef __fastcall void (__closure* TDx_EnumEffects) ( TObject* Sender, TDIEffectInfo* EffectInfo, void* Context, bool& Finished ); // Definition for the OnEnumEffectsInFile callback event. typedef __fastcall void (__closure* TDx_EnumEffectsInFile) ( TObject* Sender, TDIFileEffect* FileEffect, void* Context, bool& Finished ); // Definition for the OnEnumObjects callback event. typedef __fastcall void (__closure* TDx_EnumObjects) ( TObject* Sender, TDIDeviceObjectInstance* ObjectInstance, void* Context, bool& Finished ); // ========================================================================== // Class: TDx_InputDevice // Description: The TDx_InputDevice component wraps the DirectX // IDirectInputDevice7 interface used for acquiring and // releasing input device access, managing the behaviour, // properties and information related to the device, creating, // saving, loading and playing force feedback effects and // invoking a device's control panel. // // TDx_InputDevice also supports additional force feedback // effects and polled device support. // // To create a IDirectInputDevice7 interface, use the // TDx_InputDevice::Create() method and to destroy the // interface, use the TDx_InputDevice::Destroy() method. You // could also use TDx_Input::CreateDevice() for creating the // device, but it will not trigger the // TDx_InputDevice::OnCreate() event. // // Use the TDx_InputDevice::OnCreate() event and // TDx_InputDevice::OnDestroy() events to simplify the creation // and destruction of dependent objects. // // Once created, call any of the TDx_InputDevice methods and // handle any error results using the TDx_InputDevice::OnError() // event and the TDx_InputDevice::ErrorValue property. // ========================================================================== #if (__BORLANDC__ >= 0x0530) // BCB Version 3 + class PACKAGE TDx_InputDevice : public TComponent { // -------------------------------------------------------------------------- #else // BCB Version 1 class TDx_InputDevice : public TComponent { #endif // ========================================================================== __published: // ========================================================================== // ---------------------------------------------------------------------- // Event: OnCreate() // Description: The OnCreate() event is triggered by the // TDx_InputDevice::Create() method after it has // successfully created the internal LPDIRECTINPUTDEVICE7 // used within the TDx_InputDevice component. // // Note that since this event is only called upon successful // creation, this event is an ideal place for code that is // to be activated only once, immediately upon the // successful creation of the LPDIRECTINPUTDEVICE7 // interface. // // For example, you could retrieve the TDx_InputDevice // component's capabilities, Create() dependant components, // allocate memory, etc. // // When used in conjunction with the // TDx_InputDevice::OnDestroy() event, you can fully // automate and insulate your code on a per-component basis. // ---------------------------------------------------------------------- __property TDx_Event OnCreate = {read=FOnCreate, write=FOnCreate, nodefault}; // ---------------------------------------------------------------------- // Event: OnDestroy() // Description: The OnDestroy() event is triggered by the // TDx_InputDevice::Destroy() method, just before the // TDx_InputDevice internal LPDIRECTINPUTDEVICE7 interface // is destroyed. // // Note: This event is an ideal place to place code that // reverses the results of the TDx_InputDevice::OnCreate() // event. For example, assume you have already setup the // TDx_InputDevice::OnCreate() event to retrieve the // component's capabilities, Create() a dependant component // and allocate some memory; // You can then fully automate and insulate your code on a // per-component basis by placing code in the // TDx_InputDevice::OnDestroy() event to deallocate memory, // Destroy() the dependant components and, when required, // destroy the capabilities component. // ---------------------------------------------------------------------- __property TDx_Event OnDestroy = {read=FOnDestroy, write=FOnDestroy, nodefault}; // ---------------------------------------------------------------------- // Event: OnDeviceStateChange() // Description: The OnDeviceStateChange Event is triggered by a change in // the current devices state (eg button click, axis change) // when the TDx_InputDevice::SetEventNotification() method // is called with true as its parameter. This is non-polled // access of the device. // ---------------------------------------------------------------------- __property TDx_Event OnDeviceStateChange = {read=FOnDeviceStateChange, write=FOnDeviceStateChange, nodefault}; // ---------------------------------------------------------------------- // Event: OnError() // Description: The OnError event is called when an error occurs in the // TDx_InputDevice component. // ---------------------------------------------------------------------- __property TDx_Error OnError = {read=FOnError, write=FOnError, nodefault}; // ---------------------------------------------------------------------- // Callback: OnEnumCreatedEffectObjects() // Description: The OnEnumCreatedEffectObjects is called for every // DirectInputDevice Effect enumerated by the // EnumCreatedEffectObjects method. // ---------------------------------------------------------------------- __property TDx_EnumCreatedEffectObjects OnEnumCreatedEffectObjects = {read=FOnEnumCreatedEffectObjects, write=FOnEnumCreatedEffectObjects, nodefault}; // ---------------------------------------------------------------------- // Callback: OnEnumEffects() // Description: The OnEnumEffects Callback is called for every effect // enumerated by the EnumEffects method. // ---------------------------------------------------------------------- __property TDx_EnumEffects OnEnumEffects = {read=FOnEnumEffects, write=FOnEnumEffects, nodefault}; // ---------------------------------------------------------------------- // Callback: OnEnumEffectsInFile() // Description: The OnEnumEffectsInFile() event is used to process // information generated by the // TDx_InputDevice::EnumEffectsInFile() method. // ---------------------------------------------------------------------- __property TDx_EnumEffectsInFile OnEnumEffectsInFile = {read=FOnEnumEffectsInFile, write=FOnEnumEffectsInFile, nodefault}; // ---------------------------------------------------------------------- // Callback: OnEnumObjects() // Description: The OnEnumObjects is called for every DirectInputDevice // object enumerated by the EnumObjects method // ---------------------------------------------------------------------- __property TDx_EnumObjects OnEnumObjects = {read=FOnEnumObjects, write=FOnEnumObjects, nodefault}; // ========================================================================== public: // ========================================================================== // ---------------------------------------------------------------------- // Property: Created // Description: The Created property is true if the internal // LPDIRECTINPUTDEVICE7 used in this component has been // successfully created, otherwise Created is false. // // To create the internal LPDIRECTINPUTDEVICE7, call the // TDx_InputDevice::Create() method. // ---------------------------------------------------------------------- __property bool Created = { read=FGetCreated, write=FSetCreated, default=false }; // ---------------------------------------------------------------------- // Property: ErrorValue // Description: The ErrorValue property contains the last error value // returned from a call to a TDx_InputDevice method or // fget/fset. eg. DI_OK or DDERR_SURFACELOST or TDX_ERROR // ---------------------------------------------------------------------- __property HRESULT ErrorValue = { read=FGetErrorValue, write=FSetErrorValue, default=DI_OK }; // ---------------------------------------------------------------------- // Property: EventHandle // Description: The EventHandle property is used internally to store the // event assigned to the device. // ---------------------------------------------------------------------- __property HANDLE EventHandle = { read=FGetEventHandle, default=NULL }; // ---------------------------------------------------------------------- // Property: LastDataFormat // Description: The LastDataFormat property is used internally to store // the data format last used within the // TDx_InputDevice::SetDataFormat() method. // ---------------------------------------------------------------------- __property TDIData* LastDataFormat = { read=FGetLastDataFormat, default=NULL }; // ---------------------------------------------------------------------- // Method: Acquire() // Description: The Acquire() method will obtain access to the input // device. // // A data format must be set using // TDx_InputDevice::SetDataFormat() before the device can be // aquired. // Devices must be acquired before // TDx_InputDevice::GetDeviceState() or // TDx_InputDevice::GetDeviceData() can be used. // // A device is either acquired or unaquired, thus calling // Acquire() multiple times and then calling // TDx_InputDevice::UnAquire() once still results in the // device being completely unacquired. // // You will need to call // TDx_InputDevice::SetCooperativeLevel() before calling // this method. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // DIERR_OTHERAPPHASPRIO // ---------------------------------------------------------------------- virtual bool __fastcall Acquire(); // ---------------------------------------------------------------------- // Method: Create() // Description: The Create() method is used to automatically create the // internal LPDIRECTINPUTDEVICE7 interface used in the // TDx_InputDevice component and must be called before any // methods of the TDx_InputDevice component will function. // Params: pGuid - // The pGuid parameter is used to define what type of device // to create. System GUIDs for the mouse and keyboard are: // GUID_SysKeyboard // GUID_SysMouse // GUIDs for other devices are obtained by calling // TDx_Input::EnumDevices() // pInput - // The pInput parameter references a TDx_Input Object that // has been previously created. The TDx_Input::CreateDevice // method is called to create the InputDevice, these two // methods are identical in function. // ---------------------------------------------------------------------- virtual bool __fastcall Create( GUID pGuid, TDx_Input* pInput ); // ---------------------------------------------------------------------- // Method: CreateEffect() // Description: The CreateEffect() method will create and initialize an // effect instance. // // A return value of S_OK will be generated if the device is // not acquired in exclusive mode. This indicates that the // effect has been created and its parameters updated, but // it may not have been downloaded to the device. // // Error values that can be generated are: // // DIERR_DEVICENOTREG // DIERR_DEVICEFULL // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pRefGuid - // The RefGuid parameter identifies the effect being // created. // // One of the predefined effects below or a GUID obtained // from TDx_InputDevice::EnumEffects() can be used. // // GUID_ConstantForce // GUID_RampForce // // Periodic: // GUID_Square // GUID_Sine // GUID_Triangle // GUID_SawtoothUp // GUID_SawtoothDown // // Conditions: // GUID_Spring // GUID_Damper // GUID_Inertia // GUID_Friction // // User Defined: // GUID_CustomForce // pEffectData - // The EffectData parameter references a TDIEffect component // holding the properties of the effect being created. // // Set this property to NULL to create a blank effect object // to be set later up using // TDx_InputEffect::SetParameters(). // pNewEffect - // The NewEffect parameter will reference the new // TDx_InputEffect interface if the method returns // successfully. // ---------------------------------------------------------------------- virtual HRESULT __fastcall CreateEffect( REFGUID pRefGuid, TDIEffect* pEffectData, TDx_InputEffect* pNewEffect ); // ---------------------------------------------------------------------- // Method: Destroy() // Description: The Destroy() method is used to automatically destroy the // internal LPDIRECTINPUTDEVICE7 interface used in the // TDx_InputDevice component and should be called when the // internal interface is no longer required. // // Note: This method is called by the component's // destructor. // ---------------------------------------------------------------------- virtual bool __fastcall Destroy(); // ---------------------------------------------------------------------- // Method: EnumCreatedEffectObjects() // Description: The EnumCreatedEffectObjects() method will enumerate // effects currently created for this device by // TDx_InputDevice::CreateEffect(). // // Creating or destroying effects while the enumeration is // in progress may result in unpredictable results, but the // callback function can safely release effects passed to // it. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pReferenceData - // The ReferenceData parameter defines context or reference // data to be passed to the callback function each time it // is called. // ---------------------------------------------------------------------- virtual bool __fastcall EnumCreatedEffectObjects( void* pReferenceData ); // ---------------------------------------------------------------------- // Method: EnumEffects() // Description: The EnumEffects() method will enumerate the effects // supported by the device's force feedback system. // // The returned GUID's may represent predefined or device // specific effects. // // General effect information can be found in the EffectType // parameter, but to exploit a device specific effect to the // fullest, consult the documentation provided by the // manufacturer. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pReferenceData - // The ReferenceData parameter references an application // defined 32 bit value to be passed to the callback // function for each enumeration. // pEffectType - // The EffectType parameter defines flags indicating which // effect types should be enumerated. // The described effect applies when the flag is set. // Flags: // DIEFT_ALL - // All effects are to be enumerated, regardless of // type. // DIEFT_CONDITION - // Only conditions should be enumerated. // DIEFT_CONSTANTFORCE - // Only constant force effects should be enumerated. // DIEFT_CUSTOMFORCE - // Only custom forces should be enumerated. // DIEFT_HARDWARE - // Only hardware specific effects should be // enumerated. // DIEFT_PERIODIC - // Only periodic effects should be enumerated. // DIEFT_RAMPFORCE - // Only ramp force effects should be enumerated. // ---------------------------------------------------------------------- virtual bool __fastcall EnumEffects( void* pReferenceData, dword pEffectType ); // ---------------------------------------------------------------------- // Method: EnumEffectsInFile() // Description: The EnumEffectsInFile() method will enumerate effects // stored in a file by the Force Editor utility or another // application that utilizes the same file format. (RIFF) // // The Force Editor is included with the DirectX sdk and can // usually be found at (SDK root)\Bin\Dxutils\Fedit.exe or // under DirectX 7->DX Tools on your start bar. // // When enumeration is halted by the callback function, the // return result is still DI_OK. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pFileName - // The FileName parameter defines the name of the RIFF file. // pReferenceData - // The ReferenceData parameter references an application // defined 32 bit value to be passed to the callback // function for each enumeration. // pFlags - // The Flags parameter defines flags indicating which // effects to include or modify while enumerating. // The described effect applies when the flag is set. // Flags: // DIFEF_DEFAULT - // This flag is equivilent to setting the parameter to // 0. // DIFEF_INCLUDENONSTANDARD - // Effect types that are undefined by DirectInput // should also be enumerated. // DIFEF_MODIFYIFNEEDED - // Modify the effects being enumerated so that they // can be played on this device. // // Setting this flag causes the properties of the // TDIEffect component referenced by the // TDIFileEffect::Effect in the callback function to // be modified. // // For example : An attempt to play an effect authored // for a two axis device on a single axis device will // fail unless this flag was set when retrieving the // effect from the file. // ---------------------------------------------------------------------- virtual bool __fastcall EnumEffectsInFile( AnsiString pFileName, void* pReferenceData, dword pFlags ); // ---------------------------------------------------------------------- // Method: EnumObjects() // Description: The EnumObjects() method will enumerate the individual // input and force feedback objects of a device. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pReferenceData - // The ReferenceData parameter defines context or reference // data to be passed to the callback function each time it // is called. // pFlags - // The Flags parameter defines flags indicating which object // types are to be enumerated. // The described effect applies when the flag is set. // // Objects matching any of the flags set will be enumerated // unless DIDFT_FFACTUATOR or DIDFT_FFEFFECTTRIGGER is // present, in which case enumeration is limited to objects // matching all the set flags values. // Flags: // DIDFT_ABSAXIS - // Enumerate any object with an absolute axis. // DIDFT_ALL - // Enumerate all objects. // DIDFT_AXIS - // Enumerate any object with an absolute or relative // axis. // DIDFT_BUTTON - // Enumerate any object with push or toggle buttons. // DIDFT_COLLECTION - // Enumerate HID link collections. // DIDFT_ENUMCOLLECTION(n) - // Enumerate objects that belong to HID link // collection number n. // DIDFT_FFACTUATOR - // Enumerate objects to which force-feedback may be // applied. // DIDFT_FFEFFECTTRIGGER - // Enumerate objects that can trigger force-feedback // effects. // DIDFT_NOCOLLECTION - // Enumerate objects that do not belong to any HID // link collection. // Objects falling into this category are those that // have TDIDeviceObjectInstance::CollectionNumber = 0. // DIDFT_NODATA - // Enumerate objects that do not generate data. // DIDFT_OUTPUT - // Enumerate objects to which data can be sent using // TDx_InputDevice::SendDeviceData(). // DIDFT_POV - // Enumerate point-of-view controllers. // DIDFT_PSHBUTTON - // Enumerate push buttons. // Push buttons is reported as down when pressed, and // up when released. // DIDFT_RELAXIS - // Enumerate objects with a relative axis. // DIDFT_TGLBUTTON - // Enumerate objects that are toggle buttons. // Toggle buttons are reported down when pressed, and // remain down until re-pressed. // DIDFT_VENDORDEFINED - // Enumerate objects of a type defined by the device // manufacturer. // ---------------------------------------------------------------------- virtual bool __fastcall EnumObjects( void* pReferenceData, dword pFlags ); // ---------------------------------------------------------------------- // Method: Escape() // Description: The Escape() method will send a hardware-specific command // directly to the device driver. // // TDIDeviceInstance::FFDriver should be checked against the // expected driver identifier to ensure the escape is sent // to the right driver. // // The driver documentation should list and describe the // comands that are valid for the driver. // // Error Values that can be generated are: // // DIERR_NOTINITIALIZED // DIERR_DEVICEFULL // Params: pEscape - // The EffectEscape parameter references a TDIEffEscape // component describing the command to be sent to the // driver. // // On returning, the TDIEffEscape::OutBufferSize property // will define amount of data, in bytes, written to // TDIEffEscape::OutBuffer. // ---------------------------------------------------------------------- virtual bool __fastcall Escape( TDIEffEscape* pEscape ); // ---------------------------------------------------------------------- // Method: GetCapabilities() // Description: The GetCapabilities() method will retrieve the // cababilities of this device. // // Error Values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pDevCaps - // The DevCaps parameter references a TIDevCaps component // for holding the device capabilities if this method // returns successfully. // ---------------------------------------------------------------------- virtual bool __fastcall GetCapabilities( TDIDevCaps* pDevCaps ); // ---------------------------------------------------------------------- // Method: GetDeviceData() // Description: The GetDeviceData() method will retrieve buffered data // that the device is holding. // // The data format must be set with // TDx_InputDevice::SetDataFormat(), the buffer size must be // set with TDx_InputDevice::SetProperty() and the device // acquired with TDx_InputDevice::Acquire() before device // data can be obtained. // // To flush the buffer, set the DOD parameter to NULL and // the InOut parameter to INFINITE. // The number of items flushed will be returned in the InOut // parameter. // Setting the Flags parameter to DIGDD_PEEK will return the // number of items without flushing the buffer. // // Error Values that can be generated are: // // DIERR_INPUTLOST // DIERR_INVALIDPARAM // DIERR_NOTACQUIRED // DIERR_NOTBUFFERED // DIERR_NOTINITIALIZED // Params: pObjectData - // The ObjectData parameter defines the size, in bytes, of // each of the TDIDeviceObjectData components referenced by // the DOD parameter. // pDeviceObjectData - // The DeviceObjectData parameter references an array of // TDIDeviceDeviceObjectData components for holding the data // retrieved. // // Setting this parameter to NULL will discard the buffered // data while still allowing the other effects of the method // call to occur. // pInOut - // The InOut parameter initially defines the number of // elements in the DOD array and on return it holds the // actual number of elements retrieved. // pFlags - // The Flags parameter defines a flag indicating whether to // retain the data after if has been retrieved. // The described effect applies when the flag is set. // Flags: // DIGDD_PEEK - // Retrieved data will not be removed from the buffer // and thus the next TDx_InputDevice::GetDeviceData() // call will retrieve the same data. // // Data is usually removed from the buffer after // retrieval. // ---------------------------------------------------------------------- virtual bool __fastcall GetDeviceData( dword pObjectData, TDIDeviceObjectData* pDeviceObjectData, dword* pInOut, dword pFlags ); // ---------------------------------------------------------------------- // Method: GetDeviceInfo() // Description: The GetDeviceInfo() method will obtain the device's // identity information. // // Error Values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pDeviceInstance - // The DeviceInstance parameter references a // TDIDeviceInstance component for holding the device // identity information if the method returns successfully. // ---------------------------------------------------------------------- virtual bool __fastcall GetDeviceInfo( TDIDeviceInstance* pDeviceInstance ); // ---------------------------------------------------------------------- // Method: GetDeviceState() // Description: The GetDeviceState() method will retrieve the current // state of the device. // // The cooperative level must be set with // TDx_InputDevice::SetCooperativeLevel(), the data format // must be set with TDx_InputDevice::SetDataFormat() and the // device acquired with TDx_InputDevice::Acquire() before // the device state can be obtained. // // Error values that can be generated are: // // DIERR_INPUTLOST // DIERR_INVALIDPARAM // DIERR_NOTACQUIRED // DIERR_NOTINITIALIZED // E_PENDING // Params: pState - // The State parameter references an object for holding the // current state of the device. // // Most of the time this parameter references a // TDIMouseState, TDIMouseState2, TDIKeyboardState, // TDIJoyState or TDIJoystate2 component for holding the // state information of the predefined data formats. // // Otherwise the format of the data will have been // previously established using // TDx_InputDevice::SetDataFormat(). // ---------------------------------------------------------------------- virtual bool __fastcall GetDeviceState( TDIData* pState ); // ---------------------------------------------------------------------- // Method: GetEffectInfo() // Description: The GetEffectInfo() method will retrieve information // about an effect. // // Error values that can be generated are: // // DIERR_DEVICENOTREG // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pEffectInfo - // The EffectInfo parameter references a TDIEffectInfo // component for holding the effect information if the // method returns successfully. // pRefGuid - // The RefGuid parameter identifies the effect for which the // information is to be retrieved. // ---------------------------------------------------------------------- virtual bool __fastcall GetEffectInfo( TDIEffectInfo* pEffectInfo, REFGUID pRefGuid ); // ---------------------------------------------------------------------- // Method: GetForceFeedbackState() // Description: The GetForceFeedbackState() method will retrieve the // current state of the force feedback system of the device. // // The exclusive cooperative level is required for this // method to succeed. // // Error values that can be generated are: // // DIERR_INPUTLOST // DIERR_INVALIDPARAM // DIERR_NOTEXCLUSIVEACQUIRED // DIERR_NOTINITIALIZED // DIERR_UNSUPPORTED // Params: pOut - // The Out parameter defines flags describing the current // force feedback state. // The described effect applies when the flag is set. // Flags: // DIGFFS_ACTUATORSOFF - // The force feedback actuators of the device are // currently disabled. // DIGFFS_ACTUATORSON - // The force feedback actuators of the device are // currently enabled. // DIGFFS_DEVICELOST - // The device has unexpectedly failed and is currently // in an indeterminate state, the device must be // either unacquired and reacquired or have a // DISFFC_RESET command sent to it. // DIGFFS_EMPTY - // The device currently has no effects downloaded. // DIGFFS_PAUSED - // The device playback of all active effects has been // paused. // DIGFFS_POWEROFF - // The device's force feedback system is currently not // available. // This flag will not be set if the device cannot // report its power state. // DIGFFS_POWERON - // The device's force feedback system is currently // available. // This flag will not be set if the device cannot // report its power state. // DIGFFS_SAFETYSWITCHOFF - // The device's safety switch is currently in the off // position and the device cannot operate. // This flag will not be set if the device cannot // report the state of its safety switch. // DIGFFS_SAFETYSWITCHON - // The device's safety switch is currently on and the // device can operate. // This flag will not be set if the device cannot // report the state of its safety switch. // DIGFFS_STOPPED - // The device is not paused and no effects are // playing. // DIGFFS_USERFFSWITCHOFF - // The device's user force feedback switch is // currently off and the device cannot operate. // This flag will not be set if the device cannot // report the state of its user force feedback switch. // DIGFFS_USERFFSWITCHON - // The device's user force feedback switch is // currently on and the device can operate. // This flag will not be set if the device cannot // report the state of its user force feedback switch. // ---------------------------------------------------------------------- virtual HRESULT __fastcall GetForceFeedbackState( dword* pOut ); // ---------------------------------------------------------------------- // Method: GetObjectInfo() // Description: The GetObjectInfo() method will return device object // information for objects like buttons or axes. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // DIERR_OBJECTNOTFOUND // Params: pDeviceObjectInstance - // The DeviceObjectInstance parameter references a // TDIDeviceObjectInstance component for holding information // about the object if the method returns successfully. // pObject - // The Object parameter identifies the target object of the // information retrieval. // // The How parameter determines how this parameter is to be // interpreted. // pFlags - // The Flags parameter defines flags indicating how the // Object parameter should be interpreted. // The described effect applies when the flag is set. // Flags: // DIPH_BYID - // The Obj parameter holds an object instance // identifier that identifies the object for which // data is being retrieved. // DIPH_BYOFFSET - // The Obj parameter holds an offset into the data // format of the object from which data is being // retrieved. // DIPH_BYUSAGE - // The Obj parameter holds the HID usage page and // usage values of the object that have been combined // using the DIMAKEUSAGEDWORD macro. // ---------------------------------------------------------------------- virtual bool __fastcall GetObjectInfo( TDIDeviceObjectInstance* pDeviceObjectInstance, dword pObject, dword pFlags ); // ---------------------------------------------------------------------- // Method: GetProperty() // Description: The TDx_InputDevice::GetProperty() method will retrieve a // variety of property information from the input device. // // Error values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // DIERR_OBJECTNOTFOUND // DIERR_UNSUPPORTED // Params: pProp - // The Prop property identifies the property that is to be // retrieved. // // This is one of the predefined values below or a pointer a // GUID identifying the property. // // DIPROP_AUTOCENTER // Determine if the device is self centering. // The associated TDIPropDWORD::Data property will be set to // DIPROPAUTOCENTER_ON or DIPROPAUTOCENTER_OFF. // Not all devices support auto centering and sometimes the // autocentering mechanism can interfere with force feedback // effects. // // DIPROP_AXISMODE // Retrieve the axis mode. // The associated TDIPropDWORD::Data property will be set to // DIPROPAXISMODE_REL or DIPROPAXISMODE_ABS. // // DIPROP_BUFFERSIZE // Retrive the buffer size. // The associated TDIPropDWORD::Data property will be set to // the retrieved value. // This indicates the amount of data the device can buffer // between calls to TDx_InputDevice::GetDeviceData() without // data being lost. // // DIPROP_DEADZONE // Retrieve the deadzone value for a joystick. // The associated TDIPropDWORD::Data property will be set to // the retrieved value, which will be in the range 0 to // 10000. // // DIPROP_FFGAIN // Retrieve the gain setting of the device. // The associated TDIPropDWORD::Data property will be set to // the retrieved value, which will be in the range 0 to // 10000. // // DIPROP_FFLOAD // Retrieve the percentage of the device's memory is // currently in use. // The associated TDIPropDWORD::Data property will be set to // the retrieved value, which will be in the range 0 to 100. // // DIPROP_GRANULARITY // Retrieve the input granularity. // The associated TDIPropDWORD::Data property will be set to // the retrieved value, which represents the smallest amount // of axis movement a device can report. // // DIPROP_GUIDANDPATH // Retrieve the class identifier and device interface for // the device. // The associated TDIPropGuidAndPath::Class and // TDIPropGuidAndPath::Path properties will be set to the // retrieved values, which allow unsupported operations to // be performed on a HID. // // DIPROP_INSTANCENAME // Retrieve the friendly instance name of the device. // The associated TDIPropString::String property will be set // to the retrieved name, which will be something like // 'joystick 2' or 'mouse 1'. // // DIPROP_PRODUCTNAME // Retrieve the friendly product name of the device. // The associated TDIPropString::String property will be set // to the retrieved name, which will be something like // 'FlightMaster' or 'Super Trackball 3'. // // DIPROP_RANGE // Retrieve the range of values the device object can // report. // The associated TDIPropRange::Min and TDIPropRange::Max // properties will be set to the retrieved ranges. // // DIPROP_SATURATION // Retrieve the current saturation zone value for a // joystick. // The associated TDIPropDWORD::Data property will be set to // the retrieved value, which represents the point on an // axis where the device is considered to have reached its // most extreeme position. // pProperty - // The Property parameter references a single // TDIProperty-derived component: TDIPropRange, // TDIPropDWORD, TDIPropString or TDIPropGuidAndPath, // depending on the kind of property being set. // ---------------------------------------------------------------------- virtual bool __fastcall GetProperty( REFGUID pProp, TDIProperty* pProperty ); // ---------------------------------------------------------------------- // Method: Poll() // Description: The Poll() method will retrieve data, update the state // and generate input and set notification events for a // polled object of an input device. // // If a device requires polling, no new data will be // recieved from the device until this method is called. // For devices that do not require polling, this method will // have no effect. // // The data format must be set using // TDx_InputDevice::SetDataFormat() and the device acquired // with TDx_InputDevice::Acquire() before the object can be // polled. // // Error Values that can be generated are: // // DIERR_INPUTLOST // DIERR_NOTACQUIRED // DIERR_NOTINITIALIZED // ---------------------------------------------------------------------- virtual bool __fastcall Poll(); // ---------------------------------------------------------------------- // Method: RunControlPanel() // Description: The RunControlPanel() method will run the control panel // associated with the device. // // The default device control panel will be launched if no // association has been made. // // Error Values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pOwner - // The Owner parameter defines the handle of the parent // window of the control panel user interface. // // Setting this parameter to NULL results in no parent // window being used. // ---------------------------------------------------------------------- virtual bool __fastcall RunControlPanel( HWND pOwner ); // ---------------------------------------------------------------------- // Method: SendDeviceData() // Description: The SendDeviceData() method will send data to an acquired // device capable of accepting output. // // The order in which individual elements are sent is // unknown. Sending multiple pieces of data to one object // with one call will result in only one (unspecified) piece // of data being sent. // // For specific results, the data should be sent in // successive calls, one data element per call. // The DISDD_CONTINUE flag can be used to overlay data from // successive method calls. // // Error Values that can be generated are: // // DIERR_INPUTLOST // DIERR_NOTACQUIRED // DIERR_REPORTFULL // DIERR_UNPLUGGED // Params: pObjectData - // The ObjectData parameter defines the size, in bytes, of // one of the TDIDeviceObjectData elements in the // DeviceObjectData array. // pDeviceObjectData - // The DeviceObjectData parameter references an array of // TDIDeviceObjectData components holding the data being // sent to the device. // pInOut - // The InOut parameter initially holds the number of // elements in the DeviceObjectData array and holds the // actual number of elements sent to the device on // returning. // pFlags - // The Flags parameter define a flag indicating how data // should be sent to the device. // The described effect applies when the flag is set. // Flags: // DISDD_CONTINUE - // Device data will overlay any previously sent data. // ---------------------------------------------------------------------- virtual bool __fastcall SendDeviceData( dword pObjectData, TDIDeviceObjectData* pDeviceObjectData, dword* pInOut, dword pFlags ); // ---------------------------------------------------------------------- // Method: SendForceFeedbackCommand() // Description: The SendForceFeedbackCommand() method will send the // device force feedback system a command. // // This method requires exclusive mode access to an acquired // device. // // Error Values that can be generated are: // // DIERR_INPUTLOST // DIERR_INVALIDPARAM // DIERR_NOTEXCLUSIVEACQUIRED // DIERR_NOTINITIALIZED // DIERR_UNSUPPORTED // Params: pFlags - // The Flags parameter defines flags identifying the command // to be sent to the force feedback system of the device. // The described effect applies when the flag is set. // Flags: // DISFFC_CONTINUE - // Continue playback of any active effects that are // currently paused. // // This command will generate an error when applied to // a device that is not paused. // DISFFC_PAUSE - // Pause playback of any active effects the device is // currently playing. // // An effect will continue to play to its full // duration when a DISFFC_CONTINUE command is sent. // Modifying or starting effects while the device is // paused may cause undefined behaviour. // DISFCC_RESET or DISFCC_STOPALL will abandon the // pause and stop all effects. // DISFFC_RESET - // Reset the force feedback system to its startup // state for this device. // // This disables the device's actuators and wipes all // effects are from the device. // Effects must be recreated if further use is // desired. // DISFFC_SETACTUATORSOFF - // Disable the force feedback actuators for this // device. // Effects will continue to be played, but are ignored // by the device. // DISFFC_SETACTUATORSON - // Enable the force feedback actuators for this // device. // DISFFC_STOPALL - // Halt and reset any active effects currently playing // on the device. // // This command is equivilent to calling // TDx_InputDevice::Stop for each effect and will also // unpause the device. // ---------------------------------------------------------------------- virtual bool __fastcall SendForceFeedbackCommand( dword pFlags ); // ---------------------------------------------------------------------- // Method: SetCooperativeLevel() // Description: The SetCooperativeLevel() method will establish this // device instance's cooperative level. // // Acquiring the system mouse in exclusive mode will cause // the mouse pointer to disappear until the device is // unaquired. // // You will need to call this method before calling // TDx_InputDevice::Acquire(). // // Error Values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pHWnd - // The HWnd parameter defines the window handle being // associated with the device. // // This is a valid top level window handle belonging to this // process. // The associated window must not be destroyed while the // device is still active. // pFlags - // The Flags parameter defines flags indicating the // cooperative level being set for the device. // The described effect applies when the flag is set. // Flags: // DISCL_BACKGROUND - // Background access is required. // // The device may be acquired anytime, even when its // associated window is not active. // This flag or DISCL_FOREGROUND must be set, but not // both. // DISCL_EXCLUSIVE - // Exclusive access is required. // No other device instance can gain exclusive access // while the device is acquired. // This flag or DISCL_NONEXCLUSIVE must be set, but // not both. // DISCL_FOREGROUND - // Foreground access is required. // The device will be automatically unacquired // whenever its associated window moves to the // background. // This flag or DISCL_BACKGROUND must be set, but not // both. // DISCL_NONEXCLUSIVE - // Non exclusive access is required. // Multiple applications can access the device without // interference. // This flag or DISCL_EXCLUSIVE must be set, but not // both. // DISCL_NOWINKEY - // The Windows key is to be disabled. // // This is useful for preventing accidental exits from // the applicaiton. // ---------------------------------------------------------------------- virtual bool __fastcall SetCooperativeLevel( HWND pHWnd, dword pFlags ); // ---------------------------------------------------------------------- // Method: SetDataFormat() // Description: The SetDataFormat() method will set the device's data // format. // // Note: This method is different in use to it's sdk // equivalent, in that you pass in a TDIData* instead of a // global structure, which means you can supply any // component derived from TDIData, the pre-defined // TDIKeyboardState, TDIMouseState, TDIMouseState2, // TDIJoyState, TDIJoyState2 components and the // TDIDataFormat component for custom configurations. // // After this method is called with any of the predefined // components, call the TDx_InputDevice::GetDeviceState() // method and pass in the same component, otherwise an error // may occur. // // You should only need to set a device's data format once, // and note that the data format cannot be changed while the // device is acquired. // // Error Values that can be generated are: // DIERR_ACQUIRED // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pDataFormat - // The DataFormat parameter references the data format to be // set for the device. The data format may be an application // defined TDIDataFormat component or one of the predefined // components below. // // TDIKeyboardState - basic system keyboard // TDIMouseState - standard mouse // TDIMouseState2 - advanced mouse // TDIJoyState - standard joystick // TDIJoyState2 - advanced joystick // ---------------------------------------------------------------------- virtual bool __fastcall SetDataFormat( TDIData* pDataFormat ); // ---------------------------------------------------------------------- // Method: SetEventNotification() // Description: The SetEventNotification() method will specify the // device's notification event status and will set the // notification event triggered the device state changes. // // Device state changes include axis position change, button // state change, POV control direction change or loss of // acquisition. // // Note: this method has been slightly altered from the // directx equivalent. You no longer need to create an // event, enable notifications, disable notifications. // Instead, you can simply toggle between the // TDx_InputDevice::OnDeviceStateChange() events and polled // mode. // // Error Values that can be generated are: // // DIERR_ACQUIRED // DIERR_HANDLEEXISTS // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // Params: pEventNotification - // The EventNotification parameter should be set to true for // the TDx_InputDevice::OnDeviceStateChange() Event to be // triggered by changes in the device state. // Setting it to false will disable this facility, allowing // polled access to the device only. // ---------------------------------------------------------------------- virtual bool __fastcall SetEventNotification( bool pEventNotification ); // ---------------------------------------------------------------------- // Method: SetProperty() // Description: The SetProperty() method will define various device // behaviour properties such as input buffer sizes and axis // modes. // // Error Values that can be generated are: // // DIERR_INVALIDPARAM // DIERR_NOTINITIALIZED // DIERR_OBJECTNOTFOUND // DIERR_UNSUPPORTED // Params: pProp - // The Prop property identifies the property that is to be // retrieved. // // This is one of the predefined values below or a pointer a // GUID identifying the property. // // DIPROP_AUTOCENTER // Set the device's auto centering function. // The associated TDIPropDWORD::Data property should be set // to DIPROPAUTOCENTER_ON or DIPROPAUTOCENTER_OFF. // Not all devices support auto centering and sometimes the // autocentering mechanism can interfere with force feedback // effects. // // DIPROP_AXISMODE // Set the axis mode. // The associated TDIPropDWORD::Data property should be set // to DIPROPAXISMODE_REL or DIPROPAXISMODE_ABS. // // DIPROP_BUFFERSIZE // Set the buffer size. // The associated TDIPropDWORD::Data property should be set // to the desired value, which will be adjusted if it is // larger than the device can support. // This indicates the amount of data the device can buffer // between calls to TDx_InputDevice::GetDeviceData() without // data being lost. // // DIPROP_CALIBRATIONMODE // Set the calibration mode for an axis or device. // The associated TDIPropDWORD::Data property should be set // to DIPROPCALIBRATIONMODE_RAW or // DIPROPCALIBRATIONMODE_COOKED (the default). // The RAW setting causes raw, uncalibrated data to be // returned and the deadzone, saturation and range settings // to be ignored. // // DIPROP_DEADZONE // Set the deadzone value for a joystick. // The associated TDIPropDWORD::Data property should be set // to the desired value, in the range of 0 to 10000. // // DIPROP_FFGAIN // Set the gain value for the device. // The associated TDIPropDWORD::Data property should be set // to the desired value, in the range of 0 to 10000. // // DIPROP_INSTANCENAME // Set the friendly instance name of the device. // The associated TDIPropString::String property should be // set to the desired name, something like 'joystick 2' or // 'mouse 1'. // It generally shouldn't be neccessary to modify a device's // instance name. // // DIPROP_PRODUCTNAME // Set the friendly product name of the device. // The associated TDIPropString::String property should be // set to the desired name, which will be something like // 'FlightMaster' or 'Super Trackball 3'. // It generally shouldn't be neccessary to modify a device's // product name. // // DIPROP_RANGE // Set the range of values the device object can report. // The associated TDIPropRange::Min must be set to a smaller // value than TDIPropRange::Max. // For some devices this is a read only property and this // command will fail. // // DIPROP_SATURATION // Set the saturation zone value for a joystick. // The associated TDIPropDWORD::Data property should be set // to the desired value, which represents the point on an // axis where the device is considered to have reached its // most extreme position. // pProperty - // The Property parameter references a single // TDIProperty-derived component: TDIPropRange, // TDIPropDWORD, TDIPropString or TDIPropGuidAndPath, // depending on the kind of property being set. // ---------------------------------------------------------------------- virtual bool __fastcall SetProperty( REFGUID pProp, TDIProperty* pProperty ); // ---------------------------------------------------------------------- // Method: Unacquire() // Description: The Unacquire() method will release access to a // previously acquired device. // // Unaquiring an unaquired device will cause an error. // // Error Values that can be generated are: // // DI_NOEFFECT // ---------------------------------------------------------------------- virtual bool __fastcall Unacquire(); // ---------------------------------------------------------------------- // Method: WriteEffectToFile() // Description: The WriteEffectToFile() method will save one or more // force feedback effects to a file. // // Once written, the effects can be retrieved by using the // TDx_InputDevice::EnumEffectsInFile() method. // // Error Values that can be generated are: // // DIERR_INVALIDPARAM // Params: pFileName - // The FileName parameter defines the name of the RIFF file // being written. // pEntries - // The Entries parameter defines the number of elements in // the FileEffect array. // pFileEffect - // The FileEffect parameter references an array of // TDIFileEffect components holding the effect information // to be saved to file. // pFlags - // The Flags parameter defines flags indicating how the // effect should be written. // The described effect applies when the flag is set. // Flags: // DIFEF_DEFAULT - // Setting this flag is equivilent to setting the // parameter to 0. // DIFEF_INCLUDENONSTANDARD - // Effects undefined by DirectInput should also be // written to the file. // // When this flag is not set, only defined effects // such as GUID_Condition will be written. // ---------------------------------------------------------------------- virtual bool __fastcall WriteEffectToFile( AnsiString pFileName, dword pEntries, TDIFileEffect* pFileEffect, dword pFlags ); // ---------------------------------------------------------------------- // Constructor() and Destructor() // ---------------------------------------------------------------------- __fastcall TDx_InputDevice(TComponent* Owner); virtual __fastcall ~TDx_InputDevice(); // ---------------------------------------------------------------------- // The following properties and methods are used internally by // TDx_Input_Library and should not be used. // ---------------------------------------------------------------------- __property LPDIRECTINPUTDEVICE7 Internal_LPDIRECTINPUTDEVICE7 = { read=FGetInternal_LPDIRECTINPUTDEVICE7, write=FSetInternal_LPDIRECTINPUTDEVICE7, nodefault }; __property LPDIRECTINPUTDEVICE7* Internal_LPDIRECTINPUTDEVICE7_Ptr = { read=FGetInternal_LPDIRECTINPUTDEVICE7_Ptr, nodefault }; void __fastcall Internal_LPDIRECTINPUTDEVICE7_Update(); __property LPDIRECTINPUTDEVICE Internal_LPDIRECTINPUTDEVICE = { read=FGetInternal_LPDIRECTINPUTDEVICE, write=FSetInternal_LPDIRECTINPUTDEVICE, nodefault }; __property LPDIRECTINPUTDEVICE* Internal_LPDIRECTINPUTDEVICE_Ptr = { read=FGetInternal_LPDIRECTINPUTDEVICE_Ptr, nodefault }; void __fastcall Internal_LPDIRECTINPUTDEVICE_Update(); // ========================================================================== protected: // ========================================================================== // ---------------------------------------------------------------------- // Property Access Methods // ---------------------------------------------------------------------- bool __fastcall FGetCreated(); void __fastcall FSetCreated( bool pCreated ); HRESULT __fastcall FGetErrorValue(); void __fastcall FSetErrorValue( HRESULT pErrorValue ); HANDLE __fastcall FGetEventHandle(); TDIData* __fastcall FGetLastDataFormat(); // ========================================================================== private: // ========================================================================== // ---------------------------------------------------------------------- // Method: Internal_EnumCreatedEffectObjectsCallback() // Description: The Internal_EnumCreatedEffectObjectsCallback() method is // used internally by the TDx_Input_Library to redirect the // DirectX callback's triggered during the // EnumCreatedEffectObjects() method call to a // user-configurable OnEnumCreatedEffectObjects() event. // Params: pEffect - // The Effect parameter references the DirectX-supplied // DIRECTINPUTEFFECT structure that is currently being // enumerated. // pContext - // The Context parameter is a user defined value passed to // the calling function and sent to this method during each // enumeration. // ---------------------------------------------------------------------- static BOOL __stdcall Internal_EnumCreatedEffectObjectsCallback( LPDIRECTINPUTEFFECT pEffect, LPVOID pContext ); // ---------------------------------------------------------------------- // Method: Internal_EnumEffectsCallback() // Description: The Internal_EnumEffectsCallback() method is used // internally by the TDx_Input_Library to redirect the // DirectX callback's triggered during the EnumEffects() // method call to a user-configurable OnEnumEffects() // event. // Params: pEffectInfo - // The EffectInfo parameter references the DirectX-supplied // DIEFFECTINFO structure that is currently being // enumerated. // pContext - // The Context parameter is a user defined value passed to // the calling function and sent to this method during each // enumeration. // ---------------------------------------------------------------------- static BOOL __stdcall Internal_EnumEffectsCallback( LPCDIEFFECTINFO pEffectInfo, LPVOID pContext ); // ---------------------------------------------------------------------- // Method: Internal_EnumEffectsInFileCallback() // Description: The Internal_EnumEffectsInFileCallback() method is used // internally by the TDx_Input_Library to redirect the // DirectX callback's triggered during the // EnumEffectsInFile() method call to a user-configurable // OnEnumEffectsInFile() event. // Params: pFileEffect - // The FileEffect parameter references the DirectX-supplied // DIFILEEFFECT structure that is currently being // enumerated. // pContext - // The Context parameter is a user defined value passed to // the calling function and sent to this method during each // enumeration. // ---------------------------------------------------------------------- static BOOL __stdcall Internal_EnumEffectsInFileCallback( LPCDIFILEEFFECT pFileEffect, LPVOID pContext ); // ---------------------------------------------------------------------- // Method: Internal_EnumObjectsCallback() // Description: The Internal_EnumObjectsCallback() method is used // internally by the TDx_Input_Library to redirect the // DirectX callback's triggered during the EnumObjects() // method call to a user-configurable OnEnumObjects() // event. // Params: pDeviceObjectInstance - // The DeviceObjectInstance parameter references the // DirectX-supplied DIDEVICEOBJECTINSTANCE structure that is // currently being enumerated. // pContext - // The Context parameter is a user defined value passed to // the calling function and sent to this method during each // enumeration. // ---------------------------------------------------------------------- static BOOL __stdcall Internal_EnumObjectsCallback( LPCDIDEVICEOBJECTINSTANCE pDeviceObjectInstance, LPVOID pContext ); // ---------------------------------------------------------------------- // Internal Interface Access // ---------------------------------------------------------------------- LPDIRECTINPUTDEVICE7 __fastcall FGetInternal_LPDIRECTINPUTDEVICE7(); void __fastcall FSetInternal_LPDIRECTINPUTDEVICE7( LPDIRECTINPUTDEVICE7 pLPDIRECTINPUTDEVICE7 ); LPDIRECTINPUTDEVICE7* __fastcall FGetInternal_LPDIRECTINPUTDEVICE7_Ptr(); LPDIRECTINPUTDEVICE __fastcall FGetInternal_LPDIRECTINPUTDEVICE(); void __fastcall FSetInternal_LPDIRECTINPUTDEVICE( LPDIRECTINPUTDEVICE pLPDIRECTINPUTDEVICE ); LPDIRECTINPUTDEVICE* __fastcall FGetInternal_LPDIRECTINPUTDEVICE_Ptr(); // ---------------------------------------------------------------------- // Property Variables // ---------------------------------------------------------------------- bool fCreated; HRESULT fErrorValue; HANDLE fEventHandle; TDIData* fLastDataFormat; // ---------------------------------------------------------------------- // Interface Variables // ---------------------------------------------------------------------- LPDIRECTINPUTDEVICE7 fLPDIRECTINPUTDEVICE7; LPDIRECTINPUTDEVICE fLPDIRECTINPUTDEVICE; // ---------------------------------------------------------------------- // Event Variables // ---------------------------------------------------------------------- TDx_Event FOnCreate; TDx_Event FOnDestroy; TDx_Event FOnDeviceStateChange; TDx_Error FOnError; // ---------------------------------------------------------------------- // Callback Variables // ---------------------------------------------------------------------- TDx_EnumCreatedEffectObjects FOnEnumCreatedEffectObjects; TDx_EnumEffects FOnEnumEffects; TDx_EnumEffectsInFile FOnEnumEffectsInFile; TDx_EnumObjects FOnEnumObjects; }; // -------------------------------------------------------------------------- #endif // --------------------------------------------------------------------------