Subscribes to an event and installs a handler function.
Once your application has subscribed to an event, it will begin receiving notifications
as that event occurs. Notifications occur in the form of calls to the event handler
function you supplied.
aw_event_set is global, in the sense that it applies to all active
instances in your application. Once an event has been subscribed to, all instances
in a multi-instance application may receive the event. To
determine which instance is receiving a particular event, call aw_instance
from within your event handler.
For more information on events and event handlers, see Events.
To unsubscribe from a particular event, call aw_event_set with handler set to 0.
void avatar_add (void)
{
printf ("%s has entered the scene\n", aw_string (AW_AVATAR_NAME));
}
aw_event_set (AW_EVENT_AVATAR_ADD, avatar_add);