desktop

package
v0.504.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package desktop contains the Wails desktop application wrapper for Pando. It renders the Pando web UI inside a native WebView window instead of opening an external browser. The desktop binary is compiled separately and embedded into the main pando binary via go:embed in embed_binary.go.

Index

Constants

This section is empty.

Variables

View Source
var DesktopBinary []byte

DesktopBinary is the embedded pre-compiled pando-desktop binary for non-macOS builds. Populated by running `make desktop-embed`.

View Source
var DesktopBundle embed.FS

Functions

func Launch added in v0.267.0

func Launch(embedBin []byte, pandoURL string, simpleMode bool) error

Launch starts the desktop wrapper and blocks until the desktop window exits.

Resolution order:

  1. A pando-desktop wrapper shipped on disk next to the running executable (packaged .app/.pkg installs) — launched in place, preserving its signature & notarization.
  2. On macOS, an embedded Pando.app bundle extracted to a temp dir.
  3. The raw embedBin bytes (the compiled pando-desktop produced by `make desktop-embed`) extracted to a temp dir.

embedBin may be nil/empty when the wrapper is shipped on disk instead of embedded.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App holds the Wails desktop application state.

func NewApp

func NewApp(pandoURL string, startSimple bool) *App

NewApp creates a new desktop App that wraps the given Pando URL in a WebView.

func (*App) GetPandoURL added in v0.267.0

func (a *App) GetPandoURL() string

GetPandoURL returns the configured Pando URL. Exposed as Wails binding.

func (*App) IsSimpleMode added in v0.267.0

func (a *App) IsSimpleMode() bool

IsSimpleMode returns whether simple mode is active. Exposed as Wails binding.

func (*App) OnDomReady

func (a *App) OnDomReady(ctx context.Context)

OnDomReady is called by Wails when the DOM is ready. We navigate the webview to the Pando URL.

func (*App) SetWindowFocused added in v0.267.0

func (a *App) SetWindowFocused(focused bool)

SetWindowFocused is called from JavaScript when the window gains or loses focus. This controls whether OS notifications are shown. Exposed as Wails binding.

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context)

Shutdown is called by Wails when the application is closing.

func (*App) Startup

func (a *App) Startup(ctx context.Context)

Startup is called by Wails when the application starts.

func (*App) ToggleWindow added in v0.267.0

func (a *App) ToggleWindow()

ToggleWindow shows the window if hidden, hides it if visible. Exposed as Wails binding.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL