Gio.ActionGroup.prototype.get_action_state_type

function get_action_state_type(action_name: String): GLib.VariantType {
    // Gjs wrapper for g_action_group_get_action_state_type()
}
  

Queries the type of the state of the named action within action_group.

If the action is stateful then this function returns the GLib.VariantType of the state. All calls to Gio.ActionGroup.prototype.change_action_state must give a GLib.Variant of this type and Gio.ActionGroup.prototype.get_action_state will return a GLib.Variant of the same type.

If the action is not stateful then this function will return null. In that case, Gio.ActionGroup.prototype.get_action_state will return null and you must not call Gio.ActionGroup.prototype.change_action_state.

The state type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different state type.

Since 2.28

action_name

the name of the action to query

Returns

the state type, if the action is stateful