Virtualvfunc_Activates the remote action.
This is the same as g_action_group_activate_action() except that it
allows for provision of "platform data" to be sent along with the
activation request. This typically contains details such as the user
interaction timestamp or startup notification information.
platform_data must be non-null and must have the type
G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
Virtualvfunc_Changes the state of a remote action.
This is the same as g_action_group_change_action_state() except that
it allows for provision of "platform data" to be sent along with the
state change request. This typically contains details such as the
user interaction timestamp or startup notification information.
platform_data must be non-null and must have the type
G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
Virtualvfunc_Emits the Gio.ActionGroup::action-added signal on action_group.
This function should only be called by Gio.ActionGroup implementations.
the name of an action in the group
Virtualvfunc_Emits the Gio.ActionGroup::action-enabled-changed signal on action_group.
This function should only be called by Gio.ActionGroup implementations.
the name of an action in the group
whether the action is now enabled
Virtualvfunc_Emits the Gio.ActionGroup::action-removed signal on action_group.
This function should only be called by Gio.ActionGroup implementations.
the name of an action in the group
Virtualvfunc_Emits the Gio.ActionGroup::action-state-changed signal on action_group.
This function should only be called by Gio.ActionGroup implementations.
Virtualvfunc_Activate the named action within action_group.
If the action is expecting a parameter, then the correct type of
parameter must be given as parameter. If the action is expecting no
parameters then parameter must be NULL. See
Gio.ActionGroup.get_action_parameter_type.
If the Gio.ActionGroup implementation supports asynchronous remote activation over D-Bus, this call may return before the relevant D-Bus traffic has been sent, or any replies have been received. In order to block on such asynchronous activation calls, Gio.DBusConnection.flush should be called prior to the code, which depends on the result of the action activation. Without flushing the D-Bus connection, there is no guarantee that the action would have been activated.
The following code which runs in a remote app instance, shows an
example of a ‘quit’ action being activated on the primary app
instance over D-Bus. Here Gio.DBusConnection.flush is called
before exit(). Without g_dbus_connection_flush(), the ‘quit’ action
may fail to be activated on the primary instance.
// call ‘quit’ action on primary instance
g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
// make sure the action is activated now
g_dbus_connection_flush (…);
g_debug ("Application has been terminated. Exiting.");
exit (0);
Virtualvfunc_Request for the state of the named action within action_group to be
changed to value.
The action must be stateful and value must be of the correct type.
See Gio.ActionGroup.get_action_state_type.
This call merely requests a change. The action may refuse to change
its state or may change its state to something other than value.
See Gio.ActionGroup.get_action_state_hint.
If the value GVariant is floating, it is consumed.
Virtualvfunc_Checks if the named action within action_group is currently enabled.
An action must be enabled in order to be activated or in order to have its state changed from outside callers.
the name of the action to query
Virtualvfunc_Queries the type of the parameter that must be given when activating
the named action within action_group.
When activating the action using Gio.ActionGroup.activate_action, the GLib.Variant given to that function must be of the type returned by this function.
In the case that this function returns NULL, you must not give any
GLib.Variant, but NULL instead.
The parameter 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 parameter type.
the name of the action to query
Virtualvfunc_Queries the current state of the named action within action_group.
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 Gio.ActionGroup.get_action_state_type.
The return value (if non-NULL) should be freed with
GLib.Variant.unref when it is no longer required.
the name of the action to query
Virtualvfunc_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 GLib.Variant array is returned then each item in the array is a possible value for the state. If a GLib.Variant 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
GLib.Variant.unref when it is no longer required.
the name of the action to query
Virtualvfunc_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.change_action_state must give a GLib.Variant of this type and Gio.ActionGroup.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.get_action_state will return NULL
and you must not call Gio.ActionGroup.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.
the name of the action to query
Virtualvfunc_Checks if the named action exists within action_group.
the name of the action to check for
Virtualvfunc_Lists the actions contained within action_group.
The caller is responsible for freeing the list with GLib.strfreev when it is no longer required.
Virtualvfunc_Queries all aspects of the named action within an action_group.
This function acquires the information available from Gio.ActionGroup.has_action, Gio.ActionGroup.get_action_enabled, Gio.ActionGroup.get_action_parameter_type, Gio.ActionGroup.get_action_state_type, Gio.ActionGroup.get_action_state_hint and Gio.ActionGroup.get_action_state 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 Gio.ActionGroup 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.
the name of an action in the group
Interface for implementing RemoteActionGroup. Contains only the virtual methods that need to be implemented.