Raxol.Plugins.Manager.Events (Raxol v0.5.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.

Loads a plugin module and initializes it. Delegates to Raxol.Plugins.Manager.Core.load_plugin/2 or /3. Returns {:ok, updated_manager} or {:error, reason}.

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_event/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.

load_plugin(manager, module)

Loads a plugin module and initializes it. Delegates to Raxol.Plugins.Manager.Core.load_plugin/2 or /3. Returns {:ok, updated_manager} or {:error, reason}.

load_plugin(manager, module, config)

new()

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_event/3.

@deprecated "Use handle_mouse_event/3 instead. This function will be removed in a future version."

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.