Raxol.Terminal.Window.Manager.Operations (Raxol v2.0.1)
View SourceOperations module for window management functionality. Handles all the complex logic for window creation, updates, and hierarchy management.
Summary
Functions
Creates a child window.
Creates a window with configuration.
Destroys a window by ID.
Gets the active window.
Gets child windows for a parent.
Gets the parent window for a child.
Gets a window by ID with proper error handling.
Lists all windows.
Sets the active window.
Updates a window property.
Types
@type window_id() :: String.t()
@type window_state() :: :active | :inactive | :minimized | :maximized
Functions
@spec create_child_window(window_id(), Raxol.Terminal.Config.t()) :: {:ok, Raxol.Terminal.Window.t()} | {:error, :not_found}
Creates a child window.
@spec create_window_with_config(Raxol.Terminal.Config.t()) :: {:ok, Raxol.Terminal.Window.t()} | {:error, term()}
Creates a window with configuration.
@spec destroy_window_by_id(window_id()) :: :ok | {:error, :not_found}
Destroys a window by ID.
@spec get_active_window() :: {:ok, Raxol.Terminal.Window.t()} | {:error, :not_found}
Gets the active window.
@spec get_child_windows(window_id()) :: {:ok, [Raxol.Terminal.Window.t()]} | {:error, :not_found}
Gets child windows for a parent.
@spec get_parent_window(window_id()) :: {:ok, Raxol.Terminal.Window.t()} | {:error, :no_parent}
Gets the parent window for a child.
@spec get_window_by_id(window_id()) :: {:ok, Raxol.Terminal.Window.t()} | {:error, :not_found}
Gets a window by ID with proper error handling.
@spec list_all_windows() :: {:ok, [Raxol.Terminal.Window.t()]}
Lists all windows.
@spec set_active_window(window_id()) :: :ok | {:error, :not_found}
Sets the active window.
@spec update_window_property(window_id(), atom(), any()) :: {:ok, Raxol.Terminal.Window.t()} | {:error, :not_found}
Updates a window property.