## DzlShortcutManager

DzlShortcutManager

## Functions

DzlShortcutManager * | dzl_shortcut_manager_get_default ()
void | dzl_shortcut_manager_queue_reload ()
void | dzl_shortcut_manager_reload ()
void | dzl_shortcut_manager_append_search_path ()
void | dzl_shortcut_manager_prepend_search_path ()
void | dzl_shortcut_manager_remove_search_path ()
DzlShortcutTheme * | dzl_shortcut_manager_get_theme ()
void | dzl_shortcut_manager_set_theme ()
const gchar * | dzl_shortcut_manager_get_theme_name ()
void | dzl_shortcut_manager_set_theme_name ()
DzlShortcutTheme * | dzl_shortcut_manager_get_theme_by_name ()
gboolean | dzl_shortcut_manager_handle_event ()
const gchar * | dzl_shortcut_manager_get_user_dir ()
void | dzl_shortcut_manager_set_user_dir ()
void | dzl_shortcut_manager_add_action ()
void | dzl_shortcut_manager_add_command ()
void | dzl_shortcut_manager_add_shortcut_entries ()
void | dzl_shortcut_manager_add_shortcuts_to_window ()

## Properties

DzlShortcutTheme * | theme | Read / Write
char * | theme-name | Read / Write
char * | user-dir | Read / Write

## Signals

void | changed | Run Last

## Types and Values

#define | DZL_TYPE_SHORTCUT_MANAGER
struct | DzlShortcutManagerClass
| DzlShortcutManager

## Object Hierarchy

        GObject
        ╰── DzlShortcutManager

## Implemented Interfaces

DzlShortcutManager implements GInitable and GListModel.

## Description

## Functions

### dzl_shortcut_manager_get_default ()

    DzlShortcutManager *
    dzl_shortcut_manager_get_default (void);

Gets the singleton DzlShortcutManager for the process.

#### Returns

An DzlShortcutManager.

[transfer none][not nullable]

### dzl_shortcut_manager_queue_reload ()

    void
    dzl_shortcut_manager_queue_reload (DzlShortcutManager *self);

### dzl_shortcut_manager_reload ()

    void
    dzl_shortcut_manager_reload (DzlShortcutManager *self,
                                 GCancellable *cancellable);

### dzl_shortcut_manager_append_search_path ()

    void
    dzl_shortcut_manager_append_search_path
                                   (DzlShortcutManager *self,
                                    const gchar *directory);

### dzl_shortcut_manager_prepend_search_path ()

    void
    dzl_shortcut_manager_prepend_search_path
                                   (DzlShortcutManager *self,
                                    const gchar *directory);

### dzl_shortcut_manager_remove_search_path ()

    void
    dzl_shortcut_manager_remove_search_path
                                   (DzlShortcutManager *self,
                                    const gchar *directory);

### dzl_shortcut_manager_get_theme ()

    DzlShortcutTheme *
    dzl_shortcut_manager_get_theme (DzlShortcutManager *self);

Gets the "theme" property.

#### Parameters

self | A DzlShortcutManager or `NULL`. | [nullable]

#### Returns

An DzlShortcutTheme.

[transfer none][not nullable]

### dzl_shortcut_manager_set_theme ()

    void
    dzl_shortcut_manager_set_theme (DzlShortcutManager *self,
                                    DzlShortcutTheme *theme);

Sets the theme for the shortcut manager.

#### Parameters

self | An DzlShortcutManager |
theme | An DzlShortcutTheme. | [not nullable]

### dzl_shortcut_manager_get_theme_name ()

    const gchar *
    dzl_shortcut_manager_get_theme_name (DzlShortcutManager *self);

### dzl_shortcut_manager_set_theme_name ()

    void
    dzl_shortcut_manager_set_theme_name (DzlShortcutManager *self,
                                         const gchar *theme_name);

### dzl_shortcut_manager_get_theme_by_name ()

    DzlShortcutTheme *
    dzl_shortcut_manager_get_theme_by_name
                                   (DzlShortcutManager *self,
                                    const gchar *theme_name);

Locates a theme by the name of the theme.

If `theme_name` is `NULL`, then the internal theme is used. You probably dont need to use that as it is used by various controllers to hook up their default actions.

