1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gio.RemoteActionGroupT; 26 27 public import gio.c.functions; 28 public import gio.c.types; 29 public import glib.Str; 30 public import glib.Variant; 31 public import gtkc.giotypes; 32 33 34 /** 35 * The GRemoteActionGroup interface is implemented by #GActionGroup 36 * instances that either transmit action invocations to other processes 37 * or receive action invocations in the local process from other 38 * processes. 39 * 40 * The interface has `_full` variants of the two 41 * methods on #GActionGroup used to activate actions: 42 * g_action_group_activate_action() and 43 * g_action_group_change_action_state(). These variants allow a 44 * "platform data" #GVariant to be specified: a dictionary providing 45 * context for the action invocation (for example: timestamps, startup 46 * notification IDs, etc). 47 * 48 * #GDBusActionGroup implements #GRemoteActionGroup. This provides a 49 * mechanism to send platform data for action invocations over D-Bus. 50 * 51 * Additionally, g_dbus_connection_export_action_group() will check if 52 * the exported #GActionGroup implements #GRemoteActionGroup and use the 53 * `_full` variants of the calls if available. This 54 * provides a mechanism by which to receive platform data for action 55 * invocations that arrive by way of D-Bus. 56 * 57 * Since: 2.32 58 */ 59 public template RemoteActionGroupT(TStruct) 60 { 61 /** Get the main Gtk struct */ 62 public GRemoteActionGroup* getRemoteActionGroupStruct(bool transferOwnership = false) 63 { 64 if (transferOwnership) 65 ownedRef = false; 66 return cast(GRemoteActionGroup*)getStruct(); 67 } 68 69 70 /** 71 * Activates the remote action. 72 * 73 * This is the same as g_action_group_activate_action() except that it 74 * allows for provision of "platform data" to be sent along with the 75 * activation request. This typically contains details such as the user 76 * interaction timestamp or startup notification information. 77 * 78 * @platform_data must be non-%NULL and must have the type 79 * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. 80 * 81 * Params: 82 * actionName = the name of the action to activate 83 * parameter = the optional parameter to the activation 84 * platformData = the platform data to send 85 * 86 * Since: 2.32 87 */ 88 public void activateActionFull(string actionName, Variant parameter, Variant platformData) 89 { 90 g_remote_action_group_activate_action_full(getRemoteActionGroupStruct(), Str.toStringz(actionName), (parameter is null) ? null : parameter.getVariantStruct(), (platformData is null) ? null : platformData.getVariantStruct()); 91 } 92 93 /** 94 * Changes the state of a remote action. 95 * 96 * This is the same as g_action_group_change_action_state() except that 97 * it allows for provision of "platform data" to be sent along with the 98 * state change request. This typically contains details such as the 99 * user interaction timestamp or startup notification information. 100 * 101 * @platform_data must be non-%NULL and must have the type 102 * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. 103 * 104 * Params: 105 * actionName = the name of the action to change the state of 106 * value = the new requested value for the state 107 * platformData = the platform data to send 108 * 109 * Since: 2.32 110 */ 111 public void changeActionStateFull(string actionName, Variant value, Variant platformData) 112 { 113 g_remote_action_group_change_action_state_full(getRemoteActionGroupStruct(), Str.toStringz(actionName), (value is null) ? null : value.getVariantStruct(), (platformData is null) ? null : platformData.getVariantStruct()); 114 } 115 }