parrotcode: a handler for events | |
Contents | PMCs |
src/pmc/eventhandler.pmc - a handler for events
A PMC that captures the state of the interpreter to invoke when handling an Event.
void init()
EventHandler
.
Add attributes to it if you want it to do anything.
void init_pmc(PMC *data)
Sub
PMC (or descendant) or a Hash
PMC.
With the latter,
the keys should be any or all of:
code
Sub
(or descendant) PMC containing code to invoke when handling the event
interp
ParrotInterpreter
PMC in which to invoke the code PMC
type
priority
void mark()
void destroy()
void set_string(STRING *type)
type
attribute of this event handler to the passed-in string.
STRING *get_string()
type
attribute of this event handler.
void set_integer_native(INTVAL priority)
void set_pmc(PMC *interpreter)
ParrotInterpreter
as the active interpreter in which to handle the registered events.
PMC *get_attr_str(STRING *name)
opcode_t *invoke(void *next)
METHOD can_handle(PMC *event)
|