Module: Gio::RemoteActionGroup

Defined in:
(unknown)

Overview

The GRemoteActionGroup interface is implemented by [ifaceGio.ActionGroup] instances that either transmit action invocations to other processes or receive action invocations in the local process from other processes.

The interface has _full variants of the two methods on [ifaceGio.ActionGroup] used to activate actions: [methodGio.ActionGroup.activate_action] and [methodGio.ActionGroup.change_action_state]. These variants allow a ‘platform data’ [structGLib.Variant] to be specified: a dictionary providing context for the action invocation (for example: timestamps, startup notification IDs, etc).

[classGio.DBusActionGroup] implements GRemoteActionGroup. This provides a mechanism to send platform data for action invocations over D-Bus.

Additionally, [methodGio.DBusConnection.export_action_group] will check if the exported [ifaceGio.ActionGroup] implements GRemoteActionGroup and use the _full variants of the calls if available. This provides a mechanism by which to receive platform data for action invocations that arrive by way of D-Bus.

Instance Method Summary collapse

Instance Method Details

#activate_action_full(action_name, parameter, platform_data) ⇒ nil

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-nil and must have the type %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.

Parameters:

  • action_name (String)

    the name of the action to activate

  • parameter (GLib::Variant)

    the optional parameter to the activation

  • platform_data (GLib::Variant)

    the platform data to send

Returns:

  • (nil)

#change_action_state_full(action_name, value, platform_data) ⇒ nil

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-nil and must have the type %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.

Parameters:

  • action_name (String)

    the name of the action to change the state of

  • value (GLib::Variant)

    the new requested value for the state

  • platform_data (GLib::Variant)

    the platform data to send

Returns:

  • (nil)