MAK Legion 1.1 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 LEG_ReturnCode legion_controlManager_createControl (ControlManagerHandle manager, ControlId type, ControlHandle *controlHandle)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addControl (ControlManagerHandle manager, ControlHandle instance, UInt32 *index)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_registerControl (ControlManagerHandle manager, const LEG_InteractionsDescriptor *descPtr, ControlId *controlId)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_parameterId (ControlManagerHandle manager, ControlId controlType, const char *parameterName, ParameterId *out)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_getControls (ControlManagerHandle manager, ControlId controlType, ControlHandle **controls, UInt32 *count)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_peekControls (ControlManagerHandle manager, ControlId controlType, ControlHandle **controls, UInt32 *count)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addCallback (ControlManagerHandle manager, ControlId controlType, C_ControlCallback func, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeCallback (ControlManagerHandle manager, ControlId controlType, C_ControlCallback func, void *usr)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addInterest (ControlManagerHandle manager, ControlId controlType)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeInterest (ControlManagerHandle manager, ControlId controlType)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_getType (ControlHandle controlInstance, ControlId *out)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_getSource (ControlHandle controlInstance, ClientId *out)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_getTarget (ControlHandle controlInstance, ClientId *out)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setSource (ControlHandle controlInstance, ClientId source)
 
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setTarget (ControlHandle controlInstance, ClientId target)
 

Typedef Documentation

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

Control callback function prototype

Function Documentation

LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_getSource ( ControlHandle  controlInstance,
ClientId out 
)

Get source client id of the control

Parameters
[in]controlInstanceThe control instance
[out]clientIdOutput the source cclient id of the control instance
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_getTarget ( ControlHandle  controlInstance,
ClientId out 
)

Get target client id of the control

Parameters
[in]controlInstanceThe control instance
[out]clientIdOutput the source cclient id of the control instance
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_getType ( ControlHandle  controlInstance,
ControlId out 
)

Get the control type of the control instance

Parameters
[in]controlInstanceThe control instance
[out]controlIdOutput the type identifier of the control instance
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setSource ( ControlHandle  controlInstance,
ClientId  source 
)

Set source client id of the control instance

Parameters
[in]controlInstanceThe control instance, both input and output parameter
[in]clientIdThe source client id
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_control_setTarget ( ControlHandle  controlInstance,
ClientId  target 
)

Set target client id of the control instance

Parameters
[in]controlInstanceThe control instance, both input and output parameter
[in]clientIdThe target client id
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addCallback ( ControlManagerHandle  manager,
ControlId  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 LEG_ReturnCode legion_controlManager_addControl ( ControlManagerHandle  manager,
ControlHandle  instance,
UInt32 index 
)

Add a control interaction

Parameters
[in]managerThe handle of control manager
[in]instanceThe control instance to add
[out]indexOutput control index used by Legion platform
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_addInterest ( ControlManagerHandle  manager,
ControlId  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 LEG_ReturnCode legion_controlManager_createControl ( ControlManagerHandle  manager,
ControlId  type,
ControlHandle controlHandle 
)

Create a control object

Parameters
[in]managerThe handle of control manager
[in]typeThe control type indentifier
[out]controlHandleReturn control handle created
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure

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

LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_getControls ( ControlManagerHandle  manager,
ControlId  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 LEG_ReturnCode legion_controlManager_parameterId ( ControlManagerHandle  manager,
ControlId  controlType,
const char *  parameterName,
ParameterId out 
)

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 parameter name of input control type
Returns
ParameterId Parameter ID of the control type & parameter name
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_peekControls ( ControlManagerHandle  manager,
ControlId  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 LEG_ReturnCode legion_controlManager_registerControl ( ControlManagerHandle  manager,
const LEG_InteractionsDescriptor descPtr,
ControlId controlId 
)

Register a control interaction descriptor

Parameters
[in]managerThe handle of control manager
[in]descPtrThe interaction descriptor
[out]controlIdOutput control identifier of the control registry
Returns
LEG_ReturnCode 0 indicates success, non 0 error code indicates failure
LEGIONRUNTIME_DLL LEG_ReturnCode legion_controlManager_removeCallback ( ControlManagerHandle  manager,
ControlId  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,
ControlId  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 Wed May 26 15:17:05 EDT 2021 from SVN revision 229676
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)