Raxol.Terminal.ANSI.WindowManipulation (Raxol v0.2.0)

View Source

Handles window manipulation sequences for the terminal emulator. Supports various window operations including:

  • Window size queries and reports
  • Window position queries and reports
  • Window title manipulation
  • Window icon manipulation
  • Window stacking order

Summary

Functions

Decodes a window manipulation operation from its character code.

Handles a window manipulation operation and returns the updated state and response.

Creates a new window state with default values.

Parses a window manipulation sequence.

Processes a window manipulation sequence and returns the updated state and response.

Types

window_state()

@type window_state() :: %{
  title: String.t(),
  icon_name: String.t(),
  size: {integer(), integer()},
  position: {integer(), integer()},
  stacking_order: :normal | :above | :below
}

Functions

decode_operation(arg1)

@spec decode_operation(integer()) :: atom()

Decodes a window manipulation operation from its character code.

handle_operation(state, atom, title)

@spec handle_operation(window_state(), atom(), [integer()]) ::
  {window_state(), binary()}

Handles a window manipulation operation and returns the updated state and response.

new()

@spec new() :: window_state()

Creates a new window state with default values.

parse_sequence(sequence)

@spec parse_sequence(binary()) :: {:ok, atom(), [integer()]} | :error

Parses a window manipulation sequence.

process_sequence(state, arg)

@spec process_sequence(window_state(), binary()) :: {window_state(), binary()}

Processes a window manipulation sequence and returns the updated state and response.