Allows objects to extend and customize deserialization from ui files.
The <GtkBuildable> interface includes methods
for setting names and properties of objects, parsing custom tags and
constructing child objects.
It is implemented by all widgets and many of the non-widget objects that
are provided by GTK. The main user of this interface is
<GtkBuilder>. 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 <GtkBuilder> XML format or run any extra
routines at deserialization time.
Gets the ID of the self object.
<GtkBuilder> sets the name based on the ID
attribute of the <object> tag used to construct the self.
Passed: a <GtkBuildable>.
Returned: a string, or #f.
the ID of the buildable object
Adds a child to self. type is an optional string describing how the child should be added.
To override it in a new class, give register-type #:vfuncs
`((add-child . ,procedure)). The procedure is called as
(procedure self builder child type).
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a <GtkBuilder>.
Passed: a <GObject>.
child to add
Passed, or left out: a string, or #f.
kind of child or #f
Similar to gtk_buildable_parser_finished() but is called once for
each custom tag handled by the self.
To override it in a new class, give register-type #:vfuncs
`((custom-finished . ,procedure)). The procedure is called as
(procedure self builder child tagname data).
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a <GtkBuilder>.
Passed: a <GObject>, or #f.
child object or #f for non-child tags
Passed: a string.
the name of the tag
Passed, or left out: a foreign pointer, or a bytevector, or #f.
user data created in custom_tag_start
Called at the end of each custom element handled by the buildable.
To override it in a new class, give register-type #:vfuncs
`((custom-tag-end . ,procedure)). The procedure is called as
(procedure self builder child tagname data).
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a <GtkBuilder>.
<GtkBuilder> used to construct this object
Passed: a <GObject>, or #f.
child object or #f for non-child tags
Passed: a string.
name of tag
Passed, or left out: a foreign pointer, or a bytevector, or #f.
user data that will be passed in to parser functions
The getter corresponding to set-id. Implement this if you implement set-id.
To override it in a new class, give register-type #:vfuncs
`((get-id . ,procedure)). The procedure is called as (procedure
self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Returned: a string.
Retrieves the internal child called childname of the self object.
To override it in a new class, give register-type #:vfuncs
`((get-internal-child . ,procedure)). The procedure is called as
(procedure self builder childname) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a <GtkBuilder>.
Passed: a string.
name of child
Returned: a <GObject>.
the internal child of the buildable object
Called when a builder finishes the parsing of a UI definition. It is
normally not necessary to implement this, unless you need to perform
special cleanup actions. <GtkWindow> sets the
widget:visible property here.
To override it in a new class, give register-type #:vfuncs
`((parser-finished . ,procedure)). The procedure is called as
(procedure self builder).
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a <GtkBuilder>.
Sets a property of a buildable object. It is normally not necessary to
implement this, object:set-property is used by default.
<GtkWindow> implements this to delay showing itself
(i.e. setting the widget:visible
property) until the whole interface is created.
To override it in a new class, give register-type #:vfuncs
`((set-buildable-property . ,procedure)). The procedure is called as
(procedure self builder name value).
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a <GtkBuilder>.
Passed: a string.
Passed: a <GValue>.
Stores the id attribute given in the <GtkBuilder>
UI definition. <GtkWidget> stores the name as
object data. Implement this method if your object has some notion of
“ID” and it makes sense to map the XML id attribute to it.
To override it in a new class, give register-type #:vfuncs
`((set-id . ,procedure)). The procedure is called as (procedure
self id).
Passed: the class whose implementation to call: a class that implements
<GtkBuildable>, or its GType number.
Passed: a <GtkBuildable>.
Passed: a string.