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 	 * Adds a child to @buildable. @type is an optional string
59 	 * describing how the child should be added.
60 	 *
61 	 * Params:
62 	 *     builder = a #GtkBuilder
63 	 *     child = child to add
64 	 *     type = kind of child or %NULL
65 	 *
66 	 * Since: 2.12
67 	 */
68 	public void addChild(Builder builder, ObjectG child, string type);
69 
70 	/**
71 	 * Constructs a child of @buildable with the name @name.
72 	 *
73 	 * #GtkBuilder calls this function if a “constructor” has been
74 	 * specified in the UI definition.
75 	 *
76 	 * Params:
77 	 *     builder = #GtkBuilder used to construct this object
78 	 *     name = name of child to construct
79 	 *
80 	 * Return: the constructed child
81 	 *
82 	 * Since: 2.12
83 	 */
84 	public ObjectG constructChild(Builder builder, string name);
85 
86 	/**
87 	 * This is similar to gtk_buildable_parser_finished() but is
88 	 * called once for each custom tag handled by the @buildable.
89 	 *
90 	 * Params:
91 	 *     builder = a #GtkBuilder
92 	 *     child = child object or %NULL for non-child tags
93 	 *     tagname = the name of the tag
94 	 *     data = user data created in custom_tag_start
95 	 *
96 	 * Since: 2.12
97 	 */
98 	public void customFinished(Builder builder, ObjectG child, string tagname, void* data);
99 
100 	/**
101 	 * This is called at the end of each custom element handled by
102 	 * the buildable.
103 	 *
104 	 * Params:
105 	 *     builder = #GtkBuilder used to construct this object
106 	 *     child = child object or %NULL for non-child tags
107 	 *     tagname = name of tag
108 	 *     data = user data that will be passed in to parser functions
109 	 *
110 	 * Since: 2.12
111 	 */
112 	public void customTagEnd(Builder builder, ObjectG child, string tagname, void** data);
113 
114 	/**
115 	 * This is called for each unknown element under <child>.
116 	 *
117 	 * Params:
118 	 *     builder = a #GtkBuilder used to construct this object
119 	 *     child = child object or %NULL for non-child tags
120 	 *     tagname = name of tag
121 	 *     parser = a #GMarkupParser to fill in
122 	 *     data = return location for user data that will be passed in
123 	 *         to parser functions
124 	 *
125 	 * Return: %TRUE if a object has a custom implementation, %FALSE
126 	 *     if it doesn't.
127 	 *
128 	 * Since: 2.12
129 	 */
130 	public bool customTagStart(Builder builder, ObjectG child, string tagname, out GMarkupParser parser, out void* data);
131 
132 	/**
133 	 * Get the internal child called @childname of the @buildable object.
134 	 *
135 	 * Params:
136 	 *     builder = a #GtkBuilder
137 	 *     childname = name of child
138 	 *
139 	 * Return: the internal child of the buildable object
140 	 *
141 	 * Since: 2.12
142 	 */
143 	public ObjectG getInternalChild(Builder builder, string childname);
144 
145 	/**
146 	 * Gets the name of the @buildable object.
147 	 *
148 	 * #GtkBuilder sets the name based on the
149 	 * [GtkBuilder UI definition][BUILDER-UI]
150 	 * used to construct the @buildable.
151 	 *
152 	 * Return: the name set with gtk_buildable_set_name()
153 	 *
154 	 * Since: 2.12
155 	 */
156 	public string buildableGetName();
157 
158 	/**
159 	 * Called when the builder finishes the parsing of a
160 	 * [GtkBuilder UI definition][BUILDER-UI].
161 	 * Note that this will be called once for each time
162 	 * gtk_builder_add_from_file() or gtk_builder_add_from_string()
163 	 * is called on a builder.
164 	 *
165 	 * Params:
166 	 *     builder = a #GtkBuilder
167 	 *
168 	 * Since: 2.12
169 	 */
170 	public void parserFinished(Builder builder);
171 
172 	/**
173 	 * Sets the property name @name to @value on the @buildable object.
174 	 *
175 	 * Params:
176 	 *     builder = a #GtkBuilder
177 	 *     name = name of property
178 	 *     value = value of property
179 	 *
180 	 * Since: 2.12
181 	 */
182 	public void setBuildableProperty(Builder builder, string name, Value value);
183 
184 	/**
185 	 * Sets the name of the @buildable object.
186 	 *
187 	 * Params:
188 	 *     name = name to set
189 	 *
190 	 * Since: 2.12
191 	 */
192 	public void buildableSetName(string name);
193 }