### Method

# Gio Action get_state

since: 2.28

#### Declaration [src]

    GVariant*
    g_action_get_state (
      GAction* action
    )

#### Description [src]

Queries the current state of `action`.

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_get_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

Gets property | `Gio.Action:state`

#### Return value

Type: `GVariant`

The current state of the action.

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