HudMenuModelCollector

HudMenuModelCollector — a HudSource that collects HudItems from GMenuModel

Synopsis

                    HudMenuModelCollector;
HudMenuModelCollector * hud_menu_model_collector_get    (BamfWindow *window,
                                                         const gchar *desktop_file,
                                                         const gchar *icon);

Object Hierarchy

  GObject
   +----HudMenuModelCollector

Implemented Interfaces

HudMenuModelCollector implements HudSource.

Description

The HudMenuModelCollector collects menu items from the menus associated with a window exported from an application using GMenuModel. Activations are performed using GActionGroup in the usual way.

The GMenuModel is acquired using GDBusMenuModel according to the properties set on the BamfWindow which must be passed to hud_menu_model_collector_get().

Details

HudMenuModelCollector

typedef struct _HudMenuModelCollector HudMenuModelCollector;

This is an opaque structure type.


hud_menu_model_collector_get ()

HudMenuModelCollector * hud_menu_model_collector_get    (BamfWindow *window,
                                                         const gchar *desktop_file,
                                                         const gchar *icon);

If the given window has GMenuModel-style menus then returns a collector for them, otherwise returns NULL.

desktop_file is used for usage tracking.

window :

a BamfWindow

desktop_file :

the desktop file of the application of window

icon :

the application icon's name

Returns :

a HudMenuModelCollector, or NULL