C.46. $world->hook

void $world->hook( event , action , [attributes] );

void $world->hook( event , number , [action] , [attributes] );

A hook is an action that is connected to an event, such as connecting to the World or the window receiving focus. This functions allow you to define a hook for a given event, that will execute action, or to edit the hook identifyed by number.

Here are the events currently supported:

atributes is a reference to a hash defining attributes for the hook. Generally the call works like this:


$world->hook("event", "action", { attribute1 => value1,
                                  attribute2 => value2, ... })

Possible attributes: