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  = GtkActionable.html
27  * outPack = gtk
28  * outFile = ActionableIF
29  * strct   = GtkActionable
30  * realStrct=
31  * ctorStrct=
32  * clss    = ActionableT
33  * interf  = ActionableIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_actionable_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- glib.Variant
48  * structWrap:
49  * 	- GVariant* -> Variant
50  * module aliases:
51  * local aliases:
52  * overrides:
53  */
54 
55 module gtk.ActionableIF;
56 
57 public  import gtkc.gtktypes;
58 
59 private import gtkc.gtk;
60 private import glib.ConstructionException;
61 private import gobject.ObjectG;
62 
63 private import glib.Str;
64 private import glib.Variant;
65 
66 
67 
68 /**
69  * This interface provides a convenient way of associating widgets with
70  * actions on a GtkApplicationWindow or GtkApplication.
71  *
72  * It primarily consists of two properties: "action-name"
73  * and "action-target". There are also some convenience APIs
74  * for setting these properties.
75  *
76  * This interface is presently only meaningful if used on a widget that
77  * is (or will be) located inside of a GtkApplicationWindow and can
78  * only be used to associate the widget with actions on that window, or
79  * its associated GtkApplication.
80  */
81 public interface ActionableIF
82 {
83 	
84 	
85 	/** Get the main Gtk struct */
86 	public GtkActionable* getActionableTStruct();
87 	
88 	/** the main Gtk struct as a void* */
89 	protected void* getStruct();
90 	
91 	
92 	/**
93 	 */
94 	
95 	/**
96 	 * Gets the action name for actionable.
97 	 * See gtk_actionable_set_action_name() for more information.
98 	 * Returns: the action name, or NULL if none is set Since 3.4
99 	 */
100 	public string getActionName();
101 	
102 	/**
103 	 * Specifies the name of the action with which this widget should be
104 	 * associated. If action_name is NULL then the widget will be
105 	 * unassociated from any previous action.
106 	 * Usually this function is used when the widget is located (or will be
107 	 * located) within the hierarchy of a GtkApplicationWindow.
108 	 * Names are of the form "win.save" or "app.quit" for actions on the
109 	 * containing GtkApplicationWindow or its associated GtkApplication,
110 	 * respectively. This is the same form used for actions in the GMenu
111 	 * associated with the window.
112 	 * Params:
113 	 * actionName = an action name, or NULL
114 	 * Since 3.4
115 	 */
116 	public void setActionName(string actionName);
117 	
118 	/**
119 	 * Gets the current target value of actionabe.
120 	 * See gtk_actionable_set_action_target_value() for more information.
121 	 * Returns: the current target value. [transfer none] Since 3.4
122 	 */
123 	public Variant getActionTargetValue();
124 	
125 	/**
126 	 * Sets the target value of an actionable widget.
127 	 * If target_value is NULL then the target value is unset.
128 	 * The target value has two purposes. First, it is used as the
129 	 * parameter to activation of the action associated with the
130 	 * GtkActionable widget. Second, it is used to determine if the widget
131 	 * should be rendered as "active" - the widget is active if the state
132 	 * is equal to the given target.
133 	 * Consider the example of associating a set of buttons with a GAction
134 	 * with string state in a typical "radio button" situation. Each button
135 	 * will be associated with the same action, but with a different target
136 	 * value for that action. Clicking on a particular button will activate
137 	 * the action with the target of that button, which will typically cause
138 	 * the action's state to change to that value. Since the action's state
139 	 * is now equal to the target value of the button, the button will now
140 	 * be rendered as active (and the other buttons, with different targets,
141 	 * rendered inactive).
142 	 * Params:
143 	 * targetValue = a GVariant to set as the target value, or NULL
144 	 * Since 3.4
145 	 */
146 	public void setActionTargetValue(Variant targetValue);
147 	
148 	/**
149 	 * Sets the action-name and associated string target value of an
150 	 * actionable widget.
151 	 * This allows for the effect of both gtk_actionable_set_action_name()
152 	 * and gtk_actionable_set_action_target_value() in the common case that
153 	 * the target is string-valued.
154 	 * detailed_action_name is a string of the form
155 	 * "action::target" where action
156 	 * is the action name and target is the string to use
157 	 * as the target.
158 	 * Params:
159 	 * detailedActionName = the detailed action name
160 	 * Since 3.4
161 	 */
162 	public void setDetailedActionName(string detailedActionName);
163 }