GPUI.Test.Display (gpui v0.2.0-rc.1)

Copy Markdown View Source

Deterministic in-memory display for session and runtime tests.

The display records synchronized snapshots and queues injected events without starting the native renderer. Pass owner: self() to receive each sync as {:gpui_snapshot, snapshot}.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the most recently synchronized snapshot.

Returns synchronized snapshots in chronological order.

Types

state()

@type state() :: %{
  events: [map()],
  snapshots: [GPUI.Snapshot.t()],
  owner: pid() | nil
}

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

latest_snapshot(display)

@spec latest_snapshot(Agent.agent()) :: GPUI.Snapshot.t() | nil

Returns the most recently synchronized snapshot.

snapshots(display)

@spec snapshots(Agent.agent()) :: [GPUI.Snapshot.t()]

Returns synchronized snapshots in chronological order.