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