mini_arcade_core.bus ==================== .. py:module:: mini_arcade_core.bus .. autoapi-nested-parse:: Event bus module. Attributes ---------- .. autoapisummary:: mini_arcade_core.bus.event_bus Classes ------- .. autoapisummary:: mini_arcade_core.bus.EventBus Module Contents --------------- .. py:class:: EventBus Simple event bus for managing event subscriptions and emissions. .. py:method:: on(event_type: str, handler: Callable) Subscribe a handler to an event type. :param event_type: The type of event to subscribe to. :type event_type: str :param handler: The handler function to call when the event is emitted. :type handler: Callable .. py:method:: emit(event_type: str, **kwargs) Emit an event of a given type, calling all subscribed handlers. :param event_type: The type of event to emit. :type event_type: str :param kwargs: Additional keyword arguments to pass to handlers. .. py:method:: clear() Clear all subscribers from the event bus. .. py:data:: event_bus