Action

data class Action(val id: Int, val label: String, val enabled: Boolean = true, val onClick: (tokenSupplier: () -> String?) -> Unit) : StargateMenuItem(source)

A clickable menu entry with a text label. onClick is invoked on the D-Bus thread with a tokenSupplier that lazily consumes the pending XDG activation token. Call tokenSupplier from the GTK main thread (e.g. inside GLib.idleAdd) to guarantee the token has been set by a concurrent org.kde.StatusNotifierItem.ProvideXdgActivationToken call.

Constructors

Link copied to clipboard
constructor(id: Int, label: String, enabled: Boolean = true, onClick: (tokenSupplier: () -> String?) -> Unit)

Properties

Link copied to clipboard
Link copied to clipboard
open override val id: Int
Link copied to clipboard
Link copied to clipboard
val onClick: (tokenSupplier: () -> String?) -> Unit

Functions

Link copied to clipboard
Link copied to clipboard