Documentation
¶
Overview ¶
Package systray is a thin wrapper over fyne.io/systray that places the application in the OS system tray with clickable menu items, giving the desktop build parity with native apps (for example, surfacing alarms from a tray menu).
fyne.io/systray exposes a package-level, singleton API; Tray collects the ready hook and menu items behind a small object so a host can configure the tray, then drive its event loop with Run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tray ¶
type Tray struct {
// contains filtered or unexported fields
}
Tray wraps the fyne.io/systray package-level API. The zero value is not usable; construct one with New.
func (*Tray) AddItem ¶
AddItem adds a clickable menu item. onClick is invoked every time the item is selected, on a goroutine that ranges over the item's click channel; the goroutine exits when the tray shuts down and the channel is closed.
func (*Tray) OnReady ¶
func (t *Tray) OnReady(fn func())
OnReady registers a callback invoked once, when the tray is initialised and ready. Icon and menu-item calls should be made from within it (or after it has fired).