DBusMenuModel

gio.DBusMenuModel is an implementation of gio.MenuModel that can be used as a proxy for a menu model that is exported over D-Bus with g_dbus_connection_export_menu_model().

Constructors

this
this(GDBusMenuModel* gDBusMenuModel, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(DBusConnection connection, string busName, string objectPath)

Members

Functions

getDBusMenuModelStruct
GDBusMenuModel* getDBusMenuModelStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

get
DBusMenuModel get(DBusConnection connection, string busName, string objectPath)

Obtains a gio.DBusMenuModel for the menu model which is exported at the given bus_name and object_path.

getType
GType getType()

Variables

gDBusMenuModel
GDBusMenuModel* gDBusMenuModel;

the main Gtk struct

Inherited Members

From MenuModel

gMenuModel
GMenuModel* gMenuModel;

the main Gtk struct

getMenuModelStruct
GMenuModel* getMenuModelStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getItemAttributeValue
Variant getItemAttributeValue(int itemIndex, string attribute, VariantType expectedType)

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

getItemLink
MenuModel getItemLink(int itemIndex, string link)

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

getNItems
int getNItems()

Query the number of items in model.

isMutable
bool isMutable()

Queries if model is mutable.

itemsChanged
void itemsChanged(int position, int removed, int added)

Requests emission of the items-changed signal on model.

iterateItemAttributes
MenuAttributeIter iterateItemAttributes(int itemIndex)

Creates a gio.MenuAttributeIter to iterate over the attributes of the item at position item_index in model.

iterateItemLinks
MenuLinkIter iterateItemLinks(int itemIndex)

Creates a gio.MenuLinkIter to iterate over the links of the item at position item_index in model.

addOnItemsChanged
gulong addOnItemsChanged(void delegate(int, int, int, MenuModel) dlg, ConnectFlags connectFlags)

Emitted when a change has occured to the menu.