TermUI.Terminal.State (TermUI v0.2.0)

View Source

Terminal state structure tracking raw mode status, original settings, and active features (mouse tracking, bracketed paste, alternate screen).

Summary

Functions

Creates a new terminal state with default values.

Creates a new terminal state with the given size.

Types

t()

@type t() :: %TermUI.Terminal.State{
  alternate_screen_active: boolean(),
  bracketed_paste: boolean(),
  cursor_visible: boolean(),
  focus_events: boolean(),
  mouse_tracking: :off | :x10 | :normal | :button | :all,
  original_settings: term() | nil,
  raw_mode_active: boolean(),
  resize_callbacks: [pid()],
  size: {rows :: pos_integer(), cols :: pos_integer()} | nil
}

Functions

new()

@spec new() :: t()

Creates a new terminal state with default values.

new(rows, cols)

@spec new(pos_integer(), pos_integer()) :: t()

Creates a new terminal state with the given size.