Function Prototypes

Defines the function prototypes used for registering callbacks with the API.

Typedefs


void(* EventGestureFunc)(int code, HNode user, void *userData)

Signature of a function that is called when a key code is changed (for event observers)

Parameters
code

key code

user

user node copied from the __User LUA register

userData

arbitrary user data that was provided when registering the callback


void(* EventKeyFunc)(int code, int state, HNode user, void *userData)

Signature of a function that is called when a key state is changed (for event observers)

Parameters
code

key code

code

key state

user

user node copied from the __User LUA register

userData

arbitrary user data that was provided when registering the callback


void(* EventNodeFunc)(HNode node, HNode user, void *userData)

Signature of a function that is called when a node state is changed (for event observers)

Parameters
node

node which state is changed

user

user node copied from the __User LUA register

userData

arbitrary user data that was provided when registering the callback


void(* EventTwoNodesFunc)(HNode node, HNode other, void *userData)

Signature of a function that is called when two nodes interact (for event observers)

Parameters
node

node which state is changed

other

interacting node copied from the __Other LUA register

userData

arbitrary user data that was provided when registering the callback


void(* EventTwoNodesUserFunc)(HNode node, HNode other, HNode user, void *userData)

Signature of a function that is called when two nodes interact (for event observers)

Parameters
node

node which state is changed

other

interacting node copied from the __Other LUA register

user

user node copied from the __User LUA register

userData

arbitrary user data that was provided when registering the callback


HFFIVar(* FFIFunc)(int argc, HFFIVar *argv, void *userData)

Signature of a function that is exposed to the Lua environment.


void(* MigrationAddFunc)(HMigration m)

Signature of a function that receives a new migration handle and should use it to register other callbacks.

Parameters
m

handle to a migration


int(* MigrationDownFunc)(HMigration m, HMeta meta)

Signature of a function that should perform a downgrade on a metanode.

Parameters
m

the migration that owns this downgradfe function

meta

the metanode that should be modified as part of the downgrade

Returns

should return zero on success


HNode(* MigrationDowngradeFunc)(HMigration m, HNode node)

Signature of a function that should perform a downgrade on a node instance.

Parameters
m

the migration that owns this upgrade function

node

the node instance to downgrade

Returns

a node handle representing the new, downgraded node instance


void(* MigrationFunc)(HNode node, void *userData)

Signature of a function that is called at the end of a nodes migration calls.

Parameters
node

the node that you are migrating

userData

arbitrary user data that was provided when registering the callback


int(* MigrationUpFunc)(HMigration m, HMeta meta)

Signature of a function that should perform an upgrade on a metanode.

Parameters
m

the migration that owns this upgrade function

meta

the metanode that should be modified as part of the upgrade

Returns

should return zero on success


HNode(* MigrationUpgradeFunc)(HMigration m, HNode node)

Signature of a function that should perform an upgrade on a node instance, e.g. by modifying property values.

Parameters
m

the migration that owns this upgrade function

node

the node instance to upgrade

Returns

a node handle representing the new, upgraded node instance


void(* NodeChildAddedFunc)(HNode parent, HNode child, void *userData)

Signature of a function that is called when a child is added to a node.

Parameters
parent

the parent node

child

the child that is being added to the parent

userData

arbitrary user data that was provided when registering the callback


void(* NodeChildRemovedFunc)(HNode parent, HNode child, void *userData)

Signature of a function that is called when a child is removed from a node.

Parameters
parent

the parent node

child

the child that was removed from the parent

userData

arbitrary user data that was provided when registering the callback


void(* NodeCreatedFunc)(HNode node, void *userData)

Signature of a function that is called when a node is created.

Parameters
node

the node that was created

userData

arbitrary user data that was provided when registering the callback


void(* NodeDestroyingFunc)(HNode node, void *userData)

Signature of a function that is called when a node is about to be deleted.

Parameters
node

the node that is about the be deleted

userData

arbitrary user data that was provided when registering the callback


void(* NodeParentChangedFunc)(HNode node, HNode newParent, HNode oldParent, void *userData)

Signature of a function that is called when a node is moved to a new parent.

Parameters
node

the node that was moved

newParent

the new parent of the node

oldParent

the old parent that the node was moved from

userData

arbitrary user data that was provided when registering the callback


void(* NodeRenamedFunc)(HNode node, void *userData)

Signature of a function that is called when a node is renamed.

Parameters
node

the node that was created

userData

arbitrary user data that was provided when registering the callback


void(* NodeValuesChangedFunc)(HNode node, void *userData)

Signature of a function that is called when properties on a node are changed.

Parameters
node

the node that was modified

userData

arbitrary user data that was provided when registering the callback


void(* ScriptEventFunc)(void *userData)

Signature of a function that is called in response to a registered script event.

Parameters
userData

arbitrary user data that was provided when registering the callback


void(* SettingChangedFunc)(const char *path, void *userData)

Signature of a function that is called when a setting is changed.

Parameters
path

the path to the setting from the root of the settings hierarchy

userData

arbitrary user data that was provided when registering the callback


void(* UpdateFunc)(double deltaTime, void *userData)

Signature of a function that is called every frame.

Parameters
deltaTime

the time (in seconds) since the last frame

userData

arbitrary user data that was provided when registering the callback

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtreevrtree_cppvtCoreCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API