C.47. $world->hook


$world->hook function: connects a 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 function 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: