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