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  = GtkBuildable.html
27  * outPack = gtk
28  * outFile = BuildableIF
29  * strct   = GtkBuildable
30  * realStrct=
31  * ctorStrct=
32  * clss    = BuildableT
33  * interf  = BuildableIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_buildable_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- gobject.ObjectG
48  * 	- gobject.Value
49  * 	- gtk.Builder
50  * structWrap:
51  * 	- GObject* -> ObjectG
52  * 	- GValue* -> Value
53  * 	- GtkBuilder* -> Builder
54  * module aliases:
55  * local aliases:
56  * 	- getName -> buildableGetName
57  * 	- setName -> buildableSetName
58  * overrides:
59  */
60 
61 module gtk.BuildableIF;
62 
63 public  import gtkc.gtktypes;
64 
65 private import gtkc.gtk;
66 private import glib.ConstructionException;
67 private import gobject.ObjectG;
68 
69 
70 private import glib.Str;
71 private import gobject.ObjectG;
72 private import gobject.Value;
73 private import gtk.Builder;
74 
75 
76 
77 
78 /**
79  * GtkBuildable allows objects to extend and customize their deserialization
80  * from GtkBuilder UI descriptions.
81  * The interface includes methods for setting names and properties of objects,
82  * parsing custom tags and constructing child objects.
83  *
84  * The GtkBuildable interface is implemented by all widgets and
85  * many of the non-widget objects that are provided by GTK+. The
86  * main user of this interface is GtkBuilder. There should be
87  * very little need for applications to call any
88  * gtk_buildable_... functions.
89  *
90  * Note
91  *
92  * An object only needs to implement this interface if it needs
93  * to extend the GtkBuilder format or run any extra routines at deserialization time
94  */
95 public interface BuildableIF
96 {
97 	
98 	
99 	public GtkBuildable* getBuildableTStruct();
100 	
101 	/** the main Gtk struct as a void* */
102 	protected void* getStruct();
103 	
104 	
105 	/**
106 	 */
107 	
108 	/**
109 	 * Sets the name of the buildable object.
110 	 * Since 2.12
111 	 * Params:
112 	 * buildable = a GtkBuildable
113 	 * name = name to set
114 	 */
115 	public void buildableSetName(string name);
116 	
117 	/**
118 	 * Gets the name of the buildable object.
119 	 * GtkBuilder sets the name based on the
120 	 * GtkBuilder UI definition
121 	 * used to construct the buildable.
122 	 * Since 2.12
123 	 * Params:
124 	 * buildable = a GtkBuildable
125 	 * Returns: the name set with gtk_buildable_set_name()
126 	 */
127 	public string buildableGetName();
128 	
129 	/**
130 	 * Adds a child to buildable. type is an optional string
131 	 * describing how the child should be added.
132 	 * Since 2.12
133 	 * Params:
134 	 * builder = a GtkBuilder
135 	 * child = child to add
136 	 * type = kind of child or NULL. [allow-none]
137 	 */
138 	public void addChild(Builder builder, ObjectG child, string type);
139 	
140 	/**
141 	 * Sets the property name name to value on the buildable object.
142 	 * Since 2.12
143 	 * Params:
144 	 * builder = a GtkBuilder
145 	 * name = name of property
146 	 * value = value of property
147 	 */
148 	public void setBuildableProperty(Builder builder, string name, Value value);
149 	
150 	/**
151 	 * Constructs a child of buildable with the name name.
152 	 * GtkBuilder calls this function if a "constructor" has been
153 	 * specified in the UI definition.
154 	 * Since 2.12
155 	 * Params:
156 	 * builder = GtkBuilder used to construct this object
157 	 * name = name of child to construct
158 	 * Returns: the constructed child. [transfer full]
159 	 */
160 	public ObjectG constructChild(Builder builder, string name);
161 	
162 	/**
163 	 * This is called for each unknown element under <child>.
164 	 * Since 2.12
165 	 * Params:
166 	 * builder = a GtkBuilder used to construct this object
167 	 * child = child object or NULL for non-child tags. [allow-none]
168 	 * tagname = name of tag
169 	 * parser = a GMarkupParser structure to fill in. [out]
170 	 * data = return location for user data that will be passed in
171 	 * to parser functions. [out]
172 	 * Returns: TRUE if a object has a custom implementation, FALSE if it doesn't.
173 	 */
174 	public int customTagStart(Builder builder, ObjectG child, string tagname, GMarkupParser* parser, void** data);
175 	
176 	/**
177 	 * This is called at the end of each custom element handled by
178 	 * the buildable.
179 	 * Since 2.12
180 	 * Params:
181 	 * builder = GtkBuilder used to construct this object
182 	 * child = child object or NULL for non-child tags. [allow-none]
183 	 * tagname = name of tag
184 	 * data = user data that will be passed in to parser functions. [type gpointer]
185 	 */
186 	public void customTagEnd(Builder builder, ObjectG child, string tagname, void** data);
187 	
188 	/**
189 	 * This is similar to gtk_buildable_parser_finished() but is
190 	 * called once for each custom tag handled by the buildable.
191 	 * Since 2.12
192 	 * Params:
193 	 * builder = a GtkBuilder
194 	 * child = child object or NULL for non-child tags. [allow-none]
195 	 * tagname = the name of the tag
196 	 * data = user data created in custom_tag_start
197 	 */
198 	public void customFinished(Builder builder, ObjectG child, string tagname, void* data);
199 	
200 	/**
201 	 * Called when the builder finishes the parsing of a
202 	 * GtkBuilder UI definition.
203 	 * Note that this will be called once for each time
204 	 * gtk_builder_add_from_file() or gtk_builder_add_from_string()
205 	 * is called on a builder.
206 	 * Since 2.12
207 	 * Params:
208 	 * builder = a GtkBuilder
209 	 */
210 	public void parserFinished(Builder builder);
211 	
212 	/**
213 	 * Get the internal child called childname of the buildable object.
214 	 * Since 2.12
215 	 * Params:
216 	 * builder = a GtkBuilder
217 	 * childname = name of child
218 	 * Returns: the internal child of the buildable object. [transfer none]
219 	 */
220 	public ObjectG getInternalChild(Builder builder, string childname);
221 }