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  * Conversion parameters:
26  * inFile  = GRemoteActionGroup.html
27  * outPack = gio
28  * outFile = RemoteActionGroupT
29  * strct   = GRemoteActionGroup
30  * realStrct=
31  * ctorStrct=
32  * clss    = RemoteActionGroupT
33  * interf  = RemoteActionGroupIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * 	- TStruct
38  * extend  = 
39  * implements:
40  * prefixes:
41  * 	- g_remote_action_group_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- glib.Variant
49  * structWrap:
50  * 	- GVariant* -> Variant
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module gio.RemoteActionGroupT;
57 
58 public  import gtkc.giotypes;
59 
60 public import gtkc.gio;
61 public import glib.ConstructionException;
62 public import gobject.ObjectG;
63 
64 public import glib.Str;
65 public import glib.Variant;
66 
67 
68 
69 /**
70  * The GRemoteActionGroup interface is implemented by GActionGroup
71  * instances that either transmit action invocations to other processes
72  * or receive action invocations in the local process from other
73  * processes.
74  *
75  * The interface has _full variants of the two
76  * methods on GActionGroup used to activate actions:
77  * g_action_group_activate_action() and
78  * g_action_group_change_action_state(). These variants allow a
79  * "platform data" GVariant to be specified: a dictionary providing
80  * context for the action invocation (for example: timestamps, startup
81  * notification IDs, etc).
82  *
83  * GDBusActionGroup implements GRemoteActionGroup. This provides a
84  * mechanism to send platform data for action invocations over D-Bus.
85  *
86  * Additionally, g_dbus_connection_export_action_group() will check if
87  * the exported GActionGroup implements GRemoteActionGroup and use the
88  * _full variants of the calls if available. This
89  * provides a mechanism by which to receive platform data for action
90  * invocations that arrive by way of D-Bus.
91  */
92 public template RemoteActionGroupT(TStruct)
93 {
94 	
95 	/** the main Gtk struct */
96 	protected GRemoteActionGroup* gRemoteActionGroup;
97 	
98 	
99 	/** Get the main Gtk struct */
100 	public GRemoteActionGroup* getRemoteActionGroupTStruct()
101 	{
102 		return cast(GRemoteActionGroup*)getStruct();
103 	}
104 	
105 	
106 	/**
107 	 */
108 	
109 	/**
110 	 * Activates the remote action.
111 	 * This is the same as g_action_group_activate_action() except that it
112 	 * allows for provision of "platform data" to be sent along with the
113 	 * activation request. This typically contains details such as the user
114 	 * interaction timestamp or startup notification information.
115 	 * platform_data must be non-NULL and must have the type
116 	 * G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
117 	 * Since 2.32
118 	 * Params:
119 	 * actionName = the name of the action to activate
120 	 * parameter = the optional parameter to the activation. [allow-none]
121 	 * platformData = the platform data to send
122 	 */
123 	public void activateActionFull(string actionName, Variant parameter, Variant platformData)
124 	{
125 		// void g_remote_action_group_activate_action_full  (GRemoteActionGroup *remote,  const gchar *action_name,  GVariant *parameter,  GVariant *platform_data);
126 		g_remote_action_group_activate_action_full(getRemoteActionGroupTStruct(), Str.toStringz(actionName), (parameter is null) ? null : parameter.getVariantStruct(), (platformData is null) ? null : platformData.getVariantStruct());
127 	}
128 	
129 	/**
130 	 * Changes the state of a remote action.
131 	 * This is the same as g_action_group_change_action_state() except that
132 	 * it allows for provision of "platform data" to be sent along with the
133 	 * state change request. This typically contains details such as the
134 	 * user interaction timestamp or startup notification information.
135 	 * platform_data must be non-NULL and must have the type
136 	 * G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
137 	 * Since 2.32
138 	 * Params:
139 	 * actionName = the name of the action to change the state of
140 	 * value = the new requested value for the state
141 	 * platformData = the platform data to send
142 	 */
143 	public void changeActionStateFull(string actionName, Variant value, Variant platformData)
144 	{
145 		// void g_remote_action_group_change_action_state_full  (GRemoteActionGroup *remote,  const gchar *action_name,  GVariant *value,  GVariant *platform_data);
146 		g_remote_action_group_change_action_state_full(getRemoteActionGroupTStruct(), Str.toStringz(actionName), (value is null) ? null : value.getVariantStruct(), (platformData is null) ? null : platformData.getVariantStruct());
147 	}
148 }