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