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: (<Error class: unknown class>, <Error class: unknown class>, <Error class: unknown class>) -> Unit): <Error class: unknown class>

Emitted when a change has occurred to the menu.

Link copied to clipboard
open fun getItemAttributeValue(itemIndex: <Error class: unknown class>, 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: <Error class: unknown class>, 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(): <Error class: unknown class>

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: <Error class: unknown class>, removed: <Error class: unknown class>, added: <Error class: unknown class>)

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

Link copied to clipboard
open fun iterateItemAttributes(itemIndex: <Error class: unknown class>): MenuAttributeIter

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: <Error class: unknown class>): MenuLinkIter

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