Top | ![]() |
![]() |
![]() |
![]() |
DzlMenuManager * | menu-manager | Read |
DzlShortcutManager * | shortcut-manager | Read |
DzlThemeManager * | theme-manager | Read |
#define | DZL_APPLICATION_DEFAULT |
#define | DZL_TYPE_APPLICATION |
struct | DzlApplicationClass |
DzlApplication |
DzlApplication is an extension of GtkApplication with extra features to integrate various libdazzle subsystems with your application. We suggest subclassing DzlApplication.
The DzlApplication class provides:
Automatic menu merging including the "app-menu".
Automatic Icon loading based on resources-base-path.
Automatic theme tracking to load CSS variants based on user themes.
The DzlApplication class automatically manages loading alternate CSS based on the active theme by tracking “gtk-theme-name”. Additionally, it supports menu merging including the base "app-menu" as loaded by automatic GResources in “resource-base-path”. It will autom
DzlApplication * dzl_application_new (const gchar *application_id
,GApplicationFlags flags
);
DzlMenuManager *
dzl_application_get_menu_manager (DzlApplication *self
);
Gets the menu manager for the application.
DzlShortcutManager *
dzl_application_get_shortcut_manager (DzlApplication *self
);
Gets the DzlShortcutManager for the application.
DzlThemeManager *
dzl_application_get_theme_manager (DzlApplication *self
);
Get the theme manager for the application.
GMenu * dzl_application_get_menu_by_id (DzlApplication *self
,const gchar *menu_id
);
Similar to gtk_application_get_menu_by_id()
but takes into account
menu merging which could have occurred upon loading plugins.
void dzl_application_add_resources (DzlApplication *self
,const gchar *resource_path
);
This adds resource_path
to the list of "automatic resources".
If resource_path
starts with "resource://", then the corresponding
GResources path will be searched for resources. Otherwise, resource_path
should be a path to a location on disk.
The DzlApplication will locate resources such as CSS themes, icons, and
keyboard shortcuts using resource_path
.
void dzl_application_remove_resources (DzlApplication *self
,const gchar *resource_path
);
This attempts to undo as many side-effects as possible from a call to
dzl_application_add_resources()
.
#define DZL_APPLICATION_DEFAULT (DZL_APPLICATION (g_application_get_default ()))
struct DzlApplicationClass { GtkApplicationClass parent_class; void (*add_resources) (DzlApplication *self, const gchar *resource_path); void (*remove_resources) (DzlApplication *self, const gchar *resource_path); gpointer _reserved1; gpointer _reserved2; gpointer _reserved3; gpointer _reserved4; gpointer _reserved5; gpointer _reserved6; gpointer _reserved7; gpointer _reserved8; };
“shortcut-manager”
property“shortcut-manager” DzlShortcutManager *
Owner: DzlApplication
Flags: Read