Function Prototypes

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

Typedefs


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(* 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 TopicsChangelogvrtree_cppCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API