Central Guppy runtime server.
Owns view ids, window ownership, native request dispatch, event routing, menu ownership, and cleanup when owners or the native event target exit.
Summary
Functions
Returns a specification to start this module under a supervisor.
Opens a platform directory chooser; see Guppy.choose_directory_dialog/2.
Closes a caller-owned native window.
Activates a caller-owned native window.
Returns the full server state; intended for debugging and tests.
Opens a platform file-open dialog; see Guppy.open_file_dialog/2 for options.
Validates IR and window options and opens a native window owned by owner
(which must be the calling process).
Pings the native bridge through the server.
Reads text from the platform clipboard.
Validates a full IR tree and renders it into a caller-owned window.
Opens a platform save dialog; see Guppy.save_file_dialog/2.
Sets or clears (nil) the app badge; owner must be the calling process.
Validates and installs the Dock menu; owner must be the calling process.
Validates and installs the app menu bar; owner must be the calling process.
Starts the server; :native and :native_server select the bridge implementation.
Returns the native-side open view count.
Writes text to the platform clipboard.
Types
@type state() :: %Guppy.Server{ app_badge_monitor: reference() | nil, app_badge_owner: pid() | nil, app_owner: pid() | nil, app_owner_monitor: reference() | nil, dock_menu_monitor: reference() | nil, dock_menu_owner: pid() | nil, menu_monitor: reference() | nil, menu_owner: pid() | nil, monitors: %{optional(reference()) => pid()}, native: module(), native_request_timeout: timeout(), native_server: GenServer.server(), next_view_id: pos_integer(), owners: %{optional(pid()) => owner_entry()}, views: %{optional(view_id()) => pid()} }
@type view_id() :: pos_integer()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Opens a platform directory chooser; see Guppy.choose_directory_dialog/2.
Closes a caller-owned native window.
Activates a caller-owned native window.
Returns the full server state; intended for debugging and tests.
Opens a platform file-open dialog; see Guppy.open_file_dialog/2 for options.
Validates IR and window options and opens a native window owned by owner
(which must be the calling process).
Pings the native bridge through the server.
Reads text from the platform clipboard.
Validates a full IR tree and renders it into a caller-owned window.
Opens a platform save dialog; see Guppy.save_file_dialog/2.
Sets or clears (nil) the app badge; owner must be the calling process.
Starts the server; :native and :native_server select the bridge implementation.
Returns the native-side open view count.
Writes text to the platform clipboard.