application

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 6 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application is the main Wails application

func New

func New() *Application

New creates a new Application with the default options

func NewWithOptions

func NewWithOptions(options *options.App) *Application

NewWithOptions creates a new Application with the given options

func (*Application) Bind added in v2.3.0

func (a *Application) Bind(boundStruct any)

Bind the given struct to the application

func (*Application) On added in v2.3.0

func (a *Application) On(eventType EventType, callback func())

func (*Application) Quit

func (a *Application) Quit()

Quit will shut down the application.

Safe to call before Run, or after Run returns early (e.g. CreateApp failed). Without the nil guard, Quit() in those situations dereferences an unset a.application and crashes (#5452).

func (*Application) Run

func (a *Application) Run() error

Run starts the application

func (*Application) SetApplicationMenu

func (a *Application) SetApplicationMenu(appMenu *menu.Menu)

SetApplicationMenu sets the application menu

type EventType added in v2.3.0

type EventType int
const (
	StartUp EventType = iota
	ShutDown
	DomReady
)

Jump to

Keyboard shortcuts

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