from panda3d.core import EventHandler
A class to monitor events from the C++ side of things. It maintains a set of “hooks”, function pointers assigned to event names, and calls the appropriate hooks when the matching event is detected.
This class is not necessary when the hooks are detected and processed entirely by the scripting language, e.g. via Scheme hooks or the messenger in Python.
getFuture(event_name: str) → AsyncFuture¶
Returns a pending future that will be marked as done when the event is next fired.
getGlobalEventHandler(queue: EventQueue) → EventHandler¶
Returns a pointer to the one global
EventHandlerobject. If the global object has not yet been created, this will create it.
processEvents() → None¶
The main processing loop of the
EventHandler. This function must be called periodically to service events. Walks through each pending event and calls its assigned hooks.