Behaviour for Elixir-rendered GPUI views.
Views render from assigns, handle native input through handle_event/3, and
receive supervised application updates through handle_info/2 when a caller
uses GPUI.Runtime.send_view/3.
Summary
Types
@type callback_result() :: {:noreply, map()} | {:close, map()} | {:open_window, GPUI.WindowSpec.t(), map()} | {:close_window, GPUI.WindowSpec.key() | pos_integer(), map()}
@type window_event() :: :close_request | :focus | :blur
Callbacks
@callback handle_event(String.t(), map(), map()) :: callback_result()
@callback handle_info(term(), map()) :: callback_result()
@callback handle_window_event(window_event(), map(), map()) :: {:noreply, map()} | {:close, map()}
@callback render(map()) :: GPUI.Element.t()