Virtual Method
GioActionGroupget_action_state_hint
since: 2.28
Declaration [src]
GVariant*
get_action_state_hint (
GActionGroup* action_group,
const gchar* action_name
)
Description [src]
Requests a hint about the valid range of values for the state of the
named action within action_group
.
If NULL
is returned it either means that the action is not stateful
or that there is no hint about the valid range of values for the
state of the action.
If a GVariant
array is returned then each item in the array is a
possible value for the state. If a GVariant
pair (ie: two-tuple) is
returned then the tuple specifies the inclusive lower and upper bound
of valid values for the state.
In any case, the information is merely a hint. It may be possible to have a state value outside of the hinted range and setting a value within the range may fail.
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 state range hint.
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
The return value can be NULL . |