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  = GtkActionGroup.html
27  * outPack = gtk
28  * outFile = ActionGroup
29  * strct   = GtkActionGroup
30  * realStrct=
31  * ctorStrct=
32  * clss    = ActionGroup
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * 	- BuildableIF
40  * prefixes:
41  * 	- gtk_action_group_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- glib.ListG
49  * 	- gtk.AccelGroup
50  * 	- gtk.Action
51  * 	- gtk.Widget
52  * 	- gtk.BuildableIF
53  * 	- gtk.BuildableT
54  * structWrap:
55  * 	- GList* -> ListG
56  * 	- GtkAccelGroup* -> AccelGroup
57  * 	- GtkAction* -> Action
58  * 	- GtkWidget* -> Widget
59  * module aliases:
60  * local aliases:
61  * overrides:
62  */
63 
64 module gtk.ActionGroup;
65 
66 public  import gtkc.gtktypes;
67 
68 private import gtkc.gtk;
69 private import glib.ConstructionException;
70 private import gobject.ObjectG;
71 
72 private import gobject.Signals;
73 public  import gtkc.gdktypes;
74 private import glib.Str;
75 private import glib.ListG;
76 private import gtk.AccelGroup;
77 private import gtk.Action;
78 private import gtk.Widget;
79 private import gtk.BuildableIF;
80 private import gtk.BuildableT;
81 
82 
83 private import gobject.ObjectG;
84 
85 /**
86  * Actions are organised into groups. An action group is essentially a
87  * map from names to GtkAction objects.
88  *
89  * All actions that would make sense to use in a particular context
90  * should be in a single group. Multiple action groups may be used for a
91  * particular user interface. In fact, it is expected that most nontrivial
92  * applications will make use of multiple groups. For example, in an
93  * application that can edit multiple documents, one group holding global
94  * actions (e.g. quit, about, new), and one group per document holding
95  * actions that act on that document (eg. save, cut/copy/paste, etc). Each
96  * window's menus would be constructed from a combination of two action
97  * groups.
98  *
99  * Accelerators are handled by the GTK+ accelerator map. All actions are
100  * assigned an accelerator path (which normally has the form
101  * <Actions>/group-name/action-name)
102  * and a shortcut is associated with this accelerator path. All menuitems
103  * and toolitems take on this accelerator path. The GTK+ accelerator map
104  * code makes sure that the correct shortcut is displayed next to the menu
105  * item.
106  *
107  * GtkActionGroup as GtkBuildable
108  *
109  * The GtkActionGroup implementation of the GtkBuildable interface accepts
110  * GtkAction objects as <child> elements in UI definitions.
111  *
112  * Note that it is probably more common to define actions and action groups
113  * in the code, since they are directly related to what the code can do.
114  *
115  * The GtkActionGroup implementation of the GtkBuildable interface supports
116  * a custom <accelerator> element, which has attributes named key and
117  * modifiers and allows to specify accelerators. This is similar to the
118  * <accelerator> element of GtkWidget, the main difference is that
119  * it doesn't allow you to specify a signal.
120  *
121  * $(DDOC_COMMENT example)
122  */
123 public class ActionGroup : ObjectG, BuildableIF
124 {
125 	
126 	/** the main Gtk struct */
127 	protected GtkActionGroup* gtkActionGroup;
128 	
129 	
130 	/** Get the main Gtk struct */
131 	public GtkActionGroup* getActionGroupStruct()
132 	{
133 		return gtkActionGroup;
134 	}
135 	
136 	
137 	/** the main Gtk struct as a void* */
138 	protected override void* getStruct()
139 	{
140 		return cast(void*)gtkActionGroup;
141 	}
142 	
143 	/**
144 	 * Sets our main struct and passes it to the parent class
145 	 */
146 	public this (GtkActionGroup* gtkActionGroup)
147 	{
148 		super(cast(GObject*)gtkActionGroup);
149 		this.gtkActionGroup = gtkActionGroup;
150 	}
151 	
152 	protected override void setStruct(GObject* obj)
153 	{
154 		super.setStruct(obj);
155 		gtkActionGroup = cast(GtkActionGroup*)obj;
156 	}
157 	
158 	// add the Buildable capabilities
159 	mixin BuildableT!(GtkActionGroup);
160 	
161 	/**
162 	 */
163 	int[string] connectedSignals;
164 	
165 	void delegate(Action, Widget, ActionGroup)[] onConnectProxyListeners;
166 	/**
167 	 * Warning
168 	 * GtkActionGroup::connect-proxy is deprecated and should not be used in newly-written code. 3.10
169 	 * The ::connect-proxy signal is emitted after connecting a proxy to
170 	 * an action in the group. Note that the proxy may have been connected
171 	 * to a different action before.
172 	 * This is intended for simple customizations for which a custom action
173 	 * class would be too clumsy, e.g. showing tooltips for menuitems in the
174 	 * statusbar.
175 	 * GtkUIManager proxies the signal and provides global notification
176 	 * just before any action is connected to a proxy, which is probably more
177 	 * convenient to use.
178 	 * Since 2.4
179 	 */
180 	void addOnConnectProxy(void delegate(Action, Widget, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
181 	{
182 		if ( !("connect-proxy" in connectedSignals) )
183 		{
184 			Signals.connectData(
185 			getStruct(),
186 			"connect-proxy",
187 			cast(GCallback)&callBackConnectProxy,
188 			cast(void*)this,
189 			null,
190 			connectFlags);
191 			connectedSignals["connect-proxy"] = 1;
192 		}
193 		onConnectProxyListeners ~= dlg;
194 	}
195 	extern(C) static void callBackConnectProxy(GtkActionGroup* actionGroupStruct, GtkAction* action, GtkWidget* proxy, ActionGroup _actionGroup)
196 	{
197 		foreach ( void delegate(Action, Widget, ActionGroup) dlg ; _actionGroup.onConnectProxyListeners )
198 		{
199 			dlg(ObjectG.getDObject!(Action)(action), ObjectG.getDObject!(Widget)(proxy), _actionGroup);
200 		}
201 	}
202 	
203 	void delegate(Action, Widget, ActionGroup)[] onDisconnectProxyListeners;
204 	/**
205 	 * Warning
206 	 * GtkActionGroup::disconnect-proxy is deprecated and should not be used in newly-written code. 3.10
207 	 * The ::disconnect-proxy signal is emitted after disconnecting a proxy
208 	 * from an action in the group.
209 	 * GtkUIManager proxies the signal and provides global notification
210 	 * just before any action is connected to a proxy, which is probably more
211 	 * convenient to use.
212 	 * Since 2.4
213 	 */
214 	void addOnDisconnectProxy(void delegate(Action, Widget, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
215 	{
216 		if ( !("disconnect-proxy" in connectedSignals) )
217 		{
218 			Signals.connectData(
219 			getStruct(),
220 			"disconnect-proxy",
221 			cast(GCallback)&callBackDisconnectProxy,
222 			cast(void*)this,
223 			null,
224 			connectFlags);
225 			connectedSignals["disconnect-proxy"] = 1;
226 		}
227 		onDisconnectProxyListeners ~= dlg;
228 	}
229 	extern(C) static void callBackDisconnectProxy(GtkActionGroup* actionGroupStruct, GtkAction* action, GtkWidget* proxy, ActionGroup _actionGroup)
230 	{
231 		foreach ( void delegate(Action, Widget, ActionGroup) dlg ; _actionGroup.onDisconnectProxyListeners )
232 		{
233 			dlg(ObjectG.getDObject!(Action)(action), ObjectG.getDObject!(Widget)(proxy), _actionGroup);
234 		}
235 	}
236 	
237 	void delegate(Action, ActionGroup)[] onPostActivateListeners;
238 	/**
239 	 * Warning
240 	 * GtkActionGroup::post-activate is deprecated and should not be used in newly-written code. 3.10
241 	 * The ::post-activate signal is emitted just after the action in the
242 	 * action_group is activated
243 	 * This is intended for GtkUIManager to proxy the signal and provide global
244 	 * notification just after any action is activated.
245 	 * Since 2.4
246 	 */
247 	void addOnPostActivate(void delegate(Action, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
248 	{
249 		if ( !("post-activate" in connectedSignals) )
250 		{
251 			Signals.connectData(
252 			getStruct(),
253 			"post-activate",
254 			cast(GCallback)&callBackPostActivate,
255 			cast(void*)this,
256 			null,
257 			connectFlags);
258 			connectedSignals["post-activate"] = 1;
259 		}
260 		onPostActivateListeners ~= dlg;
261 	}
262 	extern(C) static void callBackPostActivate(GtkActionGroup* actionGroupStruct, GtkAction* action, ActionGroup _actionGroup)
263 	{
264 		foreach ( void delegate(Action, ActionGroup) dlg ; _actionGroup.onPostActivateListeners )
265 		{
266 			dlg(ObjectG.getDObject!(Action)(action), _actionGroup);
267 		}
268 	}
269 	
270 	void delegate(Action, ActionGroup)[] onPreActivateListeners;
271 	/**
272 	 * Warning
273 	 * GtkActionGroup::pre-activate is deprecated and should not be used in newly-written code. 3.10
274 	 * The ::pre-activate signal is emitted just before the action in the
275 	 * action_group is activated
276 	 * This is intended for GtkUIManager to proxy the signal and provide global
277 	 * notification just before any action is activated.
278 	 * Since 2.4
279 	 */
280 	void addOnPreActivate(void delegate(Action, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
281 	{
282 		if ( !("pre-activate" in connectedSignals) )
283 		{
284 			Signals.connectData(
285 			getStruct(),
286 			"pre-activate",
287 			cast(GCallback)&callBackPreActivate,
288 			cast(void*)this,
289 			null,
290 			connectFlags);
291 			connectedSignals["pre-activate"] = 1;
292 		}
293 		onPreActivateListeners ~= dlg;
294 	}
295 	extern(C) static void callBackPreActivate(GtkActionGroup* actionGroupStruct, GtkAction* action, ActionGroup _actionGroup)
296 	{
297 		foreach ( void delegate(Action, ActionGroup) dlg ; _actionGroup.onPreActivateListeners )
298 		{
299 			dlg(ObjectG.getDObject!(Action)(action), _actionGroup);
300 		}
301 	}
302 	
303 	
304 	/**
305 	 * Warning
306 	 * gtk_action_group_new is deprecated and should not be used in newly-written code. 3.10
307 	 * Creates a new GtkActionGroup object. The name of the action group
308 	 * is used when associating keybindings
309 	 * with the actions.
310 	 * Since 2.4
311 	 * Params:
312 	 * name = the name of the action group.
313 	 * Throws: ConstructionException GTK+ fails to create the object.
314 	 */
315 	public this (string name)
316 	{
317 		// GtkActionGroup * gtk_action_group_new (const gchar *name);
318 		auto p = gtk_action_group_new(Str.toStringz(name));
319 		if(p is null)
320 		{
321 			throw new ConstructionException("null returned by gtk_action_group_new(Str.toStringz(name))");
322 		}
323 		this(cast(GtkActionGroup*) p);
324 	}
325 	
326 	/**
327 	 * Warning
328 	 * gtk_action_group_get_name is deprecated and should not be used in newly-written code. 3.10
329 	 * Gets the name of the action group.
330 	 * Since 2.4
331 	 * Returns: the name of the action group.
332 	 */
333 	public string getName()
334 	{
335 		// const gchar * gtk_action_group_get_name (GtkActionGroup *action_group);
336 		return Str.toString(gtk_action_group_get_name(gtkActionGroup));
337 	}
338 	
339 	/**
340 	 * Warning
341 	 * gtk_action_group_get_sensitive is deprecated and should not be used in newly-written code. 3.10
342 	 * Returns TRUE if the group is sensitive. The constituent actions
343 	 * can only be logically sensitive (see gtk_action_is_sensitive()) if
344 	 * they are sensitive (see gtk_action_get_sensitive()) and their group
345 	 * is sensitive.
346 	 * Since 2.4
347 	 * Returns: TRUE if the group is sensitive.
348 	 */
349 	public int getSensitive()
350 	{
351 		// gboolean gtk_action_group_get_sensitive (GtkActionGroup *action_group);
352 		return gtk_action_group_get_sensitive(gtkActionGroup);
353 	}
354 	
355 	/**
356 	 * Warning
357 	 * gtk_action_group_set_sensitive is deprecated and should not be used in newly-written code. 3.10
358 	 * Changes the sensitivity of action_group
359 	 * Since 2.4
360 	 * Params:
361 	 * sensitive = new sensitivity
362 	 */
363 	public void setSensitive(int sensitive)
364 	{
365 		// void gtk_action_group_set_sensitive (GtkActionGroup *action_group,  gboolean sensitive);
366 		gtk_action_group_set_sensitive(gtkActionGroup, sensitive);
367 	}
368 	
369 	/**
370 	 * Warning
371 	 * gtk_action_group_get_visible is deprecated and should not be used in newly-written code. 3.10
372 	 * Returns TRUE if the group is visible. The constituent actions
373 	 * can only be logically visible (see gtk_action_is_visible()) if
374 	 * they are visible (see gtk_action_get_visible()) and their group
375 	 * is visible.
376 	 * Since 2.4
377 	 * Returns: TRUE if the group is visible.
378 	 */
379 	public int getVisible()
380 	{
381 		// gboolean gtk_action_group_get_visible (GtkActionGroup *action_group);
382 		return gtk_action_group_get_visible(gtkActionGroup);
383 	}
384 	
385 	/**
386 	 * Warning
387 	 * gtk_action_group_set_visible is deprecated and should not be used in newly-written code. 3.10
388 	 * Changes the visible of action_group.
389 	 * Since 2.4
390 	 * Params:
391 	 * visible = new visiblity
392 	 */
393 	public void setVisible(int visible)
394 	{
395 		// void gtk_action_group_set_visible (GtkActionGroup *action_group,  gboolean visible);
396 		gtk_action_group_set_visible(gtkActionGroup, visible);
397 	}
398 	
399 	/**
400 	 * Warning
401 	 * gtk_action_group_get_accel_group is deprecated and should not be used in newly-written code. 3.10
402 	 * Gets the accelerator group.
403 	 * Returns: the accelerator group associated with this action group or NULL if there is none. [transfer none] Since 3.6
404 	 */
405 	public AccelGroup getAccelGroup()
406 	{
407 		// GtkAccelGroup * gtk_action_group_get_accel_group (GtkActionGroup *action_group);
408 		auto p = gtk_action_group_get_accel_group(gtkActionGroup);
409 		
410 		if(p is null)
411 		{
412 			return null;
413 		}
414 		
415 		return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) p);
416 	}
417 	
418 	/**
419 	 * Warning
420 	 * gtk_action_group_set_accel_group is deprecated and should not be used in newly-written code. 3.10
421 	 * Sets the accelerator group to be used by every action in this group.
422 	 * Params:
423 	 * accelGroup = a GtkAccelGroup to set or NULL. [allow-none]
424 	 * Since 3.6
425 	 */
426 	public void setAccelGroup(AccelGroup accelGroup)
427 	{
428 		// void gtk_action_group_set_accel_group (GtkActionGroup *action_group,  GtkAccelGroup *accel_group);
429 		gtk_action_group_set_accel_group(gtkActionGroup, (accelGroup is null) ? null : accelGroup.getAccelGroupStruct());
430 	}
431 	
432 	/**
433 	 * Warning
434 	 * gtk_action_group_get_action is deprecated and should not be used in newly-written code. 3.10
435 	 * Looks up an action in the action group by name.
436 	 * Since 2.4
437 	 * Params:
438 	 * actionName = the name of the action
439 	 * Returns: the action, or NULL if no action by that name exists. [transfer none]
440 	 */
441 	public Action getAction(string actionName)
442 	{
443 		// GtkAction * gtk_action_group_get_action (GtkActionGroup *action_group,  const gchar *action_name);
444 		auto p = gtk_action_group_get_action(gtkActionGroup, Str.toStringz(actionName));
445 		
446 		if(p is null)
447 		{
448 			return null;
449 		}
450 		
451 		return ObjectG.getDObject!(Action)(cast(GtkAction*) p);
452 	}
453 	
454 	/**
455 	 * Warning
456 	 * gtk_action_group_list_actions is deprecated and should not be used in newly-written code. 3.10
457 	 * Lists the actions in the action group.
458 	 * Since 2.4
459 	 * Returns: an allocated list of the action objects in the action group. [element-type GtkAction][transfer container]
460 	 */
461 	public ListG listActions()
462 	{
463 		// GList * gtk_action_group_list_actions (GtkActionGroup *action_group);
464 		auto p = gtk_action_group_list_actions(gtkActionGroup);
465 		
466 		if(p is null)
467 		{
468 			return null;
469 		}
470 		
471 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
472 	}
473 	
474 	/**
475 	 * Warning
476 	 * gtk_action_group_add_action is deprecated and should not be used in newly-written code. 3.10
477 	 * Adds an action object to the action group. Note that this function
478 	 * does not set up the accel path of the action, which can lead to problems
479 	 * if a user tries to modify the accelerator of a menuitem associated with
480 	 * the action. Therefore you must either set the accel path yourself with
481 	 * gtk_action_set_accel_path(), or use
482 	 * gtk_action_group_add_action_with_accel (..., NULL).
483 	 * Since 2.4
484 	 * Params:
485 	 * action = an action
486 	 */
487 	public void addAction(Action action)
488 	{
489 		// void gtk_action_group_add_action (GtkActionGroup *action_group,  GtkAction *action);
490 		gtk_action_group_add_action(gtkActionGroup, (action is null) ? null : action.getActionStruct());
491 	}
492 	
493 	/**
494 	 * Warning
495 	 * gtk_action_group_add_action_with_accel is deprecated and should not be used in newly-written code. 3.10
496 	 * Adds an action object to the action group and sets up the accelerator.
497 	 * If accelerator is NULL, attempts to use the accelerator associated
498 	 * with the stock_id of the action.
499 	 * Accel paths are set to
500 	 * <Actions>/group-name/action-name.
501 	 * Since 2.4
502 	 * Params:
503 	 * action = the action to add
504 	 * accelerator = the accelerator for the action, in
505 	 * the format understood by gtk_accelerator_parse(), or "" for no accelerator, or
506 	 * NULL to use the stock accelerator. [allow-none]
507 	 */
508 	public void addActionWithAccel(Action action, string accelerator)
509 	{
510 		// void gtk_action_group_add_action_with_accel  (GtkActionGroup *action_group,  GtkAction *action,  const gchar *accelerator);
511 		gtk_action_group_add_action_with_accel(gtkActionGroup, (action is null) ? null : action.getActionStruct(), Str.toStringz(accelerator));
512 	}
513 	
514 	/**
515 	 * Warning
516 	 * gtk_action_group_remove_action is deprecated and should not be used in newly-written code. 3.10
517 	 * Removes an action object from the action group.
518 	 * Since 2.4
519 	 * Params:
520 	 * action = an action
521 	 */
522 	public void removeAction(Action action)
523 	{
524 		// void gtk_action_group_remove_action (GtkActionGroup *action_group,  GtkAction *action);
525 		gtk_action_group_remove_action(gtkActionGroup, (action is null) ? null : action.getActionStruct());
526 	}
527 	
528 	/**
529 	 * Warning
530 	 * gtk_action_group_add_actions is deprecated and should not be used in newly-written code. 3.10
531 	 * This is a convenience function to create a number of actions and add them
532 	 * to the action group.
533 	 * The "activate" signals of the actions are connected to the callbacks and
534 	 * their accel paths are set to
535 	 * <Actions>/group-name/action-name.
536 	 * Since 2.4
537 	 * Params:
538 	 * entries = an array of action descriptions. [array length=n_entries]
539 	 * userData = data to pass to the action callbacks
540 	 */
541 	public void addActions(GtkActionEntry[] entries, void* userData)
542 	{
543 		// void gtk_action_group_add_actions (GtkActionGroup *action_group,  const GtkActionEntry *entries,  guint n_entries,  gpointer user_data);
544 		gtk_action_group_add_actions(gtkActionGroup, entries.ptr, cast(int) entries.length, userData);
545 	}
546 	
547 	/**
548 	 * Warning
549 	 * gtk_action_group_add_actions_full is deprecated and should not be used in newly-written code. 3.10
550 	 * This variant of gtk_action_group_add_actions() adds a GDestroyNotify
551 	 * callback for user_data.
552 	 * Since 2.4
553 	 * Params:
554 	 * entries = an array of action descriptions. [array length=n_entries]
555 	 * userData = data to pass to the action callbacks
556 	 * destroy = destroy notification callback for user_data
557 	 */
558 	public void addActionsFull(GtkActionEntry[] entries, void* userData, GDestroyNotify destroy)
559 	{
560 		// void gtk_action_group_add_actions_full (GtkActionGroup *action_group,  const GtkActionEntry *entries,  guint n_entries,  gpointer user_data,  GDestroyNotify destroy);
561 		gtk_action_group_add_actions_full(gtkActionGroup, entries.ptr, cast(int) entries.length, userData, destroy);
562 	}
563 	
564 	/**
565 	 * Warning
566 	 * gtk_action_group_add_toggle_actions is deprecated and should not be used in newly-written code. 3.10
567 	 * This is a convenience function to create a number of toggle actions and add them
568 	 * to the action group.
569 	 * The "activate" signals of the actions are connected to the callbacks and
570 	 * their accel paths are set to
571 	 * <Actions>/group-name/action-name.
572 	 * Since 2.4
573 	 * Params:
574 	 * entries = an array of toggle action descriptions. [array length=n_entries]
575 	 * userData = data to pass to the action callbacks
576 	 */
577 	public void addToggleActions(GtkToggleActionEntry[] entries, void* userData)
578 	{
579 		// void gtk_action_group_add_toggle_actions (GtkActionGroup *action_group,  const GtkToggleActionEntry *entries,  guint n_entries,  gpointer user_data);
580 		gtk_action_group_add_toggle_actions(gtkActionGroup, entries.ptr, cast(int) entries.length, userData);
581 	}
582 	
583 	/**
584 	 * Warning
585 	 * gtk_action_group_add_toggle_actions_full is deprecated and should not be used in newly-written code. 3.10
586 	 * This variant of gtk_action_group_add_toggle_actions() adds a
587 	 * GDestroyNotify callback for user_data.
588 	 * Since 2.4
589 	 * Params:
590 	 * entries = an array of toggle action descriptions. [array length=n_entries]
591 	 * userData = data to pass to the action callbacks
592 	 * destroy = destroy notification callback for user_data
593 	 */
594 	public void addToggleActionsFull(GtkToggleActionEntry[] entries, void* userData, GDestroyNotify destroy)
595 	{
596 		// void gtk_action_group_add_toggle_actions_full  (GtkActionGroup *action_group,  const GtkToggleActionEntry *entries,  guint n_entries,  gpointer user_data,  GDestroyNotify destroy);
597 		gtk_action_group_add_toggle_actions_full(gtkActionGroup, entries.ptr, cast(int) entries.length, userData, destroy);
598 	}
599 	
600 	/**
601 	 * Warning
602 	 * gtk_action_group_add_radio_actions is deprecated and should not be used in newly-written code. 3.10
603 	 * This is a convenience routine to create a group of radio actions and
604 	 * add them to the action group.
605 	 * The "changed" signal of the first radio action is connected to the
606 	 * on_change callback and the accel paths of the actions are set to
607 	 * <Actions>/group-name/action-name.
608 	 * Since 2.4
609 	 * Params:
610 	 * entries = an array of radio action descriptions. [array length=n_entries]
611 	 * value = the value of the action to activate initially, or -1 if
612 	 * no action should be activated
613 	 * onChange = the callback to connect to the changed signal
614 	 * userData = data to pass to the action callbacks
615 	 */
616 	public void addRadioActions(GtkRadioActionEntry[] entries, int value, GCallback onChange, void* userData)
617 	{
618 		// void gtk_action_group_add_radio_actions (GtkActionGroup *action_group,  const GtkRadioActionEntry *entries,  guint n_entries,  gint value,  GCallback on_change,  gpointer user_data);
619 		gtk_action_group_add_radio_actions(gtkActionGroup, entries.ptr, cast(int) entries.length, value, onChange, userData);
620 	}
621 	
622 	/**
623 	 * Warning
624 	 * gtk_action_group_add_radio_actions_full is deprecated and should not be used in newly-written code. 3.10
625 	 * This variant of gtk_action_group_add_radio_actions() adds a
626 	 * GDestroyNotify callback for user_data.
627 	 * Since 2.4
628 	 * Params:
629 	 * entries = an array of radio action descriptions. [array length=n_entries]
630 	 * value = the value of the action to activate initially, or -1 if
631 	 * no action should be activated
632 	 * onChange = the callback to connect to the changed signal
633 	 * userData = data to pass to the action callbacks
634 	 * destroy = destroy notification callback for user_data
635 	 */
636 	public void addRadioActionsFull(GtkRadioActionEntry[] entries, int value, GCallback onChange, void* userData, GDestroyNotify destroy)
637 	{
638 		// void gtk_action_group_add_radio_actions_full  (GtkActionGroup *action_group,  const GtkRadioActionEntry *entries,  guint n_entries,  gint value,  GCallback on_change,  gpointer user_data,  GDestroyNotify destroy);
639 		gtk_action_group_add_radio_actions_full(gtkActionGroup, entries.ptr, cast(int) entries.length, value, onChange, userData, destroy);
640 	}
641 	
642 	/**
643 	 * Warning
644 	 * gtk_action_group_set_translate_func is deprecated and should not be used in newly-written code. 3.10
645 	 * Sets a function to be used for translating the label and tooltip of
646 	 * GtkActionEntrys added by gtk_action_group_add_actions().
647 	 * If you're using gettext(), it is enough to set the translation domain
648 	 * with gtk_action_group_set_translation_domain().
649 	 * Since 2.4
650 	 * Params:
651 	 * func = a GtkTranslateFunc
652 	 * data = data to be passed to func and notify
653 	 * notify = a GDestroyNotify function to be called when action_group is
654 	 * destroyed and when the translation function is changed again
655 	 */
656 	public void setTranslateFunc(GtkTranslateFunc func, void* data, GDestroyNotify notify)
657 	{
658 		// void gtk_action_group_set_translate_func (GtkActionGroup *action_group,  GtkTranslateFunc func,  gpointer data,  GDestroyNotify notify);
659 		gtk_action_group_set_translate_func(gtkActionGroup, func, data, notify);
660 	}
661 	
662 	/**
663 	 * Warning
664 	 * gtk_action_group_set_translation_domain is deprecated and should not be used in newly-written code. 3.10
665 	 * Sets the translation domain and uses g_dgettext() for translating the
666 	 * label and tooltip of GtkActionEntrys added by
667 	 * gtk_action_group_add_actions().
668 	 * If you're not using gettext() for localization, see
669 	 * gtk_action_group_set_translate_func().
670 	 * Since 2.4
671 	 * Params:
672 	 * domain = the translation domain to use for g_dgettext()
673 	 * calls, or NULL to use the domain set with textdomain(). [allow-none]
674 	 */
675 	public void setTranslationDomain(string domain)
676 	{
677 		// void gtk_action_group_set_translation_domain  (GtkActionGroup *action_group,  const gchar *domain);
678 		gtk_action_group_set_translation_domain(gtkActionGroup, Str.toStringz(domain));
679 	}
680 	
681 	/**
682 	 * Warning
683 	 * gtk_action_group_translate_string is deprecated and should not be used in newly-written code. 3.10
684 	 * Translates a string using the function set with
685 	 * gtk_action_group_set_translate_func(). This
686 	 * is mainly intended for language bindings.
687 	 * Since 2.6
688 	 * Params:
689 	 * string = a string
690 	 * Returns: the translation of string
691 	 */
692 	public string translateString(string string)
693 	{
694 		// const gchar * gtk_action_group_translate_string (GtkActionGroup *action_group,  const gchar *string);
695 		return Str.toString(gtk_action_group_translate_string(gtkActionGroup, Str.toStringz(string)));
696 	}
697 }