desktop

package
v0.244.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package desktop contains the Wails desktop application implementation. The frontend assets are embedded by desktop/main.go (build tag: desktop). This file exists so the package is valid without the desktop build tag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App holds the Wails application state.

func NewApp

func NewApp() *App

NewApp creates a new App instance.

func (*App) AssetsHandler

func (a *App) AssetsHandler() http.Handler

AssetsHandler returns nil — Wails serves embedded assets directly. Kept for compatibility with desktop/main.go.

func (*App) GetServerInfo

func (a *App) GetServerInfo() map[string]string

GetServerInfo exposes the backend URL and token to JavaScript via Wails binding.

func (*App) GetVersion

func (a *App) GetVersion() string

GetVersion returns the current Pando version string.

func (*App) OnDomReady

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

OnDomReady is called by Wails when the DOM is ready. We inject the backend config so the React frontend knows which port and token to use.

func (*App) OpenFileDialog

func (a *App) OpenFileDialog(title string) string

OpenFileDialog opens a native OS file picker dialog.

func (*App) OpenInBrowser

func (a *App) OpenInBrowser(url string)

OpenInBrowser opens the given URL in the system default browser.

func (*App) SaveFileDialog

func (a *App) SaveFileDialog(title, defaultFilename string) string

SaveFileDialog opens a native OS save dialog.

func (*App) SelectDirectory

func (a *App) SelectDirectory() string

SelectDirectory opens a native OS directory picker dialog. Returns the selected path or empty string if cancelled.

func (*App) ShowMessageDialog

func (a *App) ShowMessageDialog(title, message string) string

ShowMessageDialog shows a native OS message dialog and returns the selected button.

func (*App) Shutdown

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

Shutdown is called when the Wails app is closing.

func (*App) Startup

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

Startup is called when the Wails app starts. It initialises the embedded HTTP API server and stores the URL and auth token for later use.

func (*App) WindowMaximise

func (a *App) WindowMaximise()

WindowMaximise maximises the desktop window.

func (*App) WindowMinimise

func (a *App) WindowMinimise()

WindowMinimise minimises the desktop window.

func (*App) WindowSetTitle

func (a *App) WindowSetTitle(title string)

WindowSetTitle sets the desktop window title bar text.

func (*App) WindowToggleMaximise

func (a *App) WindowToggleMaximise()

WindowToggleMaximise toggles between maximised and normal window state.

Jump to

Keyboard shortcuts

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