HudManager

HudManager — Manage data exported to HUD for the application

Stability Level

Stable, unless otherwise indicated

Functions

Properties

gchar * app-id Read / Write / Construct Only
GApplication * application Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── HudManager

Includes

#include <libhud/manager.h>

Description

Applications that are exporting data to the HUD can export data for every window or context in the application. This includes application internal structures like tabs or views on the various data inside the application. The HUD manager allows for registering and managing all the actions that are exported to the HUD for the application.

Functions

hud_manager_new ()

HudManager *
hud_manager_new (const gchar *application_id);

Creates a new HudManager object.

Parameters

application_id

Unique identifier of the application, usually desktop file name

 

Returns

New HudManager.

[transfer full]


hud_manager_new_for_application ()

HudManager *
hud_manager_new_for_application (GApplication *application);

Creates a new HudManager object using the application ID in th application object. Also exports the default actions there in the "app" namespace.

Parameters

application

GApplication that we can use to get the ID and some actions from

 

Returns

New HudManager.

[transfer full]


hud_manager_add_actions ()

void
hud_manager_add_actions (HudManager *manager,
                         HudActionPublisher *pub);

Sets up a set of actions and descriptions for a specific user context. This could be a window or a tab, depending on how the application works.

Parameters

manager

A HudManager object

 

pub

Action publisher object tracking the descriptions and action groups

 

hud_manager_remove_actions ()

void
hud_manager_remove_actions (HudManager *manager,
                            HudActionPublisher *pub);

Removes actions for being watched by the HUD. Should be done when the object is remove. Does not require pub to be a valid object so it can be used with weak pointer style destroy.

Parameters

manager

A HudManager object

 

pub

Action publisher object tracking the descriptions and action groups

 

hud_manager_switch_window_context ()

void
hud_manager_switch_window_context (HudManager *manager,
                                   HudActionPublisher *pub);

Tells the HUD service that a window should use a different context of actions with the current window. This allows the application to export sets of actions and switch them easily with a single dbus message.

Parameters

manager

A HudManager object

 

pub

Action publisher object tracking the descriptions and action groups

 

Types and Values

HUD_MANAGER_PROP_APPLICATION

#define HUD_MANAGER_PROP_APPLICATION  "application"

Define for the string to lookup HudManager:application.


HUD_MANAGER_PROP_APP_ID

#define HUD_MANAGER_PROP_APP_ID       "app-id"

Define for the string to lookup HudManager:app-id.


struct HudManagerClass

struct HudManagerClass {
	GObjectClass parent_class;
};

Class data for HudManager

Members


struct HudManager

struct HudManager;

Instance data for the HUD Manager object. This object tracks the information exported to the HUD for a specific application.

Property Details

The “app-id” property

  “app-id”                   gchar *

A unique identifier for the application. Usually this aligns with the desktop file name or package name of the app.

Flags: Read / Write / Construct Only

Default value: NULL


The “application” property

  “application”              GApplication *

GApplication object.

Flags: Read / Write / Construct Only