#### Parameters

self | a DzlShortcutManager |
theme_name | the name of a theme or `NULL` of the internal theme. | [nullable]

#### Returns

A DzlShortcutTheme or `NULL`.

[transfer none][nullable]

### dzl_shortcut_manager_handle_event ()

    gboolean
    dzl_shortcut_manager_handle_event (DzlShortcutManager *self,
                                       const GdkEventKey *event,
                                       GtkWidget *toplevel);

This function will try to dispatch `event` to the proper widget and DzlShortcutContext. If the event is handled, then `TRUE` is returned.

You should call this from “key-press-event” handler in your GtkWindow toplevel.

#### Parameters

self | An DzlShortcutManager. | [nullable]
toplevel | A GtkWidget or `NULL`. |
event | A GdkEventKey event to handle. |

#### Returns

`TRUE` if the event was handled.

### dzl_shortcut_manager_get_user_dir ()

    const gchar *
    dzl_shortcut_manager_get_user_dir (DzlShortcutManager *self);

### dzl_shortcut_manager_set_user_dir ()

    void
    dzl_shortcut_manager_set_user_dir (DzlShortcutManager *self,
                                       const gchar *user_dir);

### dzl_shortcut_manager_add_action ()

    void
    dzl_shortcut_manager_add_action (DzlShortcutManager *self,
                                     const gchar *detailed_action_name,
                                     const gchar *section,
                                     const gchar *group,
                                     const gchar *title,
                                     const gchar *subtitle);

### dzl_shortcut_manager_add_command ()

    void
    dzl_shortcut_manager_add_command (DzlShortcutManager *self,
                                      const gchar *command,
                                      const gchar *section,
                                      const gchar *group,
                                      const gchar *title,
                                      const gchar *subtitle);

### dzl_shortcut_manager_add_shortcut_entries ()

    void
    dzl_shortcut_manager_add_shortcut_entries
                                   (DzlShortcutManager *self,
                                    const DzlShortcutEntry *shortcuts,
                                    guint n_shortcuts,
                                    const gchar *translation_domain);

This method will add `shortcuts` to the DzlShortcutManager.

This provides a simple way for widgets to add their shortcuts to the manager so that they may be overriden by themes or the end user.

#### Parameters

self | a DzlShortcutManager or `NULL` for the default. | [nullable]
shortcuts | shortcuts to add. | [array length=n_shortcuts]
n_shortcuts | the number of entries in `shortcuts` |
translation_domain | the gettext domain to use for translations. | [nullable]

### dzl_shortcut_manager_add_shortcuts_to_window ()

    void
    dzl_shortcut_manager_add_shortcuts_to_window
                                   (DzlShortcutManager *self,
                                    DzlShortcutsWindow *window);

Adds shortcuts registered with the DzlShortcutManager to the DzlShortcutsWindow.

#### Parameters

self | A DzlShortcutManager |
window | A DzlShortcutsWindow |

## Types and Values

### DZL_TYPE_SHORTCUT_MANAGER

    #define DZL_TYPE_SHORTCUT_MANAGER (dzl_shortcut_manager_get_type())

### struct DzlShortcutManagerClass

    struct DzlShortcutManagerClass {
      GObjectClass parent_instance;

      gpointer _reserved1;
      gpointer _reserved2;
      gpointer _reserved3;
      gpointer _reserved4;
      gpointer _reserved5;
      gpointer _reserved6;
      gpointer _reserved7;
      gpointer _reserved8;
    };

### DzlShortcutManager

    typedef struct _DzlShortcutManager DzlShortcutManager;

## Property Details

### The `“theme”` property

      “theme”                    DzlShortcutTheme *

The current key theme.

Owner: DzlShortcutManager

Flags: Read / Write

### The `“theme-name”` property

      “theme-name”               char *

The name of the current theme.

Owner: DzlShortcutManager

Flags: Read / Write

Default value: NULL

### The `“user-dir”` property

      “user-dir”                 char *

The directory for saved user modifications.

Owner: DzlShortcutManager

Flags: Read / Write

Default value: NULL

## Signal Details

### The `“changed”` signal

    void
    user_function (DzlShortcutManager *dzlshortcutmanager,
                   gpointer            user_data)

Flags: Run Last