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