Raxol.Plugins.Manager.Events (Raxol v0.4.0)

View Source

Handles plugin event processing. Provides functions for processing various types of events through plugins.

Summary

Functions

Broadcasts an event to all enabled plugins. Returns {:ok, updated_manager} or {:error, reason}.

Processes a mouse event through all enabled plugins, providing cell context. Plugins can choose to halt propagation if they handle the event. Returns {:ok, updated_manager, :propagate | :halt} or {:error, reason}. Delegates to Raxol.Plugins.EventHandler.handle_mouse_event/3.

Notifies all enabled plugins of a terminal resize event. Delegates to Raxol.Plugins.EventHandler.handle_resize/3.

Processes input through all enabled plugins. Delegates to Raxol.Plugins.EventHandler.handle_input/2.

Processes mouse events through all enabled plugins. Delegates to Raxol.Plugins.EventHandler.handle_mouse_legacy/3.

Processes output through all enabled plugins. Returns {:ok, manager, transformed_output} if a plugin transforms the output, or {:ok, manager} if no transformation is needed. Delegates to Raxol.Plugins.EventHandler.handle_output/2.

Functions

broadcast_event(manager, event)

Broadcasts an event to all enabled plugins. Returns {:ok, updated_manager} or {:error, reason}.

handle_mouse_event(manager, event, rendered_cells)

Processes a mouse event through all enabled plugins, providing cell context. Plugins can choose to halt propagation if they handle the event. Returns {:ok, updated_manager, :propagate | :halt} or {:error, reason}. Delegates to Raxol.Plugins.EventHandler.handle_mouse_event/3.

handle_resize(manager, width, height)

Notifies all enabled plugins of a terminal resize event. Delegates to Raxol.Plugins.EventHandler.handle_resize/3.

process_input(manager, input)

Processes input through all enabled plugins. Delegates to Raxol.Plugins.EventHandler.handle_input/2.

process_mouse(manager, event, emulator_state)

Processes mouse events through all enabled plugins. Delegates to Raxol.Plugins.EventHandler.handle_mouse_legacy/3.

process_output(manager, output)

Processes output through all enabled plugins. Returns {:ok, manager, transformed_output} if a plugin transforms the output, or {:ok, manager} if no transformation is needed. Delegates to Raxol.Plugins.EventHandler.handle_output/2.