OrpheuRegisterHook

Hooks a function

Syntax

native OrpheuHook:OrpheuRegisterHook(OrpheuFunction:function,const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) /** * Unregisters a hook (stops it) * * @param hook A handler to the hook */ native OrpheuUnregisterHook(OrpheuHook:hook) /** * Calls a function without triggering its hooks * * @param function A handler to the function * @param any The arguments of the function */ native OrpheuCall(OrpheuFunction:function,any:...) /** * Calls a function and triggers its hooks * * @param function A handler to the function * @param any The arguments of the function */ native OrpheuCallSuper(OrpheuFunction:function,any:...) /** * Gets the return value of a function (To be used in hooks Post) * * @param any In case the value is multi cell (string or vector), an holder to receive them by ref * @return In case the value is uni cell, the value itself

Usage

function A handler to the function
hookFunctionName The function name in the plugin that shall be called upon interception of the original function
phase The phase of the hook. It can have two values. Pre means "right before the original function is called". Post means "right after the original function is called"

Return

A — handler to the hook

Defined in orpheu.inc at line 29 . This documentation was automatically generated from source.