GtkBuildable allows objects to extend and customize their deserialization from [GtkBuilder UI descriptions][BUILDER-UI]. The interface includes methods for setting names and properties of objects, parsing custom tags and constructing child objects.

The GtkBuildable interface is implemented by all widgets and many of the non-widget objects that are provided by GTK+. The main user of this interface is gtk.Builder There should be very little need for applications to call any of these functions directly.

An object only needs to implement this interface if it needs to extend the gtk.Builder format or run any extra routines at deserialization time.



void addChild(Builder builder, ObjectG child, string type)

Adds a child to buildable. type is an optional string describing how the child should be added.

string buildableGetName()

Gets the name of the buildable object.

void buildableSetName(string name)

Sets the name of the buildable object.

ObjectG constructChild(Builder builder, string name)

Constructs a child of buildable with the name name.

void customFinished(Builder builder, ObjectG child, string tagname, void* data)

This is similar to gtk_buildable_parser_finished() but is called once for each custom tag handled by the buildable.

void customTagEnd(Builder builder, ObjectG child, string tagname, void** data)

This is called at the end of each custom element handled by the buildable.

bool customTagStart(Builder builder, ObjectG child, string tagname, GMarkupParser parser, void* data)

This is called for each unknown element under <child>.

GtkBuildable* getBuildableStruct(bool transferOwnership)

Get the main Gtk struct

ObjectG getInternalChild(Builder builder, string childname)

Get the internal child called childname of the buildable object.

void* getStruct()

the main Gtk struct as a void*

void parserFinished(Builder builder)

Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time Builder.addFromFile or Builder.addFromString is called on a builder.

void setBuildableProperty(Builder builder, string name, Value value)

Sets the property name name to value on the buildable object.

Static functions

GType getType()