application

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 7 Imported by: 12

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) NewSystemTray added in v2.3.0

func (a *Application) NewSystemTray(options *options.SystemTray) *SystemTray

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

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
)

type SystemTray added in v2.3.0

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

SystemTray defines a system tray!

func (*SystemTray) Close added in v2.3.0

func (t *SystemTray) Close()

func (*SystemTray) OnLeftClick added in v2.3.0

func (t *SystemTray) OnLeftClick(fn func())

func (*SystemTray) OnLeftDoubleClick added in v2.3.0

func (t *SystemTray) OnLeftDoubleClick(fn func())

func (*SystemTray) OnMenuClose added in v2.3.0

func (t *SystemTray) OnMenuClose(fn func())

func (*SystemTray) OnMenuOpen added in v2.3.0

func (t *SystemTray) OnMenuOpen(fn func())

func (*SystemTray) OnRightClick added in v2.3.0

func (t *SystemTray) OnRightClick(fn func())

func (*SystemTray) OnRightDoubleClick added in v2.3.0

func (t *SystemTray) OnRightDoubleClick(fn func())

func (*SystemTray) Run added in v2.3.0

func (t *SystemTray) Run() error

func (*SystemTray) SetIcons added in v2.3.0

func (t *SystemTray) SetIcons(lightModeIcon *options.SystemTrayIcon, darkModeIcon *options.SystemTrayIcon)

func (*SystemTray) SetMenu added in v2.3.0

func (t *SystemTray) SetMenu(items *menu.Menu)

func (*SystemTray) SetTitle added in v2.3.0

func (t *SystemTray) SetTitle(title string)

func (*SystemTray) SetTooltip added in v2.3.0

func (t *SystemTray) SetTooltip(s string)

func (*SystemTray) Update added in v2.3.0

func (t *SystemTray) Update() error

Jump to

Keyboard shortcuts

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