Raxol.Terminal.Window.Registry (Raxol v0.5.0)
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.
Lists all registered windows.
Registers a new window.
Sets the active window.
Starts the window registry.
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.
@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.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the window registry.
Unregisters a window.
Updates a window's properties.
@spec update_window_state(window_id(), window_state()) :: :ok | {:error, term()}
Updates a window's state.