HudGtkManager

HudGtkManager — Work with a GtkApplication to easily export action groups

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <libhud-gtk/manager.h>

struct              HudGtkManagerClass;
HudGtkManager *     hud_gtk_manager_new                 (GtkApplication *app);
HudActionPublisher * hud_gtk_manager_get_publisher      (HudGtkManager *manager,
                                                         GVariant *id);

Description

A helper class HudGtkManager to work with GtkApplication and automatically export the base action group "app." along with the window action groups typically "win.". These can then have HudActionDescription objects used to describe them without having to worry about creating and managing the GActionGroup's.

Details

struct HudGtkManagerClass

struct HudGtkManagerClass {
	HudManagerClass parent_class;
};

Class data for HudGtkManager.

HudManagerClass parent_class;

HudManagerClass

hud_gtk_manager_new ()

HudGtkManager *     hud_gtk_manager_new                 (GtkApplication *app);

Creates a HudGtkManager object that is connected to the app so that new windows get tracked and their actions automatically added to so the HUD can access them.

From the GtkApplication passed as app any GtkApplicationWindow added to the application will also be added as a potential target ("win") for actions. For example, if a GtkApplicationWindow features an action "fullscreen" then action descriptions can speak of "win.fullscreen".

app must have no windows at the time that this function is called.

app :

A GtkApplication object

Returns :

A new HudGtkManager object. [transfer full]

hud_gtk_manager_get_publisher ()

HudActionPublisher * hud_gtk_manager_get_publisher      (HudGtkManager *manager,
                                                         GVariant *id);

Finds or creates a publisher for the specific GtkApplicationWindow that is referenced by id. This can be used to add descriptions on the publisher or additional action groups as needed.

manager :

A HudGtkManager object

id :

ID of the item to find the publisher for

Returns :

A HudActionPublisher for the window. [transfer none]