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  = GtkActivatable.html
27  * outPack = gtk
28  * outFile = ActivatableIF
29  * strct   = GtkActivatable
30  * realStrct=
31  * ctorStrct=
32  * clss    = ActivatableT
33  * interf  = ActivatableIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_activatable_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- gtk.Action
47  * structWrap:
48  * 	- GtkAction* -> Action
49  * module aliases:
50  * local aliases:
51  * overrides:
52  */
53 
54 module gtk.ActivatableIF;
55 
56 public  import gtkc.gtktypes;
57 
58 private import gtkc.gtk;
59 private import glib.ConstructionException;
60 private import gobject.ObjectG;
61 
62 
63 private import gtk.Action;
64 
65 
66 
67 
68 /**
69  * Activatable widgets can be connected to a GtkAction and reflects
70  * the state of its action. A GtkActivatable can also provide feedback
71  * through its action, as they are responsible for activating their
72  * related actions.
73  *
74  * Implementing GtkActivatable
75  *
76  * When extending a class that is already GtkActivatable; it is only
77  * necessary to implement the GtkActivatable->sync_action_properties()
78  * and GtkActivatable->update() methods and chain up to the parent
79  * implementation, however when introducing
80  * a new GtkActivatable class; the "related-action" and
81  * "use-action-appearance" properties need to be handled by
82  * the implementor. Handling these properties is mostly a matter of installing
83  * the action pointer and boolean flag on your instance, and calling
84  * gtk_activatable_do_set_related_action() and
85  * gtk_activatable_sync_action_properties() at the appropriate times.
86  *
87  * $(DDOC_COMMENT example)
88  */
89 public interface ActivatableIF
90 {
91 	
92 	
93 	public GtkActivatable* getActivatableTStruct();
94 	
95 	/** the main Gtk struct as a void* */
96 	protected void* getStruct();
97 	
98 	
99 	/**
100 	 */
101 	
102 	/**
103 	 * Warning
104 	 * gtk_activatable_do_set_related_action is deprecated and should not be used in newly-written code. 3.10
105 	 * This is a utility function for GtkActivatable implementors.
106 	 * When implementing GtkActivatable you must call this when
107 	 * handling changes of the "related-action", and
108 	 * you must also use this to break references in GObject->dispose().
109 	 * This function adds a reference to the currently set related
110 	 * action for you, it also makes sure the GtkActivatable->update()
111 	 * method is called when the related GtkAction properties change
112 	 * and registers to the action's proxy list.
113 	 * Note
114 	 * Be careful to call this before setting the local
115 	 * copy of the GtkAction property, since this function uses
116 	 * gtk_activatable_get_related_action() to retrieve the
117 	 * previous action
118 	 * Since 2.16
119 	 * Params:
120 	 * action = the GtkAction to set
121 	 */
122 	public void doSetRelatedAction(Action action);
123 	
124 	/**
125 	 * Warning
126 	 * gtk_activatable_get_related_action is deprecated and should not be used in newly-written code. 3.10
127 	 * Gets the related GtkAction for activatable.
128 	 * Since 2.16
129 	 * Returns: the related GtkAction if one is set. [transfer none]
130 	 */
131 	public Action getRelatedAction();
132 	
133 	/**
134 	 * Warning
135 	 * gtk_activatable_get_use_action_appearance is deprecated and should not be used in newly-written code. 3.10
136 	 * Gets whether this activatable should reset its layout
137 	 * and appearance when setting the related action or when
138 	 * the action changes appearance.
139 	 * Since 2.16
140 	 * Returns: whether activatable uses its actions appearance.
141 	 */
142 	public int getUseActionAppearance();
143 	
144 	/**
145 	 * Warning
146 	 * gtk_activatable_sync_action_properties is deprecated and should not be used in newly-written code. 3.10
147 	 * This is called to update the activatable completely, this is called
148 	 * internally when the "related-action" property is set
149 	 * or unset and by the implementing class when
150 	 * "use-action-appearance" changes.
151 	 * Since 2.16
152 	 * Params:
153 	 * action = the related GtkAction or NULL. [allow-none]
154 	 */
155 	public void syncActionProperties(Action action);
156 	
157 	/**
158 	 * Warning
159 	 * gtk_activatable_set_related_action is deprecated and should not be used in newly-written code. 3.10
160 	 * Sets the related action on the activatable object.
161 	 * Note
162 	 * GtkActivatable implementors need to handle the "related-action"
163 	 * property and call gtk_activatable_do_set_related_action() when it changes.
164 	 * Since 2.16
165 	 * Params:
166 	 * action = the GtkAction to set
167 	 */
168 	public void setRelatedAction(Action action);
169 	
170 	/**
171 	 * Warning
172 	 * gtk_activatable_set_use_action_appearance is deprecated and should not be used in newly-written code. 3.10
173 	 * Sets whether this activatable should reset its layout and appearance
174 	 * when setting the related action or when the action changes appearance
175 	 * Note
176 	 * GtkActivatable implementors need to handle the
177 	 * "use-action-appearance" property and call
178 	 * gtk_activatable_sync_action_properties() to update activatable
179 	 * if needed.
180 	 * Since 2.16
181 	 * Params:
182 	 * useAppearance = whether to use the actions appearance
183 	 */
184 	public void setUseActionAppearance(int useAppearance);
185 }