Raxol.Terminal.Window.UnifiedWindow (Raxol v0.5.0)
View SourceUnified window management system for the Raxol Terminal Emulator. Handles window creation, manipulation, state management, and ANSI sequence processing.
Summary
Functions
Returns a specification to start this module under a supervisor.
Cleans up the window manager.
Closes a window and its children.
Creates a new window with the given options.
Gets the active window ID.
Gets the state of a window.
Moves a window to the specified position.
Resizes a window to the specified dimensions.
Sets the active window.
Sets the window icon name.
Maximizes or restores a window.
Sets the window's stacking order.
Sets the window title.
Splits an existing window in the specified direction.
Starts the window manager with optional configuration.
Updates the window manager configuration.
Types
@type t() :: %Raxol.Terminal.Window.UnifiedWindow{ active_window: window_id() | nil, config: map(), next_id: non_neg_integer(), windows: %{required(window_id()) => window_state()} }
@type window_id() :: String.t()
@type window_state() :: %{ id: window_id(), title: String.t(), icon_name: String.t(), size: {non_neg_integer(), non_neg_integer()}, position: {non_neg_integer(), non_neg_integer()}, stacking_order: :normal | :above | :below, iconified: boolean(), maximized: boolean(), previous_size: {non_neg_integer(), non_neg_integer()} | nil, split_type: :none | :horizontal | :vertical, parent_id: window_id() | nil, children: [window_id()], buffer_id: String.t(), renderer_id: String.t() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Cleans up the window manager.
Closes a window and its children.
Creates a new window with the given options.
@spec get_active_window() :: window_id() | nil
Gets the active window ID.
@spec get_window_state(window_id()) :: {:ok, window_state()} | {:error, String.t()}
Gets the state of a window.
@spec move(window_id(), non_neg_integer(), non_neg_integer()) :: :ok | {:error, String.t()}
Moves a window to the specified position.
@spec resize(window_id(), non_neg_integer(), non_neg_integer()) :: :ok | {:error, String.t()}
Resizes a window to the specified dimensions.
Sets the active window.
Sets the window icon name.
Maximizes or restores a window.
Sets the window's stacking order.
Sets the window title.
@spec split_window(window_id(), :horizontal | :vertical) :: {:ok, window_id()} | {:error, String.t()}
Splits an existing window in the specified direction.
@spec start_link(map()) :: GenServer.on_start()
Starts the window manager with optional configuration.
@spec update_config(map()) :: :ok
Updates the window manager configuration.