MAK Legion API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Typedefs | Functions
c_controls.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* C_ControlCallback )(void *usr, ControlHandle *controls, UInt32 count)
 

Functions

LEGIONRUNTIME_DLL ControlHandle legion_controlManager_createControl (ControlManagerHandle manager, ControlType type)
 
LEGIONRUNTIME_DLL UInt32 legion_controlManager_addControl (ControlManagerHandle manager, ControlHandle instance)
 
LEGIONRUNTIME_DLL ControlType legion_controlManager_registerControl (ControlManagerHandle manager, LEG_InteractionsDescriptor *descPtr)
 
LEGIONRUNTIME_DLL ParameterId legion_controlManager_parameterId (ControlManagerHandle manager, ControlType controlType, const char *parameterName)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_getControls (ControlManagerHandle manager, ControlType controlType, ControlHandle **controls, UInt32 *count)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_peekControls (ControlManagerHandle manager, ControlType controlType, ControlHandle **controls, UInt32 *count)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addCallback (ControlManagerHandle manager, ControlType controlType, C_ControlCallback func, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeCallback (ControlManagerHandle manager, ControlType controlType, C_ControlCallback func, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addInterest (ControlManagerHandle manager, ControlType controlType)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeInterest (ControlManagerHandle manager, ControlType controlType)
 
LEGIONRUNTIME_DLL UInt32 legion_control_getType (ControlHandle controlInstance)
 C API to get and set control paramter data Get control data from current frame. More...
 
LEGIONRUNTIME_DLL UInt16 legion_control_getSource (ControlHandle controlInstance)
 C API to get and set control paramter data Get control data from current frame. More...
 
LEGIONRUNTIME_DLL UInt16 legion_control_getTarget (ControlHandle controlInstance)
 C API to get and set control paramter data Get control data from current frame. More...
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setSource (ControlHandle controlInstance, UInt16 source)
 C API to get and set control paramter data Get control data from current frame. More...
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setTarget (ControlHandle controlInstance, UInt16 targe)
 C API to get and set control paramter data Get control data from current frame. More...
 

Typedef Documentation

typedef void(* C_ControlCallback)(void *usr, ControlHandle *controls, UInt32 count)

Control callback function prototype

Function Documentation

LEGIONRUNTIME_DLL UInt16 legion_control_getSource ( ControlHandle  controlInstance)

C API to get and set control paramter data Get control data from current frame.

LEGIONRUNTIME_DLL UInt16 legion_control_getTarget ( ControlHandle  controlInstance)

C API to get and set control paramter data Get control data from current frame.

LEGIONRUNTIME_DLL UInt32 legion_control_getType ( ControlHandle  controlInstance)

C API to get and set control paramter data Get control data from current frame.

LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setSource ( ControlHandle  controlInstance,
UInt16  source 
)

C API to get and set control paramter data Get control data from current frame.

LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setTarget ( ControlHandle  controlInstance,
UInt16  targe 
)

C API to get and set control paramter data Get control data from current frame.

LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addCallback ( ControlManagerHandle  manager,
ControlType  controlType,
C_ControlCallback  func,
void *  usr 
)

Add and register control callback for the specified control type

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
[in]funcA callback function to add
[in]usrUser data of the callback function
See Also
C_ControlCallback
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Referenced by Legion::ControlManager::addControlCallback().

LEGIONRUNTIME_DLL UInt32 legion_controlManager_addControl ( ControlManagerHandle  manager,
ControlHandle  instance 
)

Add a control interaction

Parameters
[in]managerThe handle of control manager
[in]instanceThe control instance to add
Returns
UInt32 Return an index used by Legion platform
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addInterest ( ControlManagerHandle  manager,
ControlType  controlType 
)

Add a control interest

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL ControlHandle legion_controlManager_createControl ( ControlManagerHandle  manager,
ControlType  type 
)

Create a control object

Parameters
[in]managerThe handle of control manager
[in]typeThe control type indentifier
Returns
ControlHandle Return control handle created

Referenced by Legion::ControlManager::createControl().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_getControls ( ControlManagerHandle  manager,
ControlType  controlType,
ControlHandle **  controls,
UInt32 count 
)

Get one type of controls from current frame

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
[out]controlsReturn the input type of controls from current frame
[out]countTotal number of controls returned
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Referenced by Legion::ControlManager::getControls().

LEGIONRUNTIME_DLL ParameterId legion_controlManager_parameterId ( ControlManagerHandle  manager,
ControlType  controlType,
const char *  parameterName 
)

Get parameter id associated with input control type and parameter name

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
[in]paramterNameA paramter name of input control type
Returns
ParameterId Paramter ID of the control type & parameter name
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_peekControls ( ControlManagerHandle  manager,
ControlType  controlType,
ControlHandle **  controls,
UInt32 count 
)

Get one type of controls from next frame

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
[out]controlsReturn the input type of controls from next frame
[out]countTotal number of controls returned
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Referenced by Legion::ControlManager::peekControls().

LEGIONRUNTIME_DLL ControlType legion_controlManager_registerControl ( ControlManagerHandle  manager,
LEG_InteractionsDescriptor descPtr 
)

Register a control interaction descriptor

Parameters
[in]managerThe handle of control manager
[in]descPtrPointer to the interaction descriptor
Returns
ControlType Return an unique identifier of the control registry
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeCallback ( ControlManagerHandle  manager,
ControlType  controlType,
C_ControlCallback  func,
void *  usr 
)

Remove and unregister control callback for the specified control type

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
[in]funcA callback function to remove
[in]usrUser data of the callback function
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Referenced by Legion::ControlManager::removeControlCallback().

LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeInterest ( ControlManagerHandle  manager,
ControlType  controlType 
)

Remove a control interest

Parameters
[in]managerThe handle of control manager
[in]controlTypeAn unique identifier for the control type
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)