Raxol.Core.Runtime.Events.Dispatcher (Raxol v0.2.0)
View SourceManages the application state (model) and dispatches events to the application's
update/2
function. It also handles commands returned by update/2
.
Summary
Functions
Broadcasts an event payload to all subscribers of a topic.
Returns a specification to start this module under a supervisor.
Dispatches an event to the appropriate handler based on event type and target.
Handles an application-level event and updates the application state.
Processes a system-level event that affects the runtime itself rather than the application logic.
Subscribes the calling process to a specific event topic.
Unsubscribes the calling process from a specific event topic.
Functions
Broadcasts an event payload to all subscribers of a topic.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Dispatches an event to the appropriate handler based on event type and target.
Returns {:ok, updated_state}
if the event was successfully handled,
or {:error, reason, state}
if something went wrong.
Handles an application-level event and updates the application state.
This is typically used for user interaction events like keyboard or mouse input.
Processes a system-level event that affects the runtime itself rather than the application logic.
Examples include terminal resize events, focus events, or quit requests.
Subscribes the calling process to a specific event topic.
Unsubscribes the calling process from a specific event topic.