Raxol.Terminal.Window.Registry (Raxol v2.0.1)
View SourceRegistry for managing multiple terminal windows.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets the active window.
Gets a window by ID.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Lists all registered windows.
Registers a new window.
Sets the active window.
Unregisters a window.
Updates a window's properties.
Updates a window's state.
Types
@type window_id() :: String.t()
@type window_state() :: :active | :inactive | :minimized | :maximized
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_active_window() :: {:ok, Raxol.Terminal.Window.t()} | {:error, term()}
Gets the active window.
@spec get_window(window_id()) :: {:ok, Raxol.Terminal.Window.t()} | {:error, term()}
Gets a window by ID.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
@spec list_windows() :: {:ok, [Raxol.Terminal.Window.t()]}
Lists all registered windows.
@spec register_window(Raxol.Terminal.Window.t()) :: {:ok, window_id()} | {:error, term()}
Registers a new window.
Sets the active window.
Unregisters a window.
Updates a window's properties.
@spec update_window_state(window_id(), window_state()) :: :ok | {:error, term()}
Updates a window's state.