Per-editor frontend connection and capability state.
The value owns frontend identity, rendering policy, connection handles,
terminal dimensions, capability negotiation, pressure reporting, and input
correlation. Renderer-owned state lives in MingaEditor.State.Render.
Summary
Functions
Accepts frontend capability negotiation.
Begins one native file-dialog request and retains its BEAM-owned origin.
Clears a request whose frontend command was not admitted.
Drops connection-scoped file-dialog ownership without reusing its request id.
Clears connection-scoped native presentation evidence.
Correlates the next committed frame with the latest frontend input.
Builds frontend state from editor startup options.
Records the latest native presentation proven by the connected frontend.
Returns whether this editor emits rendered frames.
Records the frontend's current resource-pressure report.
Records the terminal viewport reported by the active frontend.
Takes the matching file-dialog origin and rejects stale or mismatched results.
Types
@type backend() :: :tui | :gui | :native_gui | :headless
@type file_dialog_request() :: :idle | {:open, file_dialog_request_id()} | {:save_as, file_dialog_request_id(), pid()}
@type file_dialog_request_id() :: 0..4_294_967_295
@type rendering_policy() :: :enabled | :disabled
@type t() :: %MingaEditor.State.Frontend{ backend: backend(), capabilities: MingaEditor.Frontend.Capabilities.t(), file_dialog: file_dialog_request(), last_input_seq: non_neg_integer(), native_presentation: MingaEditor.NativeIPC.NativePresentationObservation.t() | nil, next_file_dialog_request_id: file_dialog_request_id(), port_manager: GenServer.server() | nil, rendering: rendering_policy(), resource_pressure: MingaEditor.State.ResourcePressure.t(), terminal_viewport: MingaEditor.Viewport.t() }
Functions
@spec accept_capabilities(t(), MingaEditor.Frontend.Capabilities.t()) :: t()
Accepts frontend capability negotiation.
@spec begin_file_dialog(t(), :open | {:save_as, pid()}) :: {:ok, file_dialog_request_id(), t()} | {:error, :busy}
Begins one native file-dialog request and retains its BEAM-owned origin.
@spec cancel_file_dialog(t(), file_dialog_request_id()) :: t()
Clears a request whose frontend command was not admitted.
Drops connection-scoped file-dialog ownership without reusing its request id.
Clears connection-scoped native presentation evidence.
@spec correlate_input(t(), non_neg_integer()) :: t()
Correlates the next committed frame with the latest frontend input.
Builds frontend state from editor startup options.
@spec observe_native_presentation( t(), MingaEditor.NativeIPC.NativePresentationObservation.t() ) :: t()
Records the latest native presentation proven by the connected frontend.
Returns whether this editor emits rendered frames.
@spec report_resource_pressure( t(), boolean(), MingaEditor.State.ResourcePressure.thermal_state() ) :: t()
Records the frontend's current resource-pressure report.
@spec resize_terminal(t(), MingaEditor.Viewport.t()) :: t()
Records the terminal viewport reported by the active frontend.
@spec take_file_dialog(t(), file_dialog_request_id()) :: {:ok, file_dialog_request(), t()} | :stale
Takes the matching file-dialog origin and rejects stale or mismatched results.