This is pretty unused and gets in the way of the next steps.
A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
Added GTK_BUILDER_ERROR_INVALID_PROPERTY and GTK_BUILDER_ERROR_INVALID_SIGNAL
error codes
ObjectInfo: Use a GType instead of a char * for the class name.
PropertyInfo: Use a GParamSpec instead of a char * for the property name.
SignalInfo: Use signal id and detail quark instead of a detailed signal name string.
This not only save us a few malloc in each case but lets us simplify the code
and report unknown properties and signals as a parsing error instead of just
printing a warning.
This commit implements the needed machinery for GtkWidget
to build it's composite content from GtkBuilder XML and
adds the following API:
o gtk_widget_init_template()
An api to be called in instance initializers of any
GtkWidget subclass that uses template XML to build it's components.
o gtk_widget_class_set_template()
API to associate GtkBuilder XML to a given GtkWidget subclass
o gtk_widget_class_automate_child()
API to declare an object built by GtkBuilder to be associated
with an instance structure offset and automatically set.
o gtk_widget_get_automated_child()
API for bindings to fetch a child declared to be automated by
gtk_widget_class_automate_child(), for the case where bindings
do not generate GObjects under the hood and cannot use structure
offsets to resolve composite object pointers.
o gtk_widget_class_declare_callback[s]()
Declare static functions to be used in signal callbacks from
a given class's template XML
o gtk_widget_class_set_connect_func()
API for bindings to override the signal connection machinery
for a given GtkWidget derived class.
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.
In preperation for composite objects, for better encapsulation
the following APIs are added to allow handling of signals declared
in the XML with callbacks declared statically.
o gtk_builder_add_callback_symbol[s]()
Adds a symbol to the internal symbol hash
o gtk_builder_lookup_symbol()
Looks up a symbol, exposed in case added symbols are used
in conjunction with gtk_builder_connect_signals_full()
The default implementation of gtk_builder_connect_signals() now
does not have a strong requirement on GModule (or a strong requirement
on symbols being declared in the global namespace). Instead GModule
is used as a fallback in the case that symbols are not declared
explicitly.
There are new calls to load ui files from resources, and
you can now read pixbufs by using relative paths in a ui
file read from a resource, or by using absolute resource:/// uris.
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
macros for each included backend, include it in gdk.h and install
it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
2008-07-15 Paolo Borelli <pborelli@katamail.com>
Bug 447998 - GtkBuilder does not support building parts of the xml tree
* gtk/gtkbuilder.c:
* gtk/gtkbuilder.h:
* gtk/gtkbuilderprivate.h:
* gtk/gtkbuilderparser.c:
* gtk/gtk.symbols:
Add two new functions that allow cherry picking and construct
objects from a ui description file or string.
* gtk/tests/builder.c: tests for the above.
svn path=/trunk/; revision=20845
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-06-05 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtkbuilder.h (enum): Add the new version mismatch error
constant to the end of the list, to avoid breaking the stable ABI
svn path=/trunk/; revision=20319
2008-05-28 Michael Natterer <mitch@imendio.com>
* gtk/gtk.h: define __GTK_H_INSIDE__ around including all other
headers.
* gtk/gtktypebuiltins.h.template
* gtk/gtkversion.h.in
* gtk/gtk*.h: add single-include guards that #error out if
GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
included individually.
* gtk/gtkprintbackend.h
* gtk/gtkprinter-private.h
* gtk/gtktextlayout.h
* gtk/gtktexttagprivate.h
* gtk/gtktexttypes.h
* gtk/gtktreedatalist.h: include <gtk/gtk.h> instead of individual
headers in these private or semi-private headers.
* gtk/gtkimmodule.h: also here because it's not in gtk.h.
* gtk/gtkpagesetupunixdialog.h
* gtk/gtkprinter.h
* gtk/gtkprintjob.h
* gtk/gtkprintunixdialog.h: likewise in the gtkunixprint headers.
* gtk/gtkclist.h
* gtk/gtkcombo.h
* gtk/gtkctree.h
* gtk/gtkfilesel.h
* gtk/gtkitemfactory.h
* gtk/gtklist.h
* gtk/gtklistitem.h
* gtk/gtkoldeditable.h
* gtk/gtkoptionmenu.h
* gtk/gtkpixmap.h
* gtk/gtkpreview.h
* gtk/gtksignal.h
* gtk/gtktipsquery.h: whenever possible, include only <gtk/gtk.h>
instead of individual headers in these deprecated headers. They
don't get included at all when GTK_DISABLE_DEPRECATED is defined,
so if an app needs them anyway, it must undef GTK_DISABLE_DEPRECATED
and include them individually, which should continue to work.
* gtk/gtkclist.c: include "gtkctree.h" because of the change
above.
svn path=/trunk/; revision=20221
* gtk/gtkbuilderprivate.h, gtk/gtkbuilder.h, gtk/gtkbuilderparser.c:
Added support for parsing required toolkit versions (so that ui descriptions
can target specific versions of the backend widget libraries) bug 527612.
* gtk/docs/reference/gtk/tmpl/gtkbuilder.sgml: Added documentation
for the added xml tags to the ui description.
svn path=/trunk/; revision=20152
* gtk/gtkbuilder.h (enum):
* gtk/gtkbuilderparser.c (end_element):
* tests/buildertest.c (test_parser):
Set an error if we encounter properties without values set
(#451303, Philip Withnall)
svn path=/trunk/; revision=18252