Gtk.Actionable
Description: Reference for Gtk.Actionable

### Interface

# GtkActionable

since: 4.0

#### Description [src]

    interface Gtk.Actionable : Gtk.Widget

The `GtkActionable` interface provides a convenient way of associating widgets with actions.

It primarily consists of two properties: `GtkActionable:action-name` and `GtkActionable:action-target`. There are also some convenience APIs for setting these properties.

The action will be looked up in action groups that are found among the widgets ancestors. Most commonly, these will be the actions with the “win.” or “app.” prefix that are associated with the `GtkApplicationWindow` or `GtkApplication`, but other action groups that are added with `gtk_widget_insert_action_group()` will be consulted as well.

Available since: 4.0

#### Prerequisite

In order to implement Actionable, your type must inherit from`GtkWidget`.

#### Implementations

- GtkButton
- GtkCheckButton
- GtkLinkButton
- GtkListBoxRow
- GtkLockButton
- GtkSwitch
- GtkToggleButton

#### Instance methods

###### gtk_actionable_get_action_name

Gets the action name for `actionable`.

since: 4.0

###### gtk_actionable_get_action_target_value

Gets the current target value of `actionable`.

since: 4.0

###### gtk_actionable_set_action_name

Specifies the name of the action with which this widget should be associated.

since: 4.0

###### gtk_actionable_set_action_target

Sets the target of an actionable widget.

since: 4.0

###### gtk_actionable_set_action_target_value

Sets the target value of an actionable widget.

since: 4.0

###### gtk_actionable_set_detailed_action_name

Sets the action-name and associated string target value of an actionable widget.

since: 4.0

#### Properties

###### Gtk.Actionable:action-name

No description available.

since: 4.0

###### Gtk.Actionable:action-target

No description available.

since: 4.0

#### Interface structure

    struct GtkActionableInterface {
      const char* (* get_action_name) (
        GtkActionable* actionable
      );
      void (* set_action_name) (
        GtkActionable* actionable,
        const char* action_name
      );
      GVariant* (* get_action_target_value) (
        GtkActionable* actionable
      );
      void (* set_action_target_value) (
        GtkActionable* actionable,
        GVariant* target_value
      );

    }

The interface vtable for `GtkActionable`.

###### Interface members

`get_action_name` |
    const char* (* get_action_name) (
        GtkActionable* actionable
      )
| No description available.
`set_action_name` |
    void (* set_action_name) (
        GtkActionable* actionable,
        const char* action_name
      )
| No description available.
`get_action_target_value` |
    GVariant* (* get_action_target_value) (
        GtkActionable* actionable
      )
| No description available.
`set_action_target_value` |
    void (* set_action_target_value) (
        GtkActionable* actionable,
        GVariant* target_value
      )
| No description available.

#### Virtual methods

###### Gtk.Actionable.get_action_name

Gets the action name for `actionable`.

since: 4.0

###### Gtk.Actionable.get_action_target_value

Gets the current target value of `actionable`.

since: 4.0

###### Gtk.Actionable.set_action_name

Specifies the name of the action with which this widget should be associated.

since: 4.0

###### Gtk.Actionable.set_action_target_value

Sets the target value of an actionable widget.

since: 4.0