Systray package is now a full core.Service with typed IPC messages. Menu item clicks emit ActionTrayMenuItemClicked via IPC. Co-Authored-By: Virgil <virgil@lethean.io>
30 lines
894 B
Go
30 lines
894 B
Go
package systray
|
|
|
|
// QueryConfig requests this service's config section from the display orchestrator.
|
|
// Result: map[string]any
|
|
type QueryConfig struct{}
|
|
|
|
// --- Tasks ---
|
|
|
|
// TaskSetTrayIcon sets the tray icon.
|
|
type TaskSetTrayIcon struct{ Data []byte }
|
|
|
|
// TaskSetTrayMenu sets the tray menu items.
|
|
type TaskSetTrayMenu struct{ Items []TrayMenuItem }
|
|
|
|
// TaskShowPanel shows the tray panel window.
|
|
type TaskShowPanel struct{}
|
|
|
|
// TaskHidePanel hides the tray panel window.
|
|
type TaskHidePanel struct{}
|
|
|
|
// TaskSaveConfig persists this service's config section via the display orchestrator.
|
|
type TaskSaveConfig struct{ Value map[string]any }
|
|
|
|
// --- Actions ---
|
|
|
|
// ActionTrayClicked is broadcast when the tray icon is clicked.
|
|
type ActionTrayClicked struct{}
|
|
|
|
// ActionTrayMenuItemClicked is broadcast when a tray menu item is clicked.
|
|
type ActionTrayMenuItemClicked struct{ ActionID string }
|