tray

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Icon added in v0.3.6

func Icon() []byte

Icon returns the application icon as a 32×32 ICO file. fyne.io/systray on Windows uses LoadImage(LR_LOADFROMFILE, IMAGE_ICON) which only accepts ICO format — PNG bytes are silently ignored.

Types

type Controller

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

Controller manages the system tray state and exposes status for UI. The actual systray integration is Windows-specific and will use platform-specific build tags. This controller is the shared logic.

func NewController

func NewController(bus *events.Bus, s *store.Store, onQuit func()) *Controller

NewController creates a tray controller.

func (*Controller) GetStatus

func (c *Controller) GetStatus() Status

GetStatus returns the current companion status.

func (*Controller) StatusLine

func (c *Controller) StatusLine() string

StatusLine returns a one-line summary for the tray tooltip.

type Status

type Status struct {
	PlayerHandle string
	CurrentShip  string
	Location     string
	Jurisdiction string
	EventCount   int
	Connected    bool
	LastEvent    time.Time
}

Status holds the current companion app status for display.

Jump to

Keyboard shortcuts

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