ActionGroup.queryAction

bool queryAction(string actionName, out bool enabled, out glib.variant_type.VariantType parameterType, out glib.variant_type.VariantType stateType, out glib.variant.Variant stateHint, out glib.variant.Variant state)

Queries all aspects of the named action within an action_group.

This function acquires the information available from [gio.action_group.ActionGroup.hasAction], [gio.action_group.ActionGroup.getActionEnabled], [gio.action_group.ActionGroup.getActionParameterType], [gio.action_group.ActionGroup.getActionStateType], [gio.action_group.ActionGroup.getActionStateHint] and [gio.action_group.ActionGroup.getActionState] with a single function call.

This provides two main benefits.

The first is the improvement in efficiency that comes with not having to perform repeated lookups of the action in order to discover different things about it. The second is that implementing #GActionGroup can now be done by only overriding this one virtual function.

The interface provides a default implementation of this function that calls the individual functions, as required, to fetch the information. The interface also provides default implementations of those functions that call this function. All implementations, therefore, must override either this function or all of the others.

If the action exists, true is returned and any of the requested fields (as indicated by having a non-null reference passed in) are filled. If the action doesn't exist, false is returned and the fields may or may not have been modified.

Parameters

actionNamethe name of an action in the group
enabledif the action is presently enabled
parameterTypethe parameter type, or null if none needed
stateTypethe state type, or null if stateless
stateHintthe state hint, or null if none
statethe current state, or null if stateless

Returns

true if the action exists, else false