The procgame.events submodule contains general purpose classes for passing events around.
class procgame.events.Event(name, object, info)
Describes an event dispatched by EventManager.
Any information associated with the event.
Name of the event.
Object this event is associated with.
Dispatches events to event handlers. Until better documentation is created, it may be helpful to know that this class is strongly influenced by the Cocoa class NSNotificationCenter.
Most users will want to obtain the default instance using default():
add_event_handler(name, handler, object=None)
Handlers take a single parameter, the Event object being posted.
Returns the default (shared) EventManager instance.
post(name, object=None, info=None)
Post an Event with the given properties.
Post the given Event instance. Blocks while the resulting handlers are called.
Remove the given handler.