Raxol.Terminal.Emulator.Window (Raxol v0.3.0)

View Source

Handles window management for the terminal emulator. Provides functions for window state, manipulation, and properties.

Summary

Functions

Deiconifies the window. Returns {:ok, updated_emulator}.

Gets the current window state. Returns the window state.

Iconifies the window. Returns {:ok, updated_emulator}.

Maximizes the window. Returns {:ok, updated_emulator}.

Restores the window from maximized state. Returns {:ok, updated_emulator}.

Sets the window icon name. Returns {:ok, updated_emulator}.

Sets the window position. Returns {:ok, updated_emulator}.

Sets the window size. Returns {:ok, updated_emulator}.

Sets the window stacking order. Returns {:ok, updated_emulator}.

Sets the window title. Returns {:ok, updated_emulator}.

Functions

deiconify(emulator)

@spec deiconify(Raxol.Terminal.Emulator.t()) :: {:ok, Raxol.Terminal.Emulator.t()}

Deiconifies the window. Returns {:ok, updated_emulator}.

get_state(emulator)

@spec get_state(Raxol.Terminal.Emulator.t()) :: map()

Gets the current window state. Returns the window state.

iconify(emulator)

Iconifies the window. Returns {:ok, updated_emulator}.

maximize(emulator)

Maximizes the window. Returns {:ok, updated_emulator}.

restore(emulator)

Restores the window from maximized state. Returns {:ok, updated_emulator}.

set_icon_name(emulator, name)

@spec set_icon_name(Raxol.Terminal.Emulator.t(), String.t()) ::
  {:ok, Raxol.Terminal.Emulator.t()}

Sets the window icon name. Returns {:ok, updated_emulator}.

set_position(emulator, x, y)

Sets the window position. Returns {:ok, updated_emulator}.

set_size(emulator, width, height)

Sets the window size. Returns {:ok, updated_emulator}.

set_stacking_order(emulator, order)

@spec set_stacking_order(
  Raxol.Terminal.Emulator.t(),
  :normal | :maximized | :iconified
) ::
  {:ok, Raxol.Terminal.Emulator.t()}

Sets the window stacking order. Returns {:ok, updated_emulator}.

set_title(emulator, title)

Sets the window title. Returns {:ok, updated_emulator}.