class StatusNotifierTray
Swift
final class StatusNotifierTray
System tray host: owns org.kde.StatusNotifierWatcher and surfaces items
for a panel strip.
Pair of PanelMenu for global menus. The heavy lifting is in canvas
(StatusNotifierHost); this is the Swift view-model — poll, rebuild a
list of TrayItems with uploaded textures, and forward clicks.
Sources/LavaUI/StatusNotifier.swift:11
Constructors
init(editor: Editor)
Not documented.
Sources/LavaUI/StatusNotifier.swift:36
Properties
var isServing: Bool { get set }
Not documented.
Sources/LavaUI/StatusNotifier.swift:33
var items: [TrayItem] { get set }
Not documented.
Sources/LavaUI/StatusNotifier.swift:34
var openMenuKey: String? { get set }
The item whose menu is open, and its contents.
One at a time: a tray menu is a popup, and the pointer that opens a second one closed the first.
Sources/LavaUI/StatusNotifier.swift:114
Methods
func aboutToShow(_ id: MenuID)
"This submenu is about to open" — applets are allowed to fill one only when asked.
Sources/LavaUI/StatusNotifier.swift:146
@discardableResult func activate(_ item: TrayItem) -> Bool
A left click.
Activate when the item implements it, and its menu when it does not
— which is not a fallback but the normal case: everything built on
libappindicator (nm-applet, most GTK applets) implements no methods at
all and publishes a Menu object instead. Calling Activate on one of
those is a message to nobody, which is exactly what clicking the icon
used to do.
Returns true when a menu was opened, so the caller can show it.
Sources/LavaUI/StatusNotifier.swift:95
func activateMenuItem(_ id: MenuID)
Runs an item in the applet that owns it.
Sources/LavaUI/StatusNotifier.swift:139
func closeMenu()
Not documented.
Sources/LavaUI/StatusNotifier.swift:131
@discardableResult func contextMenu(_ item: TrayItem) -> Bool
A right click: the menu if there is one, ContextMenu otherwise —
some applets implement the call and export nothing to render.
Sources/LavaUI/StatusNotifier.swift:104
@discardableResult func openMenu(_ item: TrayItem) -> Bool
Not documented.
Sources/LavaUI/StatusNotifier.swift:119
@discardableResult func poll() -> Bool
Pump D-Bus and rebuild items when something changed.
Sources/LavaUI/StatusNotifier.swift:53
func scroll(_ item: TrayItem, delta: Int32)
Not documented.
Sources/LavaUI/StatusNotifier.swift:158
Types
StatusNotifierTray.TrayItem struct