Display boundary for rendered GPUI session snapshots and native input events.
Displays own renderer-specific lifecycle and resources. Application sessions
remain renderer-independent. Runtime and remote-client boundaries validate
callback return values and convert raised or exited callbacks into structured
:display_callback_failed errors.
Summary
Functions
Runs work asynchronously and replies to the original GenServer caller.
Waits until a display has rendered the requested window frame.
Waits for a frame generation newer than the supplied token.
Returns the current rendered-frame generation for a display window.
Drains pending native or test events from a display module.
Injects one event into a display's pending event queue.
Returns bounded optional presentation support advertised by a display.
Replies to a caller after the selected display frame completes.
Delegates a frame API call to a display and replies asynchronously.
Starts a display module and normalizes its startup result.
Synchronizes a renderer-independent snapshot through a display module.
Types
@type event() :: map()
@type snapshot() :: GPUI.Snapshot.t()
Callbacks
@callback await_frame(GenServer.server(), pos_integer(), pos_integer()) :: :ok | {:error, term()}
@callback await_frame_after( GenServer.server(), pos_integer(), non_neg_integer(), pos_integer() ) :: :ok | {:error, term()}
@callback drain_events(GenServer.server()) :: {:ok, [event()]} | {:error, term()}
@callback frame_token(GenServer.server(), pos_integer()) :: {:ok, non_neg_integer()} | {:error, term()}
@callback inject_event(GenServer.server(), map()) :: {:ok, term()} | {:error, term()}
@callback presentation_capabilities(GenServer.server()) :: {:ok, [GPUI.Schema.Extension.Support.t()]} | {:error, term()}
@callback start_link(keyword()) :: GenServer.on_start()
@callback sync(GenServer.server(), snapshot()) :: :ok | {:error, term()}
Functions
@spec async_reply(GenServer.from(), (-> term()), (term() -> term())) :: :ok
Runs work asynchronously and replies to the original GenServer caller.
@spec call_await_frame(GenServer.server(), pos_integer(), pos_integer()) :: :ok | {:error, term()}
Waits until a display has rendered the requested window frame.
@spec call_await_frame_after( GenServer.server(), pos_integer(), non_neg_integer(), pos_integer() ) :: :ok | {:error, term()}
Waits for a frame generation newer than the supplied token.
@spec call_frame_token(GenServer.server(), pos_integer()) :: {:ok, non_neg_integer()} | {:error, term()}
Returns the current rendered-frame generation for a display window.
@spec drain(module(), GenServer.server()) :: {:ok, [event()]} | {:error, term()}
Drains pending native or test events from a display module.
@spec inject(module(), GenServer.server(), event()) :: {:ok, term()} | {:error, term()}
Injects one event into a display's pending event queue.
@spec presentation_capabilities(module(), GenServer.server()) :: {:ok, [GPUI.Schema.Extension.Support.t()]} | {:error, term()}
Returns bounded optional presentation support advertised by a display.
@spec reply_after_frame( module(), GenServer.server(), pos_integer(), pos_integer(), GenServer.from() ) :: :ok
Replies to a caller after the selected display frame completes.
@spec reply_from_display( module(), GenServer.server(), atom(), [term()], GenServer.from() ) :: :ok
Delegates a frame API call to a display and replies asynchronously.
Starts a display module and normalizes its startup result.
@spec sync_snapshot(module(), GenServer.server(), snapshot()) :: :ok | {:error, term()}
Synchronizes a renderer-independent snapshot through a display module.