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