int func = hw_GetEventHandler(STRPTR name, struct hwTagList *tags);
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:
HWGEHTAG_USERDATA:
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.
NULL