Callbacks

ClientTypeHandler (newitem, parent, client, *user_data)

menuitem_about_to_show_cb (mi, *user_data)

menuitem_buildvariant_slot_t (mi, properties)

Details

Dbusmenu.ClientTypeHandler(newitem, parent, client, *user_data)
Parameters:
Return type:

bool

The type handler is called when a dbusmenu item is created with a matching type as setup in Dbusmenu.Client.add_type_handler

Return value: True if the type has been handled. False if this function was somehow unable to handle it.

Dbusmenu.menuitem_about_to_show_cb(mi, *user_data)
Parameters:

Callback prototype for a callback that is called when the menu should be shown.

Dbusmenu.menuitem_buildvariant_slot_t(mi, properties)
Parameters:
  • mi (Dbusmenu.Menuitem) – Menu item that should be built from

  • properties (str or None) – A list of properties that should be the only ones in the resulting variant structure

Returns:

A variant representing this item and its children

Return type:

GLib.Variant

This is the function that is called to represent this menu item as a variant. Should call its own children.