DBusMenuModel

open class DBusMenuModel(pointer: <Error class: unknown class><<Error class: unknown class>>) : MenuModel

GDBusMenuModel is an implementation of class@Gio.MenuModel that can be used as a proxy for a menu model that is exported over D-Bus with method@Gio.DBusConnection.export_menu_model.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gioDBusMenuModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioMenuModelPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun connectItemsChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (position: Int, removed: Int, added: Int) -> Unit): <Error class: unknown class>

Emitted when a change has occurred to the menu.

Link copied to clipboard
open fun getItemAttributeValue(itemIndex: Int, attribute: String, expectedType: <Error class: unknown class>? = null): <Error class: unknown class>?

Queries the item at position @item_index in @model for the attribute specified by @attribute.

Link copied to clipboard
open fun getItemLink(itemIndex: Int, link: String): MenuModel?

Queries the item at position @item_index in @model for the link specified by @link.

Link copied to clipboard
open fun getNItems(): Int

Query the number of items in @model.

Link copied to clipboard
open fun isMutable(): Boolean

Queries if @model is mutable.

Link copied to clipboard
open fun itemsChanged(position: Int, removed: Int, added: Int)

Requests emission of the #GMenuModel::items-changed signal on @model.

Link copied to clipboard

Creates a #GMenuAttributeIter to iterate over the attributes of the item at position @item_index in @model.

Link copied to clipboard
open fun iterateItemLinks(itemIndex: Int): MenuLinkIter

Creates a #GMenuLinkIter to iterate over the links of the item at position @item_index in @model.