MingaEditor.Frontend.Manager.State (Minga v0.1.0)

Copy Markdown View Source

Internal state for the Port Manager GenServer.

Tracks the Zig renderer port, subscribers, readiness, and terminal dimensions.

Summary

Types

Port connection mode.

t()

Types

port_mode()

@type port_mode() :: :spawn | :connected

Port connection mode.

  • :spawn — BEAM is the parent; Port.Manager spawns the GUI as a child process (dev mode, TUI, Burrito).
  • :connected — BEAM is the child; the GUI parent already set up stdin/stdout pipes. Port.Manager connects to fd 0/1 instead of spawning.

t()

@type t() :: %MingaEditor.Frontend.Manager.State{
  capabilities: MingaEditor.Frontend.Capabilities.t(),
  port: port() | nil,
  port_mode: port_mode(),
  ready: boolean(),
  renderer_path: String.t(),
  subscribers: [pid()],
  terminal_size: {width :: pos_integer(), height :: pos_integer()} | nil
}