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 ¶
- type App
- func (a *App) AssetsHandler() http.Handler
- func (a *App) GetServerInfo() map[string]string
- func (a *App) GetVersion() string
- func (a *App) OnDomReady(ctx context.Context)
- func (a *App) OpenFileDialog(title string) string
- func (a *App) OpenInBrowser(url string)
- func (a *App) SaveFileDialog(title, defaultFilename string) string
- func (a *App) SelectDirectory() string
- func (a *App) ShowMessageDialog(title, message string) string
- func (a *App) Shutdown(ctx context.Context)
- func (a *App) Startup(ctx context.Context)
- func (a *App) WindowMaximise()
- func (a *App) WindowMinimise()
- func (a *App) WindowSetTitle(title string)
- func (a *App) WindowToggleMaximise()
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 (*App) AssetsHandler ¶
AssetsHandler returns nil — Wails serves embedded assets directly. Kept for compatibility with desktop/main.go.
func (*App) GetServerInfo ¶
GetServerInfo exposes the backend URL and token to JavaScript via Wails binding.
func (*App) GetVersion ¶
GetVersion returns the current Pando version string.
func (*App) OnDomReady ¶
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 ¶
OpenFileDialog opens a native OS file picker dialog.
func (*App) OpenInBrowser ¶
OpenInBrowser opens the given URL in the system default browser.
func (*App) SaveFileDialog ¶
SaveFileDialog opens a native OS save dialog.
func (*App) SelectDirectory ¶
SelectDirectory opens a native OS directory picker dialog. Returns the selected path or empty string if cancelled.
func (*App) ShowMessageDialog ¶
ShowMessageDialog shows a native OS message dialog and returns the selected button.
func (*App) Startup ¶
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 ¶
WindowSetTitle sets the desktop window title bar text.
func (*App) WindowToggleMaximise ¶
func (a *App) WindowToggleMaximise()
WindowToggleMaximise toggles between maximised and normal window state.