Raxol.Events.EventServer (Raxol v2.0.1)
View SourceUnified event handler consolidating all event processing capabilities.
Replaces fragmented event handlers with a single, coherent system that handles:
- Terminal events (input, output, resize)
- Plugin events (lifecycle, state changes)
- UI events (interactions, updates)
- Accessibility events (focus, navigation)
- Core runtime events (system, performance)
Design Principles
- Single Entry Point: All events flow through this unified handler
- Event Routing: Intelligent routing based on event type and context
- Handler Delegation: Delegates to specialized handlers when needed
- Event Tracing: Built-in event tracing for debugging and monitoring
- Performance: Optimized event processing with minimal overhead
Event Categories
- Terminal Events: Input/output, resize, cursor, buffer operations
- Plugin Events: Installation, activation, lifecycle, errors
- UI Events: Component interactions, theme changes, accessibility
- System Events: Performance metrics, error conditions, state changes
Summary
Functions
Returns a specification to start this module under a supervisor.
Handles accessibility events (focus, navigation, etc.).
Handles any event by routing to appropriate specialized handler.
Legacy compatibility methods for existing code.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Handles plugin events (lifecycle, state changes, etc.).
Handles terminal events (input, output, resize, etc.).
Start the unified event handler.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec handle_accessibility_event(GenServer.server(), atom(), any()) :: handler_result()
Handles accessibility events (focus, navigation, etc.).
@spec handle_event(GenServer.server(), event_type(), event_data()) :: handler_result()
Handles any event by routing to appropriate specialized handler.
Legacy compatibility methods for existing code.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
@spec handle_plugin_event(GenServer.server(), atom(), any()) :: handler_result()
Handles plugin events (lifecycle, state changes, etc.).
@spec handle_terminal_event(GenServer.server(), atom(), any()) :: handler_result()
Handles terminal events (input, output, resize, etc.).
Start the unified event handler.