GtkBuilder: Add private _gtk_builder_extend_with_template()

This adds the definition of the <template> tag with some documentation
on the variant of the format.

_gtk_builder_extend_with_template() is to be used while GtkContainer
builds from composite templates. A couple of error codes are also added
to handle a few new possible failure cases.

DTD Files gtkbuilder.rnc and gtkbuilder.rng have been updated to include
the new <template> tag and it's attributes.
This commit is contained in:
Tristan Van Berkom
2013-03-20 16:33:52 +09:00
parent 82583640a2
commit b7da0d21f8
6 changed files with 297 additions and 20 deletions

View File

@ -1,6 +1,6 @@
start = element interface {
attribute domain { text } ?,
( requires | object | menu ) *
( requires | object | template | menu ) *
}
requires = element requires {
@ -16,6 +16,12 @@ object = element object {
(property | signal | child | ANY) *
}
template = element template {
attribute class { text },
attribute parent { text },
(property | signal | child | ANY) *
}
property = element property {
attribute name { text },
attribute translatable { "yes" | "no" } ?,
@ -76,7 +82,7 @@ section = element section {
(attribute_ | item | submenu | section) *
}
ANY = element * - (interface | requires | object | property | signal | child | menu | item | attribute | link | submenu | section) {
ANY = element * - (interface | requires | object | template | property | signal | child | menu | item | attribute | link | submenu | section) {
attribute * { text } *,
(ALL * & text ?)
}