src/pmc/eventhandler.pmc - a handler for events
A PMC that captures the state of the interpreter to invoke when handling an Event.
Initializes an empty
Add attributes to it if you want it to do anything.
void init_pmc(PMC *data)
Initializes a new EventHandler with either a
Sub PMC (or descendant) or a
With the latter,
the keys should be any or all of:
Marks this PMC and any of its contents as live.
void set_string(STRING *type)
type attribute of this event handler to the passed-in string.
type attribute of this event handler.
void set_integer_native(INTVAL priority)
Sets the minimum interesting priority for this event handler.
void set_pmc(PMC *interpreter)
Sets the passed-in
ParrotInterpreter as the active interpreter in which to handle the registered events.
PMC *get_attr_str(STRING *name)
opcode_t *invoke(void *next)
Runs the contained code, if any; this is what handles the event.
METHOD can_handle(PMC *event)
Report whether the event handler can handle a particular type of event.