Gio.ActionMap
Description: Reference for Gio.ActionMap

### Interface

# GioActionMap

since: 2.32

#### Description

    interface Gio.ActionMap : GObject.Object

`GActionMap` is an interface for action containers.

The `GActionMap` interface is implemented by `GActionGroup` implementations that operate by containing a number of named `GAction` instances, such as `GSimpleActionGroup`.

One useful application of this interface is to map the names of actions from various action groups to unique, prefixed names (e.g. by prepending “app.” or “win.”). This is the motivation for the ‘Map’ part of the interface name.

Available since: 2.32

#### Prerequisite

In order to implement ActionMap, your type must inherit from`GObject`.

#### Implementations

- GApplication
- GSimpleActionGroup

#### Instance methods

###### g_action_map_add_action

Adds an action to the `action_map`.

since: 2.32

###### g_action_map_add_action_entries

A convenience function for creating multiple `GSimpleAction` instances and adding them to a `GActionMap`.

since: 2.32

###### g_action_map_lookup_action

Looks up the action with the name `action_name` in `action_map`.

since: 2.32

###### g_action_map_remove_action

Removes the named action from the action map.

since: 2.32

###### g_action_map_remove_action_entries

Remove actions from a `GActionMap`. This is meant as the reverse of g_action_map_add_action_entries().

since: 2.78

#### Interface structure

    struct GioActionMapInterface {
      GTypeInterface g_iface;
      GAction* (* lookup_action) (
        GActionMap* action_map,
        const gchar* action_name
      );
      void (* add_action) (
        GActionMap* action_map,
        GAction* action
      );
      void (* remove_action) (
        GActionMap* action_map,
        const gchar* action_name
      );

    }

The virtual function table for `GActionMap`.

###### Interface members

`g_iface` |
    GTypeInterface
| No description available.
`lookup_action` |
    GAction* (* lookup_action) (
        GActionMap* action_map,
        const gchar* action_name
      )
| The virtual function pointer for `g_action_map_lookup_action()`
`add_action` |
    void (* add_action) (
        GActionMap* action_map,
        GAction* action
      )
| The virtual function pointer for `g_action_map_add_action()`
`remove_action` |
    void (* remove_action) (
        GActionMap* action_map,
        const gchar* action_name
      )
| The virtual function pointer for `g_action_map_remove_action()`

#### Virtual methods

###### Gio.ActionMap.add_action

Adds an action to the `action_map`.

since: 2.32

###### Gio.ActionMap.lookup_action

Looks up the action with the name `action_name` in `action_map`.

since: 2.32

###### Gio.ActionMap.remove_action

Removes the named action from the action map.

since: 2.32