### Method

# Gio ActionGroup get_action_state

since: 2.28

#### Declaration

    GVariant*
    g_action_group_get_action_state (
      GActionGroup* action_group,
      const gchar* action_name
    )

#### Description

Queries the current state of the named action within `action_group`.

If the action is not stateful then `NULL` will be returned. If the action is stateful then the type of the return value is the type given by g_action_group_get_action_state_type().

The return value (if non-`NULL`) should be freed with `g_variant_unref()` when it is no longer required.

Available since: 2.28

#### Parameters

`action_name`

  Type: `const gchar*`

  The name of the action to query.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `GVariant`

The current state of the action.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.