hw_GetEventHandler -- get information about event handler (V6.1)
int func = hw_GetEventHandler(STRPTR name, struct hwTagList *tags);
This function can be used to obtain information about an event handler registered using hw_RegisterEventHandler() or hw_RegisterEventHandlerEx(). Precisely, hw_GetEventHandler() can be used to get the reference to the user function and data associated with the event handler by calling Hollywood's InstallEventHandler() function.

If the script currently doesn't listen to the event handler, i.e. the script didn't install a callback for this event using InstallEventHandler(), hw_GetEventHandler() will return -1. Otherwise, a reference value is returned which can be used to obtain the callback function from the Lua registry.

Additionally, you can pass a tag list containing the following tags:

Set the pData of this tag to a pointer to an int and hw_GetEventHandler() will store the reference to the user data associated with this event handler in this pointer. If there is no user data associated with the event handler, hw_GetEventHandler() will write -1 to the pointer.

Designer compatibility

name of the event type; must be identical to the name passed tohw_RegisterEventHandler() or hw_RegisterEventHandlerEx()
tag list containing further options or NULL
reference to user callback function for this event handler or -1

Show TOC