GtefActionInfoStore: Gtef 2 Reference Manual

## GtefActionInfoStore GtefActionInfoStore — A store of GtefActionInfo's |

## Functions

GtefActionInfoStore * | gtef_action_info_store_new ()
GtkApplication * | gtef_action_info_store_get_application ()
void | gtef_action_info_store_add ()
void | gtef_action_info_store_add_entries ()
const GtefActionInfo * | gtef_action_info_store_lookup ()

## Properties

GtkApplication * | application | Read / Write / Construct Only

## Types and Values

| GtefActionInfoStore

## Object Hierarchy

        GObject
        ╰── GtefActionInfoStore

## Includes

    #include <gtef/gtef.h>

## Description

GtefActionInfoStore contains a set of GtefActionInfo's.

A GtkApplication can be associated so that when a GtefActionInfo is added, `gtk_application_set_accels_for_action()` is called. See `gtef_action_info_store_add()` for more details.

GtefActionInfoStore is add-only, a GtefActionInfo cannot be removed. If needed, the remove operation will be added in the future.

## Functions

### gtef_action_info_store_new ()

    GtefActionInfoStore *
    gtef_action_info_store_new (GtkApplication *application);

Creates a new GtefActionInfoStore object. Associating a GtkApplication is optional.

#### Parameters

application | a GtkApplication, or `NULL`. | [nullable]

#### Returns

a new GtefActionInfoStore.

Since: 2.0

### gtef_action_info_store_get_application ()

    GtkApplication *
    gtef_action_info_store_get_application
                                   (GtefActionInfoStore *store);

#### Parameters

store | a GtefActionInfoStore. |

#### Returns

the associated GtkApplication, or `NULL`.

[transfer none][nullable]

### gtef_action_info_store_add ()

    void
    gtef_action_info_store_add (GtefActionInfoStore *store,
                                const GtefActionInfo *info);

Inserts a copy of `info` to `store` . The `store` must not already contain a GtefActionInfo with the same action name.

If “application” is non-`NULL`, this function also calls `gtk_application_set_accels_for_action()` with the accelerators returned by `gtef_action_info_get_accels()` (this will erase previously set accelerators, if any).

#### Parameters

store | a GtefActionInfoStore. |
info | a GtefActionInfo. |

Since: 2.0

### gtef_action_info_store_add_entries ()

    void
    gtef_action_info_store_add_entries (GtefActionInfoStore *store,
                                        const GtefActionInfoEntry *entries,
                                        gint n_entries,
                                        const gchar *translation_domain);

Calls `gtef_action_info_store_add()` for each entry.

If `translation_domain` is not `NULL`, `g_dgettext()` is used to translate the `label` and `tooltip` of each entry before setting them to the GtefActionInfo.

An API similar to `g_action_map_add_action_entries()`.

#### Parameters

store | a GtefActionInfoStore. |
entries | a pointer to the first item in an array of GtefActionInfoEntry structs. | [array length=n_entries][element-type GtefActionInfoEntry]
n_entries | the length of `entries` , or -1 if `entries` is `NULL`-terminated. |
translation_domain | a gettext domain, or `NULL`. | [nullable]

Since: 2.0

### gtef_action_info_store_lookup ()

    const GtefActionInfo *
    gtef_action_info_store_lookup (GtefActionInfoStore *store,
                                   const gchar *action_name);

#### Parameters

store | a GtefActionInfoStore. |
action_name | an action name. |

#### Returns

the found GtefActionInfo, or `NULL`.

[transfer none]

Since: 2.0

## Types and Values

### GtefActionInfoStore

    typedef struct _GtefActionInfoStore GtefActionInfoStore;

## Property Details

### The `“application”` property

      “application”              GtkApplication *

The associated GtkApplication. GtefActionInfoStore has a weak reference to the GtkApplication.

Flags: Read / Write / Construct Only

Since: 2.0

## See Also

GtefActionInfo, GtefApplication