TermUI.Runtime.State (TermUI v0.2.0)

View Source

State struct for the Runtime GenServer.

Contains all runtime state including:

  • Root component module and state
  • Component registry
  • Message queue
  • Render configuration
  • Focus tracking
  • Shutdown status

Summary

Types

command_entry()

@type command_entry() :: %{component_id: atom(), command: term()}

component_entry()

@type component_entry() :: %{module: module(), state: term()}

t()

@type t() :: %TermUI.Runtime.State{
  buffer_manager: pid() | nil,
  components: %{required(atom()) => component_entry()},
  dimensions: {pos_integer(), pos_integer()} | nil,
  dirty: boolean(),
  focused_component: atom(),
  input_reader: pid() | nil,
  message_queue: TermUI.MessageQueue.t(),
  pending_commands: %{required(reference()) => command_entry()},
  render_interval: pos_integer(),
  root_module: module(),
  root_state: term(),
  shutting_down: boolean(),
  terminal_started: boolean()
}