Owns committed, active, and explicitly discarded text-presentation leases.
Summary
Functions
Retains acknowledged presentation candidates without changing visibility.
Retains every presentation carried by one acknowledged pipeline output.
Marks an acknowledged presentation active only when its exact lease exists.
Drops only the exact candidate named by the frontend lifecycle event.
Resolves input only against the presentation currently declared visible.
Types
@type key() :: {MingaEditor.Window.id(), pos_integer()}
@type t() :: %MingaEditor.Renderer.TextPresentations{ index: MingaEditor.Renderer.TextInteractionIndex.t(), leases: %{optional(key()) => MingaEditor.Renderer.TextPresentation.t()} }
Functions
@spec acknowledge(t(), [MingaEditor.Renderer.TextPresentation.t()]) :: t()
Retains acknowledged presentation candidates without changing visibility.
@spec acknowledge_output(t(), MingaEditor.RenderPipeline.Input.t()) :: t()
Retains every presentation carried by one acknowledged pipeline output.
@spec activate(t(), MingaEditor.Window.id(), non_neg_integer()) :: {:ok, t()} | {:error, :unknown}
Marks an acknowledged presentation active only when its exact lease exists.
@spec discard(t(), MingaEditor.Window.id(), non_neg_integer()) :: t()
Drops only the exact candidate named by the frontend lifecycle event.
@spec new() :: t()
@spec reader(t()) :: MingaEditor.Renderer.TextInteractionIndex.Reader.t()
@spec resolve(t(), MingaEditor.Mouse.TextEvent.t()) :: {:ok, MingaEditor.Mouse.Target.Text.t()} | {:error, :inactive | atom()}
Resolves input only against the presentation currently declared visible.