Index: pkg/pygtk/branches/upstream/current/ChangeLog.pre-2-0
===================================================================
--- pkg/pygtk/branches/upstream/current/ChangeLog.pre-2-0	(revision 4)
+++ pkg/pygtk/branches/upstream/current/ChangeLog.pre-2-0	(revision 4)
@@ -0,0 +1,6521 @@
+2003-09-01  James Henstridge  <james@daa.com.au>
+
+	* configure.in: increment version number.
+
+	* NEWS: add news items.
+
+2003-08-31  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtktreeview.override (pygtk_cell_data_func_marshal): get rid
+	of the last argument in the cunote->data==NULL case.
+	PyEval_CallFunction() was ignoring it anyway.  Fixes bug #121100.
+
+2003-08-26  James Henstridge  <james@daa.com.au>
+
+	* PKG-INFO.in (Classifier): add PKG-INFO file for submission to
+	Python package index.
+
+2003-08-25  John Finlay <finlay@moeraki.com>
+
+	* gtk/gtktextview.override
+	(_wrap_gtk_text_view_set_border_window_size): Add missing break to
+	switch (bug #120669). Patch by Doug Quale.
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_loader_write) Allow count to
+	override buf_len if in range 0 to buf_len (bug #120680).
+
+2003-08-24  James Henstridge  <james@daa.com.au>
+
+	* NEWS: add news items.
+
+	* configure.in: update version number.
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_new): Fix typo
+	found by John Finlay (bug #120517).
+
+	* gtk/gtk.defs (pack_start_defaults): mark deprecated in favour of
+	pack_start.  Fixes bug #118715.
+	(pack_end_defaults): similar here.
+	(attach_defaults): similar here.
+
+	* gtk/libglade.override (_wrap_glade_set_custom_handler): wrap
+	glade_set_custom_handler in a more direct way.  Implementation
+	based on the one in bug #119138.
+	(_wrap_glade_set_custom_widget_callbacks): deprecate this
+	function, and make it coexist better with the new one.
+
+2003-08-15  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_remove): Move to
+	autogenerated, since it need to return a GtkTreeIter.
+
+2003-08-02  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf__get_pixel_array): fix up
+	order of dimensions in pixel array (bug #118839).
+
+	* atk.override (NO_IMPORT_PYGOBJECT): define NO_IMPORT_PYGOBJECT
+	to get rid of multiple definitions of symbols.  Patch from Naofumi
+	Yasufuku <naofumi@yasufuku.net> (bug #118835).
+
+	* Makefile.am, gtk/Makefile.am (common_ldflags): switch the
+	-no-undefined switch back to being win32 only.  In particular,
+	caused breakage on OS X.
+
+2003-07-31  James Henstridge  <james@daa.com.au>
+
+	* NEWS: add some news items.
+
+	* configure.in: increment version number.
+
+	* pygobject.c (pygobject_handler_is_connected): add wrapper (from
+	bug #118676).
+
+	* pygtype.c (pyg_object_descr_doc_get): add a call to
+	PyType_Ready() to make sure the type is initialised (bug #118699).
+
+2003-07-26  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override: apply Elliot Lee's threading patch.  Still
+	need to fix the remaining threading problems.
+
+2003-07-25  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_get_dest_row_at_pos): add wrapper (bug #116133).
+
+	* gtk/gtk.override (ignore): ignore some gtk_rc_* functions.
+
+2003-07-24  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtk.h (init_pygtk): same here.
+
+	* pygobject.h (init_pygobject): convert fatal errors to normal
+	exceptions.
+
+	* gtk/gtkglmodule.c (initgl): same here.
+
+	* gtk/libglademodule.c (initglade): same here.
+
+	* gtk/gtkmodule.c (init_gtk): same here.
+
+	* atkmodule.c (initatk): same here.
+
+	* pangomodule.c (initpango): same here.
+
+	* gobjectmodule.c (initgobject): don't cause fatal errors if an
+	exception on init.
+
+	* codegen/codegen.py (write_source): print an error message if it
+	isn't possible to import a particular name from the module.
+
+	* autogen.sh (DIE): require Automake 1.7.
+
+	* configure.in (AC_ARG_ENABLE): enable thread support by default.
+
+2003-07-23  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_add_buttons): add
+	add_buttons() method (bug #109620).
+
+2003-07-23  Ian McKellar  <yakk@yakk.net>
+
+	* gtk/Makefile.am: build fix
+
+2003-07-22  James Henstridge  <james@daa.com.au>
+
+	* codegen/scmexpr.py (parse): print a real error if we find a
+	string or identifier outside of a s-expression (bug #104311).
+
+	* gtk/gtktreeview.override: wrappers for tree model drag
+	source/dest functions from Emmanuele Bassi (bug #116133).
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_model_rows_reordered):
+	add wrapper (from Arjan J. Molenaar, bug #116005).
+
+	* gtk/Makefile.am: fix a bug I introduced into the makefile
+	yesterday, and fix dependencies for gtk.c.
+
+2003-07-20  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.override (gdk_window_new) Wrap gdk_window_new as a
+	constructor for gtk.gdk.Window(). Fixes #117860.
+
+2003-07-20  James Henstridge  <james@daa.com.au>
+
+	* gtk/Makefile.am: same here.
+
+	* Makefile.am: change *module.so to *.so.  Seems to be the
+	preferred extension these days ...
+
+2003-07-12  John Finlay  <finlay@moeraki.com>
+
+	* pango.override (_wrap_PANGO_ASCENT, _wrap_PANGO_DESCENT)
+	(_wrap_PANGO_LBEARING, _wrap_PANGO_RBEARING)
+	Add these function overrides. Fixes #116920.
+
+	* pango.defs (PIXELS, ASCENT, DESCENT, LBEARING, RBEARING)
+	Add defs for these. Fixes #116920.
+
+	* pangomodule.c (initpango) Add pango.SCALE constant. Fixes #116920.
+
+	* pango.override (PangoAttrIterator) Add this type and its methods.
+
+2003-07-11  John Finlay  <finlay@moeraki.com>
+
+	* pango.override (pypango_attr_new) Add start and end args to specify
+	start_index and end_index values.
+	(pypango_attr_copy) Specify copying start_index and end_index.
+	(_wrap_pango_attr_*_new) Allow the pango.Attr* functions to optionally
+	specify	start_index and end_index values. Fixes #116776.
+
+	* pango.override (pypango_attr_tp_getattr)
+	(pypango_attr_get_type) Add these to provide pango.Attribute type
+	information and access to attribute type specific data. Fixes #116691.
+
+	* pango.defs (pango_color_parse) Make this a constructor for
+	pango.Color. Fixes #116662.
+
+	* pango.override (_wrap_pango_color_parse) Add constructor wrapper.
+	Fixes #116662.
+
+	* gtk/gtk.defs (gtk_tree_model_sort_convert_iter_to_child_iter)
+	Allow sort_iter to be NULL. Fixes #113097
+	(gtk_tree_model_sort_convert_child_iter_to_iter)
+	Allow child_iter to be NULL. Fixes #113097
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_model_sort_convert_iter_to_child_iter)
+	Allow the child_iter to be NULL and return the converted iter but 
+	allow child_iter to be passed in for backward compatibility.
+	Fixes #113097
+	(_wrap_gtk_tree_model_sort_convert_child_iter_to_iter)
+	Allow the sort_iter to be NULL and return the converted iter but 
+	allow sort_iter to be passed in for backward compatibility.
+	Fixes #113097
+
+2003-07-03  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (GtkWindow.set_icon): allow passing None as the
+	icon (fixes bug #116072).
+	(GtkTreeViewColumn.set_widget): allow passing None for the column
+	header widget (fixes bug #115027).
+
+	* gobjectmodule.c (pyg_error_check): change first block threads
+	instead of unblocking them here.  (Looks like John forgot to check
+	this part in).
+
+2003-05-03  Naofumi Yasufuku  <naofumi@yasufuku.net>
+
+	Bug #110619:
+	
+	* dsextras.py (InstallLib.prepare): Fixed self.prefix
+	initialization for win32.
+	(BuildExt.init_extra_compile_args, BuildExt.build_extensions)
+	(BuildExt.build_extension): On win32, add MinGW GCC option for
+	MSVC compatible struct packing (gcc2: -fnative-struct, gcc3:
+	-mms-bitfields).
+	(BuildExt.modify_compiler, BuildExt.build_extensions): On win32,
+	remove '-static' linker option to prevent MinGW ld from trying to
+	link with MSVC import libraries.
+
+	* setup.py: Changed list_files('codegen/*.py') to
+	list_files(os.path.join('codegen', '*.py')) for win32.
+	Fixed pygtk.h installation directory.
+
+2003-07-02  James Henstridge  <james@daa.com.au>
+
+	* dsextras.py (pkgc_version_check): remove "self.", fixing bug
+	111002 (pointed out by Seth Nickell).
+
+2003-07-01  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_button_box_get_child_size)
+	(_wrap_gtk_button_box_get_child_ipadding): Add deprecation warnings.
+	Fixes #110663.
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_animation_get_iter)
+	(_wrap_gdk_pixbuf_animation_iter_advance): Add methods. Fixes #114616.
+
+	* gtk/gdk.defs (gdk_pixmap_create_from_data): Allow NULL window arg.
+	Fixes #114661.
+
+	* gtk/gdk.defs (gdk_rectangle_new): Add GdkRectangle constructor.
+	Partial fix for #114743.
+
+	* gtk/gdk.override (_wrap_gdk_rectangle_union)
+	(_wrap_gdk_rectangle_intersect): Add keyword args and allow 4-tuple as
+	rectangle spec. Fixes #114743.
+
+	* gtk/gdk.override (_wrap_gdk_window_get_frame_extents): Return a
+	GdkRectangle. Fixes #114817.
+
+	* gtk/gdk.override (gdk_window_get_decorations): Add method.
+	Fixes #114821.
+
+	* gtk/gdk.defs (gdk_window_shape_combine_mask): shape_mask can be NULL.
+	Fixes #114952.
+
+	* gtk/gdk.override (_wrap_gdk_window_get_toplevels)
+	(_wrap_gdk_list_visuals): Add functions. Fixes #115046.
+
+	* gtk/gtktextview.override (_wrap_gtk_text_buffer_set_text)
+	(_wrap_gtk_text_buffer_insert)
+	(_wrap_gtk_text_buffer_insert_at_cursor)
+	(_wrap_gtk_text_buffer_insert_interactive)
+	(_wrap_gtk_text_buffer_insert_interactive_at_cursor):
+	Raise a ValueError exception if specified length greater than text
+	length. Fixes #115154.
+
+	* gtk/gtk.override (_wrap_gtk_accelerator_parse): Add function.
+	Fixes #115191.
+
+	* gtk/gtk.override (_wrap_gtk_accel_map_lookup_entry): Add function.
+	Fixes #115194.
+
+	* gtk/gtk.override (_wrap_gtk_accel_map_load_fd)
+	(_wrap_gtk_accel_map_save_fd): Allow fd arg to be a Python file object.
+	Fixes #115198.
+
+	* gtk/gtk.override (_wrap_gtk_color_selection_palette_from_string)
+	(_wrap_gtk_color_selection_palette_to_string): Add first and fix
+	second. Fixes #115206.
+
+	* gtk/gdk.defs (keyboard_ungrab) (rgb_get_colormap) (rgb_get_cmap): 
+	Add first two defs and add deprecation to last def. Fixes #115502.
+
+2003-06-30  John Finlay  <finlay@moeraki.com>
+
+	* gobjectmodule.c (pyg_error_check) Replace first pyg_unblock_threads
+	with pyg_block_threads. Fixes #116284.
+
+2003-06-30  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtkcellrenderer.c: same here.
+
+	* gtk/pygtktreemodel.c: don't explicitly import pygobject.h, so
+	that it gets included correctly by pygtk-private.h.  This should
+	fix the Mac OS X build issues.
+
+2003-06-27  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.defs (gdk_draw_layout_with_colors): Add deprecation warning.
+	Fixes 113954.
+
+	* gtk/gdk.defs (pixmap_new): Fix typo. Fixes #114659.
+
+	* gtk/gdk.override (_wrap_gdk_draw_layout): Add optional args
+	background and foreground (GdkColor) default to NULL. Fixes 113954.
+
+2003-06-26  James Henstridge  <james@daa.com.au>
+
+	* (lots of stuff): add copyright notices, and update to LGPL 2.1.
+
+2003-06-23  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/defsparser.py (DefsParser.ifdef): for some reason, the
+	list of arguments received now includes an extra empty string at
+	the beginning, so I corrected the indexes.
+
+2003-06-18  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_drawable__get_handle): fix bug
+	114619 (the #define we were using was private).
+
+2003-06-12  Joe Shaw  <joe@ximian.com>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_loader_write): Fix an invalid
+	python format string.
+
+2003-06-06  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobjectmodule.c (get_handler_priority): Fix bogus strcmp. Thanks to
+	John Ehresman for spotting this. Fixes #110489
+
+2003-06-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.override (_wrap_gdk_colormap_alloc_color): Allow
+	allocating a color using an unallocated gdk.Color. Patch by John
+	Finlay, fixes #113858
+
+	* gtk/gtk.defs (iter_children): Allow null for parent. Fixes #113577
+
+	* gtk/libglade.defs (set_custom_widget_callbacks): Added
+
+	* gtk/libglade.override (_wrap_glade_set_custom_widget_callbacks) 
+	(_wrap_glade_set_custom_widget_callbacks): Impl. Patch by Ross
+	Burton. Fixes #113271
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_loader_write): Make last
+	argument optional.
+	(_wrap_gdk_pixbuf_loader_new_with_type): Make first argument
+	optional, so we can open without specifying a type. Fixes #114206.
+	(_wrap_gdk_gc_set_values, _wrap_gdk_gc_set_values): Impl. Patch by
+	John Finlay, fixes #114449
+
+	* gtk/gdk-types.defs (Drawable): Add xid and handle attributes.
+
+	* gtk/gdk.override (_wrap_gdk_drawable__get_xid) 
+	(_wrap_gdk_drawable__get_xid): Implement for X11 and win32. Patch
+	by jkluebs@luebsphoto.com, fixes #109105
+
+	* gtk/gtk.override (_wrap_gtk_adjustment_set_all): Undeprecate,
+	add keywords. Based upon patch by kohler@icir.org, fixes #105220
+
+	* gtk/gtk-extrafuncs.defs (set_all): Undeprecate.
+
+	* gtk/gtk*.override: New files, splitted out from gtk.override
+	Fixes #103613
+
+	* gtk/Makefile.am (EXTRA_DIST): Add *.override here
+
+	* codegen/override.py (Overrides.__parse_override): Added
+	"include" keyword, to be able to include files in override files.
+	Fixes #103611
+
+2003-06-02  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_property_change): use short and long
+	instead of gint16 and gint32, so we don't break on 64 bit
+	platforms (Xlib uses those types, even though they don't match the
+	sizes).
+	If format==32 test if the type is ATOM or ATOM_PAIR, and if so
+	marshal the data into a (GdkAtom *) array instead of (long *).
+	Based on patch in bug 113860.
+	(_wrap_gdk_property_get): make similar changes to property_get.
+	(_wrap_gdk_property_get): the returned length is the length in
+	bytes, not number of elements.
+
+2003-05-30  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs (set_transient_for, set_default, set_focus): Accept
+	None as argument. Patch by John Finlay, fixes #113675
+
+	* gtk/gtk.override (_wrap_gtk_window_get_frame_dimensions): 
+	Impl. Patch by John Finlay, fixes #113568
+	(_wrap_gtk_widget_get_size_request): Impl. Patch by John Finlay,
+	fixes #113572
+	(_wrap_gtk_window_set_icon_list, _wrap_gtk_window_get_icon_list) 
+	(_wrap_gtk_window_set_default_icon_list) 
+	(_wrap_gtk_window_get_default_icon_list): Impl. Patch by John
+	Finlay, fixes #	113576
+	(pygtk_container_for_common_marshal, pygtk_container_for_common) 
+	(_wrap_gtk_label_get): Implement, share code with
+	GtkContainer.foreach, patch by Rui Lopes, fixes #113597
+
+	* gtk/gtk.defs (convert_path_to_child_path): Rename first argument
+	to sorted_path. Thanks to John Finlay, fixes #113102
+
+	* gtk/gtk.override (_wrap_gtk_text_tag_table_add): Raise
+	ValueError if the tag exists. Patch by
+	John Finlay, fixes #112796
+	(_wrap_gtk_text_view_set_border_window_size): Raise exceptions if
+	size is under 0 or a wrong type is specified. Patch by John
+	Finlay, fixes #112880
+	(_wrap_gtk_text_tag_table_remove): Raise ValueError if the tag
+	doesn't exist. Patch by John Finlay, fixes #112797
+	(_wrap_gtk_tooltips_data_get): Impl. Patch by John Finlay, fixes
+	#112952
+
+	* gtk/gdk.defs (set_icon_stock): Fix typo. Thanks to John
+	Finlay. fixes #113928
+
+	* gtk/gdk.override (_wrap_gdk_devices_list): Impl. Patch by John
+	Finlay, fixes #113919
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_set_text) 
+	(_wrap_gtk_text_buffer_insert) 
+	(_wrap_gtk_text_buffer_insert_at_cursor) 
+	(_wrap_gtk_text_buffer_insert_interactive) 
+	(_wrap_gtk_text_buffer_insert_interactive_at_cursor): 
+
+	* gtk/gdk.defs (gc_new): 
+
+	* gtk/gdk.override (_wrap_gdk_gc_new2): Backwards compatibility,
+	based on patch by Jonathan Blandford, fixes #113861
+
+2003-05-28  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/defsparser.py (DefsParser.__init__): Make the third
+	argument optional. This broke distutils.
+
+	* gobjectmodule.c, pygtype.c, gtk/gtk.override,
+	gtk/pygtkcellrenderer.c, pygtktreemodel.c: Remove unnecessary
+	calls to PyErr_Clear. It's not needed right after a
+	PyErr_Print. Thanks to Rui Lopes for spotting this.
+
+2003-05-28  James Henstridge  <james@daa.com.au>
+
+	* codegen/defsparser.py (IncludeParser.include): simplify.
+
+	* codegen/scmexpr.py (parse): set up so that it takes a filename
+	as an argument.  Also keep track of line numbers, so that more
+	useful error messages can be provided.
+
+2003-05-26  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/codegen.py (main): Parse -Dkey[=val] options.
+
+	* codegen/defsparser.py (DefsParser.__init__): Receive an
+	aditional 'defines' parameter, with a dictionary of all
+	-Dkey[=val] command-line options.
+	(DefsParser.ifdef): Handle (ifdef 'FOO  ... )
+
+2003-05-26  James Henstridge  <james@daa.com.au>
+
+	* codegen/scmexpr.py (parse): convert to a generator to allow
+	incremental parsing of defs files.
+
+2003-05-23  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/defsparser.py (IncludeParser.include): Made
+	pygtk-codegen able to read from stdin, by specifying a single dash
+	(-) as file name.
+
+2003-05-07  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_radio_button_set_group,
+	_wrap_gtk_radio_button_set_group): Implement. Patch by John
+	Finlay, fixes #112054 and #112058.	
+	(_wrap_gtk_ruler_get_range): Return a tuple of integers, not
+	doubles. Patch by John Finlay, fixes #111716.	
+	(_wrap_gtk_image_get_pixmap, _wrap_gtk_image_get_image) 
+	(_wrap_gtk_image_get_stock, _wrap_gtk_image_get) 
+	(_wrap_gtk_image_get_pixbuf, _wrap_gtk_image_get_animation):
+	Implement. Patch by John Finlay, fixes #111400.
+	(_wrap_gtk_scrolled_window_get_policy): Implement. Patch by John
+	Finlay, fixes #112247.
+	(_wrap_gtk_text_buffer_get_iter_at_child_anchor): Implement, Patch
+	by John Finlay, fixes #112524.
+
+	* gtk/gtk.defs (GtkImage.render_icon, set_image, 
+	GtkStyle.render_icon): Allow None to be sent in. Patch by John
+	Finlay, fixes #111389 and #111416.
+
+2003-04-29  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/Makefile.am (pygtk_PYTHON): Install dsextras.
+
+2003-04-27  Johan Dahlin  <jdahlin@async.com.br>
+
+	* setup.py (py_modules): Install dsextras.py
+
+2003-04-12  Naofumi Yasufuku  <naofumi@yasufuku.net>
+ 
+ 	* pango.defs (pango_context_get_metrics): Allow language parameter
+ 	to be omitted to get the metrics for the entire font.
+ 	(pango_itemize): Allow cached_iter parameter to be omitted.
+ 	(pango_font_description_better_match): Allow old_match parameter
+ 	to be omitted to determine if new_match is a match at all.
+ 	(pango_font_get_metrics): Allow language parameter to be omitted
+ 	to get the metrics for the entire font.
+ 	(pango_layout_set_font_description): Allow 'None' desc parameter
+ 	to unset the current font description.
+ 	(pango_layout_set_tabs): Allow 'None' tabs parameter to reinstate
+ 	the default tabs.
+ 	(pango_language_matches): Changed to function. Allow 'None'
+ 	language parameter which matches nothing but '*'.
+	Fixes #109848
+	
+2003-03-24  James Henstridge  <james@daa.com.au>
+
+	* pygobject-private.h: add missing "extern" keyword (from Glyph's
+	patch).
+
+2003-03-23  James Henstridge  <james@daa.com.au>
+
+	* setup.py: increment version number.
+
+	* NEWS: add news items.
+
+	* configure.in (numpy check): fix up check for Numeric and
+	increment version number.
+
+2003-03-21  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_tree_store_new):
+	(_wrap_gtk_list_store_new): This two are constructors, not normal
+	function, therefor return -1 as error and 0 as success.
+	Also a big tab/trailing whitespace cleanup. (so the patch is a lot
+	larger than it should be)
+
+2003-03-19  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.defs (get_option): Added.
+
+2003-03-13  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c: add doc comments.
+
+	* pygobject.c: add doc comments.
+
+	* pygboxed.c: add doc comments.
+
+2003-03-12  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c: add some documentation.
+
+2003-03-11  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.defs (set_back_pixmap): allow passing None for the
+	pixmap argument.
+
+	* gtk/gtk.override (_wrap_gtk_main_iteration): return boolean
+	(either Py_True or Py_False).
+	(_wrap_gtk_main_iteration_do): same here.
+	(_wrap_gtk_im_context_filter_keypress): and here.
+	(_wrap_gtk_text_attributes__get_strikethrough): and here.
+	(_wrap_gtk_text_attributes__get_draw_bg): and here.
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_tp_setitem): add a
+	setitem routine for GtkTreeStore and GtkListStore.
+	(_wrap_gtk_list_store_insert): add second argument to allow
+	setting the values in the row when creating it.
+	(_wrap_gtk_list_store_insert_before): same here.
+	(_wrap_gtk_list_store_insert_after): and here.
+	(_wrap_gtk_list_store_prepend): and here.
+	(_wrap_gtk_list_store_append): and here.
+	(_wrap_gtk_tree_store_insert): and here.
+	(_wrap_gtk_tree_store_insert_before): and here.
+	(_wrap_gtk_tree_store_insert_after): and here.
+	(_wrap_gtk_tree_store_prepend): and here.
+	(_wrap_gtk_tree_store_append): and here.
+
+	* gtk/pygtk-private.h (_pygtk_tree_model_set_row): add prototype.
+
+	* gtk/gtk-types.c (pygtk_tree_path_from_pyobject): support
+	converting a path string to a GtkTreePath.
+	(_pygtk_tree_model_set_row): new helper function to set a row from
+	a sequence.
+
+2003-03-08  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.defs (gdk_color_new): New placeholder function
+	(gc_new): Set as constructor for GdkGC
+
+	* gtk/gdk.override (_wrap_gdk_color_tp_setattr)
+	(_wrap_gdk_color_new): Impl
+
+2003-03-06  James Henstridge  <james@daa.com.au>
+
+	* pygobject.c (pygobject_register_wrapper): the GObject should own
+	a ref to the wrapper.
+	(pygobject_new): get rid of the hasref code, and make sure that
+	the GObject owns a ref to the wrapper if we create it.
+	(pygobject_dealloc): get rid of the hasref code.  If we get this
+	far, the wrapper is dead.
+	(pygobject_traverse): if the GObject's refcount == 1, then
+	traverse to self.
+	(pygobject_clear): clear self->obj and self->inst_dict.
+	(pygobject_register_class): set tp_clear() so that things actually
+	work.  Without this, there was no tp_clear method for subclasses
+	of GObject.
+
+	* pygobject.h: remove hasref member, hopefully not needed if
+	relying on cycle GC.
+
+2003-03-07  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs (gtk_label_new_with_mnemonic, gtk_label_new)
+	(render_icon): Allow some parameters to be NULL.
+
+	* gtk/gtk.override (_wrap_gtk_stock_lookup)
+	(_wrap_gtk_stock_list_ids)
+	(_wrap_gtk_tree_view_insert_column_with_data_func): Impl.
+	(ignore-glob): Remove gtk_accelerator_*
+
+	* examples/pygtk-demo/demos/stock_browser.py: Ported from C
+
+2003-03-04  Jon Trowbridge  <trow@ximian.com>
+
+	* gtk/gtkmodule.c (python_do_pending_calls): Block threads while
+	we make our Py* calls.  This prevents a 'no current thread' error
+	if you try to kill a program by typing ctrl-c in the console it
+	was launched from.
+
+	* pygobject.c (pygobject_dealloc): Unblock threads before
+	invalidating our closures, since this might trigger a destructor
+	that needs to execute python code.
+	(pygobject_clear): Ditto.
+
+	* pygboxed.c (pyg_boxed_dealloc): Unblock threads before freeing
+	the boxed type, since the destructor may need to execute python
+	code.
+	(pyg_boxed_new): Block threads while we make our Py* calls.
+	(pyg_pointer_new): Block threads while we make our Py* calls.
+
+	* gobjectmodule.c (pyg_object_set_property): We need to block
+	threads before our call to pygobject_new.
+	(pyg_object_get_property): Ditto.
+
+2003-03-02  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobjectmodule.c (pyg_io_add_watch): Fix function name in exception.
+
+2003-02-27  Johan Dahlin  <jdahlin@async.com.br>
+
+	* dsextras.py (getstatusoutput): Small typo.
+
+	* setup.py: Cut the doclines, to make the windows installer happy
+
+2003-02-26  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.defs (invalidate_rect): Null is okay here.
+	Fixes #106295 (John Finlay).
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_new_from_xpm_data):
+	Impl. Fixes #106292 (John Finlay)
+
+	* pango.override (_wrap_pango_layout_set_text): Impl. Fixes
+	#106280 (John Finlay)
+
+	* gtk/gtk.override: Added get implements for all TextAttribute
+	fields. Fixes #106279 (John Finlay).
+
+	* gtk/gtk-types.defs (TextAttributes): Added fields.
+
+	* setup.py, dsextras.py: Added win32 support and some
+	rearrangements. Largely based upon patch by Cedric Gustin.
+
+	* gtk/gdk.defs (pointer_grab, pointer_ungrab, keyboard_grab)
+	(pointer_is_grabbed): Add.
+
+	* gtk/gdk.defs: Add GDK_CURRENT_TIME as default value to all
+	functions that require a time argument
+
+2003-02-24  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/libglade.override (_wrap_glade_bindtextdomain): Raise
+	exception if bindtextdomain() returns NULL.
+
+	* gtk/libglade.defs (textdomain): Wrap the textdomain() function.
+
+2003-02-14  James Henstridge  <james@daa.com.au>
+
+	* configure.in (export_dynamic): add guard around the
+	export_dynamic flag from GTK_LIBS.  (fixes bug 105728).
+
+=== PyGTK 1.99.15 ===
+
+2003-02-08  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in, setup.py: Upped version number
+
+	* pygtk-2.0.pc.in (codegendir): Added.
+
+	* setup.py: Added Numeric and gtkgl support (gtkgl untested).
+
+	* dsextras.py: Updated.
+
+	* gtk/libglade.override (connect_many): Add PyErr_Clear()
+	here. Since PyMapping_GetItemString will raise an AttributeError
+	if the handler can't be found.
+
+2003-01-31  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_draw_rgb_image): add implementation.
+	(_wrap_gdk_draw_rgb_32_image): add implementation.
+	(_wrap_gdk_draw_gray_image): add
+	(_wrap_gdk_draw_rgb_image, _wrap_gdk_draw_rgb_32_image): add xdith
+	and ydith optional arguments, providing the functionality of the
+	_dithalign variants.
+
+2003-01-30  Jon Trowbridge  <trow@ximian.com>
+
+	* gtk/gdk.override: Only call import_array if we HAVE_NUMPY.
+
+2003-01-30  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf__get_pixel_array): add
+	wrapper that returns a NumPy array.
+
+	* gtk/gdk-types.defs (Pixbuf): add a "pixel_array" member to
+	pixbuf object.
+
+	* configure.in (enable_numpy): get rid of code detecting which
+	directory Numeric's arrayobject.h header is in.  No point in
+	supporting ancient versions ...
+
+2003-01-30  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk-types.defs (Layout): Wrap bin_window.
+
+2003-01-24  Johan Dahlin  <jdahlin@async.com.br>
+
+	* dsextras.py (InstallLib.add_template_option): Fix template bustage.
+
+	* gtk/gtk.defs (set_from_image, set_from_file, set_from_pixbuf):
+	Allow NULL here too. This definitly fixes #103559
+
+2003-01-23  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkmodule.c (init_gtk): Added a timeout that calls
+	python_do_pending_calls every 100 ms.
+	(python_do_pending_calls): Call PyErr_CheckSignals, so Ctrl-C
+	works as expected inside of gtk_main(). Fixes #72333
+
+2003-01-21  Johan Dahlin  <jdahlin@async.com.br>
+
+	* dsextras.py (Template.generate): Import codegen here instead,
+	needs to be fixed in the future though.
+
+	* Makefile.am (EXTRA_DIST): Added dsextras.py
+
+	* gobjectmodule.c: Add GMainContext bindings and complete the
+	GMainLoop bindings. Fixes #102362.
+
+	* dsextras.py: Splitted out from setup.py. It should be reusable
+	for gnome-python and other extensions that uses pygtk.
+	Fixes #103615
+
+	* gtk/gtk.override (quit_handler_marshal): Added to here, was
+	generated before. This version handle threads better. Patch from
+	John Finlay, Fixes #103851.
+
+2003-01-20  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_getattr): Added correct
+	__members__ to all different kind of GdkEvent's. This fixes the
+	dir() output, also reported as #103979
+
+2003-01-19  Johan Dahlin  <jdahlin@async.com.br>
+
+	* pygtk.py (_get_available_versions): Check if a directory is
+	empty before adding it to the path. Also added a few comments.
+	Fixes #103876 (Ross Burton).
+
+2003-01-18  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs (drag_source_set_icon, set_from_pixmap): Null is
+	okay here. Fixes #103559 (John Finlay)
+
+	* gtk/gtk.defs (begins_tag, ends_tag, toggles_tag): Add default
+	values. Fixes #103443 (John Finlay)
+
+	* gtk/gdk.defs (bitmap_create_from_data): Change data parameter
+	from const-gchar to const-guchar. Fixes #103616 (Eddie Kohler)
+
+	* setup.py: use os.path.join in a few more places
+
+	* pygobject-private.h: Add PyGMainLoop struct and type
+
+	* gobjectmodule.c (_wrap_g_main_loop_new, _wrap_g_main_loop_quit)
+	(_wrap_g_main_loop_is_running, _wrap_g_main_loop_run): Added
+	GMainLoop wrapper.
+	(initgobject): Register wrapper in gobject.MainLoop
+
+	* setup.py: Check for the python version
+	(Template.generate): Use codegen directly instead of os.system()
+
+2003-01-17  Jon Trowbridge  <trow@ximian.com>
+
+	* pygobject.c (pygobject_dealloc): In my fix for bug #102756 on
+	2003-01-08, I should have used calls to pyg_unblock_threads()/
+	pyg_block_threads() instead of directly calling the
+	Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS macros.  The macros
+	don't update our local thread lock counts, causing problems in
+	cases where the finalization of one object triggers the
+	finalization of another.  (When I say "problems", I of course mean
+	"horrible crashes".)
+
+	* gtk/gtk-types.c (pygtk_style_helper_dealloc,
+	pygtk_style_helper_setitem, pygtk_tree_model_row_dealloc,
+	pygtk_tree_model_row_iter_dealloc): See above.
+
+2003-01-16  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/libglade.override (connect_many) Use PyObject_GetAttrString
+	as a fallback. Remove warning.
+	(_wrap_glade_xml_signal_autoconnect): Don't limit to PyDict_Type.
+
+2002-01-09  Joe Shaw  <joe@ximian.com>
+
+	* gtk/gtk.override (_wrap_gtk_icon_size_lookup): Wrap.  The width
+	and height are returned as a tuple.
+
+2003-01-09  Joe Shaw  <joe@ximian.com>
+
+	* gtk/gtk.override (_wrap_gtk_file_selection_get_selections):
+	Added.  Wraps the gtk_file_selection_get_selections() call which
+	has a gchar ** return type, so it wasn't being wrapped.
+
+2003-01-08  Johan Dahlin  <jdahlin@async.com.br>
+
+	* setup.py: Make building with threading work (again).
+
+2003-01-08  Jon Trowbridge  <trow@ximian.com>
+
+	* pygobject.c (pygobject_dealloc): Wrap
+	Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS around the call to
+	g_object_unref.  We need to do this because the object finalizers
+	might trigger other code that has to acquire the interpreter lock,
+	causing a deadlock.  Fixes #102756.
+
+	* gtk/gtk-types.c (pygtk_style_helper_dealloc): Wrap the call to
+	g_object_unref in Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS.
+	This should let us avoid other instances of bug #102756.
+	(pygtk_style_helper_setitem): Ditto.
+	(pygtk_tree_model_row_dealloc): Ditto.
+	(pygtk_tree_model_row_iter_dealloc): Ditto.
+
+	* gtk/gdk.override (pygdk_unblock_threads, pygdk_unblock_threads):
+	Restored David I Lehn's patch (#98380).  His patch was fine ---
+	it just caused bug #102756 to emerge.
+
+2003-01-07  Johan Dahlin  <jdahlin@async.com.br>
+
+	* pygtk.py (_get_available_versions): Rewrite using glob.glob,
+	with python2.2 glob uses fnmatch.filter with is an optimized
+	version of what we did before. _get_available_versions is now
+	roughly 5 times faster.
+
+	* gtk/gdk.override (pygdk_block_threads, pygdk_unblock_threads):
+	Reverted patch from David I Lehn (#98380) since it caused troubles
+	for other people.
+
+	* gtk/gtk.defs (gtk_text_tag_new): Add default paramter.
+
+	* pangomodule.c (initpango): Added SCALE_* constants, patch by
+	John Finlay, fixes #102731.
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_create_tag): Modify to
+	accept keyword parameters, largely based upon patch by John
+	Finlay, fixes #102628
+
+	* gtk/gtk.defs (GtkTextBuffer.get_slice): default last parameter
+	to TRUE. #102607
+	(GtkTextBuffer.get_text): ditto. #102607
+	(GtkTextBuffer.create_mark): Default last param. to FALSE. #102627
+
+	* setup.py, MANIFEST.in: Added distutils support
+
+	* Makefile.am (EXTRA_DIST): Added setup.py and MANIFEST.in here.
+
+	* .cvsignore: Add build/dist/MANIFEST here
+
+2003-01-06  Jon Trowbridge  <trow@ximian.com>
+
+	* gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path):
+	pyg_unblock_threads was being called twice.
+
+2003-01-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/libglade.override: protect config.h by an ifdef.
+
+2003-01-01  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_insert_at_cursor)
+	(_wrap_gtk_text_buffer_insert_at_cursor)
+	(_wrap_gtk_text_buffer_insert_interactive)
+	(_wrap_gtk_text_buffer_insert_interactive_at_cursor): Wrap, so you
+	don't have to specify the length of the string. For
+	consistency. (It's not slower since Python does always store the
+	length inside the PyStringObject struct). Patch (mostly) by
+	John Finlay, fixes #102186.
+	(_wrap_gtk_text_buffer_get_selection_bounds): Remove unused
+	keyword argument and not up-to-date comment.
+
+	* gtk/gtk.defs (GtkTreeView.scroll_to_cell): Add default values.
+
+	* gtk/gtk.override (_wrap_gtk_tree_selection_get_selected): Check
+	the mode before calling gtk_tree_selection_get_selected, this
+	avoids an abort() in gtk+.
+
+	* pygtk.py: Updated to fix #102180, so .require() can be called
+	twice and won't do anything the second time (eg, not raise an
+	error) based upon patch by warner-gnome.bugzilla@lothar.com
+
+2002-12-29  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs (set_cursor): Set default parameters.
+
+2002-12-28  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobjectmodule.c, gtk/gtk.override, gtk/pygtkcellrenderer.c,
+	gtk/pygtktreemodel: Improve threading support by adding
+	pyg_thread_block/unblock around all PyObject_Call* and
+	g_object_refs.
+	Based upon patch by Jon Trowbridge. Fixes #99102.
+
+	* gtk/gdk-types.defs (ColorSpace): Add.
+
+	* gtk/gdk.defs (GdkRectangle.intersect, GdkRectangle.union,
+	gdk.atom_intern): Add
+
+	* gtk/gdk.override (_wrap_gdk_rectangle_intersect): Impl.
+	(_wrap_gdk_rectangle_union): Impl. (doesn't follow the GDK api to
+	100%, but this is much nicer from a python point of view)
+
+2002-12-28  Jeremy Katz  <katzj@redhat.com>
+
+	* codegen/codegen.py
+	(GObjectWrapper.get_initial_constructor_substdict):
+	GtkInvisible is a toplevel like GtkWindow and needs to be handled
+	similarly for reference counting.
+
+2002-12-28  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs: Added -1 as default to second parameter, patch by
+	John Finlay, fixes #102083.
+
+2002-12-28  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_set_text): get rid of
+	len argument all together.  The first argument knows its length.
+
+2002-12-27  James Henstridge  <james@daa.com.au>
+
+	* NEWS: add news items.
+
+	* gtk/__init__.py: if True and False constants don't exist in
+	__builtins__, add them.  This way I can rely on them existing.
+	Define gtk.TRUE and gtk.FALSE to True and False.
+	(input_add_full): add extra compatibility name.
+
+	* configure.in: increment version number.
+
+2002-12-26  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): this
+	should have been calling on_get_path(), rather than
+	on_get_tree_path().
+
+2002-12-25  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (GtkStyle.copy): caller owns return.
+	(GtkRcStyle.copy): same.
+	(GtkIconSet.copy): same.
+	(GtkIconSource.copy): same.
+	(GtkSelectionData.copy): same.
+	(GtkStockItem.copy): same.
+	(GtkBorder.copy): same.
+	(GtkTextIter.copy): same.
+	(GtkTextAttributes.copy): same.
+	(GtkTreePath.copy): same.
+	(GtkTreeIter.copy): same.
+	(GtkRequisition.copy): same.
+
+	* gtk/gtk.override (_wrap_gtk_layout_get_size): don't return NULL
+	if user asks to register zero stock items.
+
+2002-12-24  James Henstridge  <james@daa.com.au>
+
+	* pygobject.c (pygobject_init): add abstract type check here too.
+	(pygobject_init): make this code more similar to pyg_object_new,
+	so that it is easier to fix bugs in the future.
+	(pygobject_chain_from_overridden): check if
+	g_signal_get_invocation_hint() returns NULL.
+
+	* gobjectmodule.c (pyg_object_new): handle case of no keyword
+	arguments.
+	(pyg_object_new): refuse to instantiate an abstract type.
+
+2002-12-23  James Henstridge  <james@daa.com.au>
+
+	* autogen.sh (AUTOMAKE): use automake-1.7 in preference to 1.6.
+
+	* configure.in (GLIB_LIBS): remove -export-dynamic from flags.
+
+2002-12-22  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override
+	(_wrap_gtk_text_view_get_location): Impl,
+	patch from John Finlay, fixes 101714.
+	(_wrap_gtk_text_view_get_line_at_y): Impl,
+	patch from John Finlay, fixes 101716.
+	(_wrap_gtk_text_view_get_line_yrange): Impl,
+	patch from John Finlay, fixes 101720.
+	(_wrap_gtk_text_view_get_iter_at_location): Impl,
+	patch from John Finlay, fixes 101722.
+
+	* examples/pygtk-demo/demos/editable_cells.py: New demo.
+	* examples/pygtk-demo/pygtk-demo.py: Rearrange code a bit.
+	* examples/pygtk-demo/demos/*.py: Clean up a bit.
+
+	* gtk/gtk.override
+	(_wrap_gtk_tree_view_insert_column_with_attributes): If the first
+	argument (position) is -1, the column will be inserted at the end
+	of the list, there for the new position will be columns - 1. If
+	the columns isn't 1, it will be inserted at the requested
+	position. This makes this function work again.
+
+
+2002-12-19  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.override: Integrate patch by David I. Lehn, improves
+	threading support, fixes #98380.
+
+2002-12-18  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_get_selection_bounds):
+	Impl, based upon patch by John Finlay, fixes #101499.
+	(_wrap_gtk_text_view_get_visible_rect): Impl, patch by John
+	Finlay, fixes #101503.
+	(_wrap_gtk_tree_view_get_visible_rect): Impl, patch by John
+	Finlay, fixes #101505.
+	(_wrap_gtk_tree_view_column_cell_get_size): Impl.
+
+2002-12-17  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs (gtk_text_buffer_new): Add (default "NULL"), fixed
+	#101490 (John Finlay).
+
+	* gtk/gtk.override: ignore gtk_text_view_new.
+
+	* gtk/gtk.defs (gtk_text_view_new_with_buffer): Add null-ok.
+	Fixes #101489 (John Finlay).
+
+2002-12-11  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_get_cursor): Make the
+	return value a bit more intelligent and only return what's requested.
+	(_wrap_gtk_tree_view_get_cursor): Another try, this time, don't
+	take any input arguments, always return a tuple with two items
+	(which could be None)
+	(_wrap_gtk_text_buffer_create_tag): Check if the tag exists before
+	inserting into the tag table. Fixes #100668.
+
+2002-12-10  Johan Dahlin  <jdahlin@telia.com>
+
+	* pango.defs (pango_tab_array_new): Add, and make constructor of
+	PangoTabArray.
+
+2002-12-08  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/__init__.py (threads_enter): point to gdk.threads_leave, not
+	gdk.threads_enter! Fixes #100623. Thanks Jon Trowbridge.
+
+	* gtk/gdk.override (_wrap_gdk_event_get_axis): Don't raise an
+	exception when leaving this function, instead look in
+	_PyGdkEvent_methods. (which raises an exception if it's not found)
+	(_wrap_gdk_event_get_axis, _wrap_gdk_event_get_coords)
+	(_wrap_gdk_event_get_root_coords): Impl.
+
+2002-12-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_tree_selection_get_selected):
+	Impl. Fixes #100389.
+
+2002-12-05  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (create_pango_context): caller owns return.
+	(create_pango_layout): caller owns return.
+
+2002-12-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* pygtk.py (_get_available_versions): s/os.path.exists/os.path.isdir/
+
+	* gtk/gtk.override (_wrap_gtk_tree_store_set)
+	(_wrap_gtk_tree_store_new, _wrap_gtk_list_store_new)
+	(_wrap_gtk_list_store_set): Do an extra check for the number of
+	arguments. Fixes #100349
+
+	* pygtk-2.0.pc.in (Requires): Added gobject-2.0. Fixes #97727
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_get_cursor): Impl. Fixes
+	#100077 (Dave Cook)
+	(_wrap_gtk_tree_model_iter_nth_child): Allow argument to be None,
+	fixes #99787. Thanks to Rob Melby for patch.
+
+	* gtk/gdk.defs (keyval_name): add caller-owns-returns false, this
+	prevents the code generator from freeing the return value. Fixes
+	#100103 (Dave Cook)
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_get_cell_area)
+	(_wrap_gtk_tree_view_get_cell_area)
+	(_wrap_gtk_tree_view_get_background_area): Impl. Fixes #100301 (Dave Cook)
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_widget_to_tree_coords)
+	(_wrap_gtk_tree_view_tree_to_widget_coords): Impl. Fixes #100302 (Dave Cook)
+
+2002-12-02  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_tooltips__get_tips_data_list): Impl.
+	(_wrap_gtk_tooltips__get_tips_data_list):
+
+2002-11-28  Johan Dahlin  <jdahlin@async.com.br>
+
+	* pygtk.py (_get_available_versions): If the directory doesn't
+	exist skip it. If not, it breaks when doing os.listdir.
+
+2002-11-24  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_tp_getitem): allow you to
+	get a row object from a TreeIter as model[iter].
+
+	* gtk/gtk-types.c (pygtk_tree_model_row_get_iter): allow getting
+	an iter from a treemodel row object.
+
+	* gtk/gdk.override (_wrap_gdk_pixmap_create_from_xpm_d): fix up
+	ParseTuple call arguments (bug 99400).
+
+	* gtk/gtk.defs (create_mark): allow None to be passed for
+	mark_name argument (bug 99391).
+
+2002-11-20  Joe Shaw  <joe@ximian.com>
+
+	* gtk.override (_wrap_gtk_menu_attach_to_widget): Added.  Fixes
+	#97963.
+
+	* pygtktreemodel.c: Add wrap all calls to PyObject_CallMethod() in
+	pyg_block_threads() and pyg_unblock_threads().  Fixes #98344.
+
+2002-11-20  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (PyObjectArg): arg matcher for "PyObject*"
+	args, from bug #98822.
+
+2002-11-19  James Henstridge  <james@daa.com.au>
+
+	* gtk/libglade.override (_wrap_glade_xml_get_widget_prefix): add
+	wrapper.
+
+	* gtk/gtkobject-support.c: get rid of pyg_handler_marshal and
+	pyg_input_marshal, which were the last bits of code using the old
+	GtkArg APIs in gtk.
+
+	* gtk/gtk.override: remove wrappers for gtk_idle_add,
+	gtk_timeout_add and gtk_input_add.
+	(_wrap_gtk_quit_add): change so that it doesn't use
+	pyg_handler_marshal.
+
+	* gtk/__init__.py: set the TRUE and FALSE constants to True and
+	False if possible.  Fall back to 0/1 otherwise.
+	(*): bind idle, timeout and input functions to gobject equivalents.
+
+	* gobjectmodule.c (get_handler_priority): helper function to get
+	priority value as a keyword argument.
+	(pyg_idle_add): convert priority arg to an optional keyword
+	argument.
+	(pyg_timeout_add): and here.
+	(pyg_io_add_watch): and here.
+
+2002-11-18  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_idle_add): add a wrapper for g_idle_add.
+	(pyg_timeout_add): and a wrapper for g_timeout_add.
+	(pyg_io_add_watch): and a wrapper for g_io_add_watch.
+	(initgobject): add constants.
+
+2002-11-16  James Henstridge  <james@daa.com.au>
+
+	* pygobject.c (pygobject_connect_object): set up closure
+	correctly.  Fix from bug #96922.
+	(pygobject_connect_object_after): and here.
+
+	* gtk/gtk.override (_wrap_gtk_text_view_buffer_to_window_coords):
+	(_wrap_gtk_text_view_window_to_buffer_coords): wrap functions.
+
+	* pango.override: fix up calls to pyg_enum_get_value() so that it
+	doesn't throw an exception when it shouldn't.
+	(_wrap_pango_layout_get_pixel_extents): call get_pixel_extents()
+	like it is supposed to.  Fixes bug #93569.
+
+	* pygtype.c (pyg_value_from_pyobject): if python object is None,
+	set GValue to NULL for boxed, pointer and GObject types.
+	(pyg_value_as_pyobject): convert G_TYPE_POINTER values to
+	gobject.GPointer python objects.
+	(pyg_value_as_pyobject): when converting G_TYPE_BOOLEAN values to
+	python objects, return one of Py_True or Py_False, so that Python
+	2.3 will return an instance of bool.
+
+	From patch on bug #96950
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_save): wrapper for
+	GdkPixbuf.save()
+
+	* codegen/argtypes.py (GdkRectanglePtrArg.write_param): handle
+	GdkRectangle args with (null-ok) set.
+
+	* gtk/gtk.defs (gtk.Style.paint_*): allow passing None for area,
+	widget and detail arguments.
+
+	* codegen/docgen.py (DocbookDocWriter.write_method): wrap
+	<methodsynopsis> in a <programlisting> element.
+	(DocbookDocWriter.write_constructor): same here.
+	(DocbookDocWriter.write_params): wrap parameter description in a
+	<simpara> element to conform to docbook DTD better.
+	(DocbookDocWriter.write_params): add colon to end of terms, like
+	in gtk-doc output.
+
+	* docs/pygtk-docs.xsl: small changes to produce output more
+	similar to new gtk-doc output.
+
+2002-11-15  James Henstridge  <james@daa.com.au>
+
+	* pango.defs (PangoContext.get_metrics): caller owns return value.
+
+	* gtk/gtk.defs (GtkEntry.set_position): remove function, as it is
+	deprecated and shadows the recommended API.
+
+2002-11-11  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk.override: Ignore gtk_entry_select_region (It's deprecated,
+	gtk_editable_select_region should be used instead). thanks
+	Lars Wirzenius.
+
+2002-11-06  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (BoolArg.write_return): add bool arg that
+	returns Py_True or Py_False (which are instances of the boolean
+	type in Python 2.3).  Partial fix for bug 95372.
+
+2002-11-04  Joe Shaw  <joe@ximian.com>
+
+	* gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_get_size):
+	Prevent NULL dereference by passing in local variables to
+	PyArg_ParseTuple instead of our function arguments.
+
+2002-10-17  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk.override: s/arg/argument/ in exception strings.
+	(_wrap_gtk_box_query_child_packing): Use O! + PyGtkWidget_Type to
+	PyArg_ParseTuple... and check so child actually is a child, to
+	prevent returning uninitialized variables.
+
+2002-10-16  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk.override (_wrap_gtk_container_child_set_property)
+	(_wrap_gtk_container_child_get_property)
+	(_wrap_gtk_container_child_set)
+	(_wrap_gtk_container_child_get)
+	(_wrap_gtk_container_add_with_properties)
+	(_wrap_gtk_container_foreach): Impl.
+
+2002-09-05  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.defs (get_from_drawable): GdkPixbuf.get_from_drawable
+	doesn't actually leak pixbuf, remove caller-owns-return.
+
+2002-09-02  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.defs (get_from_drawable, copy, add_alpha, scale_simple
+	composite_color_simple): more caller-owns-return.
+
+2002-08-31  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py (DocbookDocWriter.write_params): separate out
+	the code that writes the variable list.
+
+2002-08-30  Sander Vesik <sander.vesik@sun.com>
+
+	* autogen.sh: use automake-1.6/aclocal-1.6 unless otherwise
+	requested
+
+2002-08-30  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.defs (pixbuf_new_from_file, pixbuf_new_from_data
+	pixbuf_new_from_xpm_data, pixbuf_new_from_inline):
+	caller-owns-return, to avoid leaking pixbufs
+
+2002-08-26  Joe Shaw  <joe@ximian.com>
+
+	* codegen/argtypes.py: Add gsize and gssize as valid integer
+	types.
+
+2002-08-26  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py (DocWriter.write_full_hierarchy): fix up
+	misspelling.
+
+	* pygtype.c (pyg_value_from_pyobject): fix typo from when I was
+	applying Thomas's patch.
+
+	* codegen/docgen.py (build_object_tree): show interfaces, boxes
+	and pointers in class heirachy.
+	(DocbookDocWriter.write_synopsis): show parent class for
+	interfaces, boxes and pointers in class synopsis.
+
+	* gtk/gtk-types.defs (CellEditable): CellEditable is an interface,
+	not a GObject.
+
+2002-08-25  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py: lots of docbuild updates.
+
+	* docs/pygtk-docs.xml: add driver file.
+
+	* docs/build-docs.py: move file to docs directory.
+
+	* NEWS: update news file.
+
+	* configure.in: increment version number.
+
+2002-08-24  James Henstridge  <james@daa.com.au>
+
+	mingw32 patches from Cedric Gustin <cgustin@ibelgique.com>:
+
+	* gtk/gtk.override: ignore more socket/plug functions on win32.
+
+	* gtk/gdk.override: gdk_pixmap_lookup is not implemented on win32.
+
+	* gtk/Makefile.am (common_ldflags): and here.
+
+	* pango.override (PyPangoAttribute_Type): initialise tp_alloc and
+	tp_new in the init() function, rather than in the structure
+	definition itself.
+
+	* Makefile.am (common_ldflags): pass -no-undefined if we are on
+	windows.
+
+	* configure.in: turn on win32 DLL support, and add OS_WIN32 and
+	PLATFORM_WIN32 conditionals for use in makefiles.
+
+2002-08-21  Jon K Hellan  <hellan@acm.org>
+
+	* codegen/argtypes.py (arg): More char* variants.
+
+2002-08-20  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.defs (gtk.gdk.Window.set_title): fix up typo.
+
+2002-08-20  Johan Dahlin  <jdahlin@telia.com>
+
+	Patch from Arjan J. Molenaar:
+	* gobjectmodule.c (pyg_type_register): Don't unref borrowed
+	references.
+
+2002-08-19  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py
+	(GObjectWrapper.get_initial_constructor_substdict): fix small
+	typo.
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): ref the
+	widget after constructing it.
+	(_wrap_gtk_message_dialog_new): same here.
+
+	* codegen/codegen.py
+	(GObjectWrapper.get_initial_constructor_substdict): add special
+	case code to ref() GtkWindow instances in their constructor, as we
+	don't own the initial reference (it is managed internally by
+	gtk+).  This fixes bug #90213.
+
+2002-08-18  James Henstridge  <james@daa.com.au>
+
+	* pygtk.spec.in: update spec file.
+
+	* gtk/Makefile.am: same here.
+
+	* Makefile.am: install in a gtk-2.0 subdir of site-packages.
+
+	* pygtk.py: new file to help with pygtk version parallel install.
+
+	* gobjectmodule.c (pyg_object_set_property): unref object_wrapper.
+	(pyg_object_get_property): unref object_wrapper.  (from patch by
+	Arjan Molenaar on bug #71021).
+
+	* gtk/gtk.defs (TreeView.set_cursor): allow column to be None
+	(fixes bug #91043).
+
+	* codegen/argtypes.py (ObjectArg.write_return): fix up generated
+	code.
+
+	* gtk/gtk.override (_wrap_gtk_clist_new_with_titles): don't need
+	to manually sink.
+	(_wrap_gtk_tree_view_column_new): same here.
+	(_wrap_gtk_button_new): same here.
+	(_wrap_gtk_toggle_button_new): same here.
+	(_wrap_gtk_check_button_new): same here.
+	(_wrap_gtk_radio_button_new): same here.
+	(_wrap_gtk_list_item_new): same here.
+	(_wrap_gtk_menu_item_new): same here.
+	(_wrap_gtk_check_menu_item_new): same here.
+	(_wrap_gtk_radio_menu_item_new): same here.
+	(_wrap_gtk_image_menu_item_new): same here.
+	(_wrap_gtk_ctree_new_with_titles): same here.
+	(_wrap_gtk_dialog_new_with_buttons): same here.
+	(_wrap_gtk_message_dialog_new): same here.
+	(_wrap_gtk_progress_bar_new_with_adjustment): same here.
+
+	* gtk/gtkmodule.c (sink_gtkobject): function to sink a GtkObject
+	if it is floating.
+	(init_gtk): register sink_gtkobject for sinking GtkObjects.
+
+	* codegen/codegen.py
+	(GObjectWrapper.get_initial_constructor_substdict): get rid of
+	gtkobjectsink bit of code.
+
+	* pygobject.c (pygobject_register_sinkfunc): new function to
+	register a function to get rid of the floating reference from an
+	object.
+	(sink_object): run a sinkfunc for an object if it has been
+	registered.
+	(pygobject_new): call sink_object
+	(pygobject_register_wrapper): call sink_object.
+
+Sat Aug 17 20:02:43 2002  Jonathan Blandford  <jrb@gnome.org>
+
+	* codegen/argtypes.py (TimeTArg.write_param): Add a time_t
+	parameter type.
+
+2002-08-17  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c (pyg_value_from_pyobject): allow None when converting
+	to string GValue (bug picked up by Thomas Leonard.
+
+	* gtk/gtk.defs (scroll_to_cell): allow column to be None (bug #90398).
+
+2002-08-16  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gdk.defs: Add null-ok to GdkWindow.set_cursor.
+	Fixes #88463.
+
+2002-07-23  James Henstridge  <james@daa.com.au>
+
+	* configure.in: updated version number.
+
+2002-07-20  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_*): fix up
+	arguments, and use "O" format code for PyObject_CallMethod --
+	can't rely on "N" causing the argument to be unrefed.
+
+	* gtk/gtk.override (_wrap_gtk_cell_renderer_get_size): cell_area
+	is an argument; not a return.
+
+	* gtk/gtk.override (GtkTreeModel.tp_as_number): add nonzero method
+	to tree models, so that they evaluate to a truth value even if
+	they have zero elements. (at request of msw).
+
+	* gtk/gtk-extrafuncs.defs, gtk/gtk.override: add GenericCellRenderer.
+
+	* gtk/pygtkcellrenderer.[ch]: add "generic" cell renderer code,
+	based on jrb's work.
+
+2002-07-18  James Henstridge  <james@daa.com.au>
+
+	* gtk/Makefile.am (glademodule_la_LDFLAGS): fix up
+	-export-symbols-regex flag.
+	(glmodule_la_LDFLAGS): same here.
+
+2002-07-15  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c (pygtk_tree_model_row_getsets): add next,
+	parent, model and path attributes to row objects.
+	(pygtk_tree_model_row_methods): add an iterchildren() method to
+	row objects.
+
+	* gtk/gtk.override (pygtk_register_classes): rather than #defines,
+	set the tp_as_mapping and tp_iter members of GtkListStore, etc in
+	the init func.
+
+	* gtk/gtk.override (_wrap_gtk_list_store_tp_iter): iter(liststore)
+	returns a gtk.TreeModelRowIter object.
+
+	* gtk/gtk-types.c (PyGtkTreeModelRowIter_Type): new iterator type
+	that returns a sequence of gtk.TreeModelRow objects for nodes
+	under a particular parent node.
+
+2002-07-13  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (GtkListStore.tp_as_mapping): explicitly define
+	this, as PyType_Ready doesn't seem to inherit special methods from
+	secondary bases correctly.
+	(GtkTreeStore.tp_as_mapping): same here.
+
+	* gtk/gtk-types.c (PyGdkRectangle_to_value): fix up argument
+	ordering bug.
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_tp_as_mapping): move
+	these mapping behaviours to the GtkTreeModel wrapper.
+
+	* gtk/gtk-types.c (PyGtkTreeModelRow_Type): rename from
+	GtkListStoreRow, and extend so that it can handle setting cells
+	for tree stores.
+
+	* build-docs.py (dg): parse template dirs for additional
+	documentation.
+
+	* codegen/docgen.py (DocWriter.add_tmpldirs): add function to
+	extract docs in the tmpl files.
+
+	* gtk/gtk.override (_wrap_gtk_list_store_tp_getitem): allow
+	subscripting of a GtkListStore to get row wrappers.
+	(_wrap_gtk_tree_model_get_iter_from_string): add override.
+
+	* gtk/gtk-types.c: add PyGtkListStoreRow type, that represents a
+	row in a list store.
+	(_pygtk_register_boxed_types): set the ob_type member.
+
+2002-07-12  James Henstridge  <james@daa.com.au>
+
+	These changes help with win32 compat.
+
+	* pygboxed.c (PyGBoxed_Type): set tp_alloc and tp_new to NULL.
+	(PyGPointer_Type): same here.
+
+	* gobjectmodule.c (PyGInterface_Type): set tp_alloc and tp_new to
+	NULL.
+	(initgobject): set tp_new and tp_alloc for various types.
+
+	* pygobject.c (PyGObject_Type): set tp_alloc and tp_new to NULL.
+
+2002-07-10  Murray Cumming  <murrayc@usa.net>
+
+	* codegen/docextract_to_xml.py: Used jamesh's new extract_tmpl()
+	function to get the sgml tmpl files. This file is only used by
+	gtkmm at the moment, not pygtk itself.
+
+2002-07-10  James Henstridge  <james@daa.com.au>
+
+	* configure.in: increment version number to 1.99.11.
+
+	* codegen/argtypes.py (GdkNativeWindow): add arg type.  This one
+	also from Thomas Leonard.
+
+	* gtk/gtk.defs (set_tip): allow tip_private to be NULL, and allow
+	it to be omitted.  Fix suggested by Thomas Leonard
+	<tal00r@ecs.soton.ac.uk>
+
+	* gtk/gtkmodule.c (init_gtk): make sure LC_NUMERIC is set to C
+	after gtk_init_check().
+
+	* codegen/h2def.py (clean_func): apply patch by David Lehn
+	<dlehn@vt.edu> to correctly handle multi-line preprocessor
+	macros.  From bug #81771.
+	(write_func): apply patch by Arjan Molenaar to write out
+	is-constructor-of lines for function definitions that look like
+	they might be constructors (doesn't catch every case, but is
+	better than nothing).  From bug #80914.
+
+2002-07-09  James Henstridge  <james@daa.com.au>
+
+	* codegen/docextract.py (extract_tmpl): function to extract docs
+	from gtk-doc 'tmpl' files.  Takes a list of tmpl/ directories as
+	an argument.  Doesn't recurse.  Fixes bug 86860.
+
+	Reworking of Arjan Molenaar's (arjanmolenaar@hetnet.nl) patch from
+	bug 71435.
+
+	* gtk/libglade.override (connect_one): watch the closure.
+	(connect_many): watch the closure.
+
+	* gtk/gtk.override (_wrap_gtk_toolbar_append_item): watch closure
+	for signal.
+	(_wrap_gtk_toolbar_prepend_item): same here.
+	(_wrap_gtk_toolbar_insert_item): same here.
+	(_wrap_gtk_toolbar_insert_stock): same here.
+	(_wrap_gtk_toolbar_append_element): same here.
+	(_wrap_gtk_toolbar_prepend_element): same here.
+	(_wrap_gtk_toolbar_insert_element): same here.
+
+	* pygobject.h (_PyGObject_Functions): add pygobject_watch_closure
+	to the list of exported functions.
+
+	* pygobject.c (pygobject_watch_closure): new function to watch a
+	closure.  We perform cyclic garbage collection on watched
+	closures.  The closure will automatically be unwatched when it
+	gets invalidated.
+	(pygobject_traverse): traverse watched closures as well.
+	(pygobject_clear): invalidate all watched closures
+	(pygobject_dealloc): invalidate watched closures on dealloc too.
+	(PyGObject_Type): register the invalidate handler.
+	(pygobject_connect): watch the closure we connect here.
+	(pygobject_connect_after): same here..
+	(pygobject_connect_object): same here.
+	(pygobject_connect_object_after): same here.
+
+	* pygtype.c (pyg_closure_new): clean up closure on invalidate,
+	rather than finalize (on invalidate, we break references).
+
+	* pygobject.h (PyGObject): add closures member to store references
+	to PyGClosures.
+
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_iter_next): change so
+	that it returns the next item, rather than modifying the iter.
+	(_wrap_gtk_tree_model_iter_parent): add wrapper, so that we return
+	the parent iter.
+	(_wrap_gtk_tree_model_iter_nth_child): add wrapper.
+
+2002-07-08  James Henstridge  <james@daa.com.au>
+
+	* codegen/docextract.py (parse_tmpl): fix up simple loading of
+	tmpl files.
+
+	* pygobject.c (pygobject_connect): apply another memory leak fix
+	from Arjan (from bug #87413).
+	(pygobject_connect_after): equivalent fix here.
+	(pygobject_connect_object): and here.
+	(pygobject_connect_object_after): and here.
+
+	* gtk/gtk-types.c (PyGdkRectangle_to_value): add custom boxed
+	handlers for GDK_TYPE_RECTANGLE, so that 4-sequences can
+	automatically be marshaled to GdkRectangle values.
+
+2002-07-07  James Henstridge  <james@daa.com.au>
+
+	* pygobject.c (pygobject_get_refcount): add __grefcount__ property.
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_getattr): return a boxed
+	type for gdk.Event.area for expose events.
+
+	* gtk/gtk.override (_wrap_gtk_widget_intersect): use
+	pygdk_rectangle_from_pyobject.
+
+	* codegen/argtypes.py (arg): register GdkRectanglePtrArg handler
+	for "GtkAllocation*".
+
+	* gtk/gtk.override (_wrap_gtk_paint_polygon): use
+	pygdk_rectangle_from_pyboejct to read rectangle argument.
+	(_wrap_gtk_widget_draw): remove overrides.  Should be handled by
+	code generator.
+	(_wrap_gtk_widget_size_allocate): remove this override too.
+
+	* codegen/argtypes.py (GtkTreePathArg.write_return): update to use
+	this function.
+	(ArgMatcher.register_boxed): short circuit if there is already a
+	handler for the boxed type (helps with setting custom handlers for
+	boxed types).
+
+	* gtk/gtk-types.c (pygdk_rectangle_from_pyobject): new function to
+	parse a GdkRectangle from a PyObject.
+
+	* gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): print
+	a warning if the return value could not be converted to a
+	GtkTreePath.
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_get_value): don't assume
+	tree paths are tuples.
+
+	* codegen/argtypes.py (GtkTreePathArg.write_param): fix up code
+	generator to get rid of assumption that tree paths are tuples, and
+	catch case where pygtk_tree_path_from_pyobject() returns NULL.
+
+	* gtk/gtk-types.c (pygtk_tree_path_from_pyobject): change so that
+	we treat an integer PyObject as a tree path with a single index.
+
+	* pygtype.c (pyg_closure_marshal): apply patch from Arjan Molenaar
+	<arjanmolenaar@hetnet.nl> that fixes a reference leak for the
+	argument tuple passed to the callback.
+	(pyg_signal_class_closure_marshal): apply similar fix here.
+
+Thu Jul  4 10:58:51 2002  Jonathan Blandford  <jrb@gnome.org>
+
+	* gtk/gtk-types.defs (TreeModelSort): We also implement
+	GtkTreeSortable.
+
+	* gtk/gtk.defs (gtk_tree_model_sort_new_with_model): get the right
+	is-constructor-of value.
+
+2002-06-30  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (pygtk_menu_position): fix up menu position
+	func (fixes bug #85994).
+
+2002-06-27  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (check_version): caller does _not_ own the returned
+	string.  Bug found by Anders Carlsson.
+
+2002-06-24  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (drag_source_set_icon_pixbuf): fix definition, as
+	reported by Thomas Leonard <tal00r@ecs.soton.ac.uk>
+
+Sun Jun 23 11:10:30 2002  Jonathan Blandford  <jrb@gnome.org>
+
+	* pygboxed.c: Add GBoxed::copy
+
+	* pygobject.c (pygobject_init): take kwargs so we can pass
+	construct-only arguments to our initialization function.
+
+2002-06-23  James Henstridge  <james@daa.com.au>
+
+	* examples/simple/scribble.py: update example to work with current
+	PyGTK.
+
+	* gtk/gtk.override (_wrap_gtk_tree_sortable_get_sort_column_id):
+	copy boxed arguments.
+
+	* pygobject.h: fix up prototypes.
+
+	* gobjectmodule.c (pyg_object_set_property): copy boxed arguments.
+
+	* pygobject.c (pygobject_get_property): copy boxed arguments here.
+	(pygobject_emit): same here.
+	(pygobject_chain_from_overridden): same here.
+
+	* pygtype.c (pyg_value_as_pyobject): add "copy_boxed" argument to
+	this function.
+	(pyg_closure_marshal): pass FALSE for copy_boxed argument.
+	(pyg_signal_class_closure_marshal): same here.
+
+2002-06-19  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_ctree_insert_node): check the
+	correct value when setting the sibling.  Patch from Tim Waugh
+	<twaugh@redhat.com>
+
+2002-06-18  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_tree_sortable_get_sort_column_id):
+	implement GtkTreeSortable.get_sort_column_id
+
+2002-06-18  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtkgl.override (_wrap_gtk_gl_area_share_new): constructors
+	return ints.
+
+	* gtk/gdk.override, gtk/gtk.override: ignore all _ref() or
+	_unref() functions.
+
+	* codegen/argtypes.py (BoxedArg.write_return): fix up handling of
+	ownsreturn for Boxed return types.
+
+2002-06-17  Matt Wilson  <msw@redhat.com>
+
+	* pygtype.c (pyg_value_as_pyobject): if a value holds a PyObject*,
+	the code that is getting the value is expecting a valid object.
+	Translate NULL pointers to Py_None.
+
+2002-06-17  Johan Dahlin  <jdahlin@telia.com>
+
+	* pango.defs: added PangoLayout.set_text
+
+Mon Jun 17 09:52:45 2002  Jonathan Blandford  <jrb@gnome.org>
+
+	* gtk/gtk-types.defs: Add GtkRequisition
+	* gtk/gtk.override: Add GtkRequisition
+
+2002-06-15  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_error_check): decref the exception instance
+	after raising the error.
+
+Fri Jun  7 12:39:27 2002  Jonathan Blandford  <jrb@redhat.com>
+
+	* gtk/gtk.override (pygtk_tree_selection_foreach_marshal): fix
+	GtkTreeSelection::get_selected()
+
+2002-06-09  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (BoxedArg.write_param): if the ptype is
+	different to self.typecode, cast the event
+
+	* gtk/gdk-types.defs (EventExpose): remove definition, as it
+	breaks stuff.
+
+2002-06-04  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk-extrafuncs.defs (set_all): add GtkAdjustment.set_all
+
+	* gtk/gtk.override (_wrap_gtk_adjustment_set_all): implement, for
+	compatibility with PyGtk 0.6.x.  Mark it as deprecated.
+	(_wrap_gtk_adjustment__set_value)
+	(_wrap_gtk_adjustment__set_lower)
+	(_wrap_gtk_adjustment__set_upper)
+	(_wrap_gtk_adjustment__set_step_increment)
+	(_wrap_gtk_adjustment__set_page_increment)
+	(_wrap_gtk_adjustment__set_page_size): implement setters for
+	GtkAdjustment.{value, lower, upper, step_increment,
+	page_increment, set_page_size}
+
+2002-06-03  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override
+	(_wrap_gtk_tree_view_insert_column_with_attributes): implement
+	(code mostly from jrb@redhat.com, minor fixups from me)
+
+	* gtk/gdk-types.defs (EventExpose): added to make the code
+	generator write GdkEventExpose * for
+	_wrap_gtk_container_propagate_expose (gets rid of a warning)
+
+2002-05-31  Matt Wilson  <msw@redhat.com>
+
+	* examples/pygtk-demo/demos/list_store.py (fixed_toggled): the
+	path argument must be a tuple.  Ints are not automatically
+	converted to tuples any more.
+
+	* pygtype.c (pyg_value_as_pyobject): change the behavior of
+	G_TYPE_UINT to match the code generator's output on 32 bit
+	systems.
+
+2002-05-19  James Henstridge  <james@daa.com.au>
+
+	* gtk/Makefile.am (pygtk_PYTHON): install compat.py
+
+2002-05-18  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_editable_insert_text): add length
+	and pos as keywords, allow user to override the length of text to
+	be added (like other text insert functions)
+
+2002-05-16  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c (pyg_value_from_pyobject): add support for
+	G_TYPE_INTERFACE, provided the interface has a prereq on
+	G_TYPE_OBJECT.
+	(pyg_value_as_pyobject): same here.
+
+2002-05-14  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c (pyg_value_from_pyobject): add handler for
+	G_TYPE_PARAM (fix bug #81695).
+	(pyg_value_as_pyobject): same in this function.
+
+	* codegen/argtypes.py (ULongArg): use 'O!' format code, so we can
+	reduce the size of the extra code we output.
+	(Int64Arg): add arg handler (to solve bug #81694).
+	(UInt64Arg): add arg handler (bug #81694 again).
+	(ObjectArg.write_param): simplify output code using O! code for
+	the normal and default value cases.
+
+2002-05-13  James Henstridge  <james@daa.com.au>
+
+	* configure.in: increment version number.
+
+	* codegen/definitions.py (MethodDef.__init__): skip the
+	caller_owns_return bit if no return value clause given.
+	(FunctionDef.__init__): same here.
+
+2002-05-12  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (ObjectArg.write_return): add handler for
+	ownsreturn case for GObjects.
+	(BoxedArg.write_return): and for boxed types ...
+	(GtkTreePathArg.write_return): handle ownsreturn.
+
+2002-05-10  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (StringArg.write_return): make this handler
+	actually look at the ownsreturn argument.  This fixes a crasher
+	when reading string type attributes (it was freeing the struct
+	member!).
+
+2002-05-09  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtkgl.defs: get rid of gtk_gl and gdk_gl prefix on some
+	functions.
+
+	* codegen/codegen.py (Wrapper.write_function_wrapper): pass
+	caller_owns_return as argument to write_return.
+	(Wrapper.write_getsets): add extra arg to write_return() call.
+
+	* codegen/argtypes.py (*.write_return): add an extra "ownsreturn"
+	argument to all write_return functions.
+
+	* codegen/definitions.py (MethodDef.__init__): read a
+	caller_owns_return variable.  It defaults to false if ommitted,
+	unless we have a string return.
+	(FunctionDef.__init__): same here, but also make
+	caller_owns_return true for constructors.
+
+2002-05-08  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_get_value): fix typo.  I
+	should test these things before committing.
+
+2002-05-05  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (gtk_tree_sortable_set_sort_func): implement.
+	(gtk_tree_sortable_set_default_sort_func): implement.
+
+	* gtk/compat.py: start of compatibility module.
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_foreach): fix up foreach
+	handler.
+	(_wrap_gtk_tree_model_get_iter): change to take a single argument
+	as the path, as discussed in bug 75811.
+
+2002-05-04  James Henstridge  <james@daa.com.au>
+
+	* Makefile.am (EXTRA_DIST): add extra files to dist (from bug
+	#79872).
+
+	* gtk/gtk.defs (set_from_pixmap): allow NULL pointer passed for
+	mask.
+
+	* gtk/gtk.override (pygtk_tree_foreach_marshal): pass model, path
+	and iter to the callback.
+	(_wrap_gtk_tree_model_foreach): implement.
+
+2002-04-29  Matt Wilson  <msw@redhat.com>
+
+	* codegen/argtypes.py (ULongArg): implemented an argtype to handle
+	guint32 (on 32 bit platformas) and gulong arguments such that
+	large values (>MAX_INT on 32 bit platforms) don't overflow.
+
+2002-04-25  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (gtk_spin_button_new): s/gbutton/gdouble/ from Art Haas.
+
+2002-04-25  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (ArgMatcher.get): add hack to match
+	GdkEvent* and use the GdkEvent handler.
+
+	* gtk/gtk.override (_wrap_gtk_text_iter_get_char): remove wrapper,
+	as arg type covers this case fine.
+
+	* codegen/argtypes.py (GUniCharArg.write_return): add code for
+	handling gunichar returns.
+	(GUniCharArg.write_param): and support for gunichar parameters.
+
+2002-04-23  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c: remove old commented out GdkGC implementation.
+
+2002-04-22  James Henstridge  <james@daa.com.au>
+
+	* gtk/Makefile.am (EXTRA_DIST): same here.
+
+	* Makefile.am (EXTRA_DIST): include windows make stuff.
+
+	* gtk/gdk.override (_wrap_gdk_gc_tp_setattr): don't allow setting
+	attributes on GdkGC instances.  Simplifies things a bit.
+
+2002-04-21  Hans Breuer  <hans@breuer.org>
+
+	* codegen/codegen.py : added parameter --errorfilename
+	to allow redirection of stderr even with clumsy windoze
+	shell
+
+	* codegen/override.py : extended to allow 'sys.platform'
+	specific ignores
+
+	* examples/pygtk-demo/demos/colorsel.py : use
+	        color = gtk.gdk.color_parse("blue")
+	to get the initial color
+
+	* examples/pygtk-demo/demos/draw.py : (new file)
+	demonstrating some simple drawing operations. It is
+	using the gtk.GC interface additions below.
+
+	* gtk/gdk.override : implement GdkGC.tp_getattr,
+	GdkGC.tp_setattr and gdk_gc_set_dashes (ported from #if 0'ed
+	code in gtk/gtk-types.c (should be removed there ?)
+
+	* gtk/gtk.override : ignore-win32 GTK_TYPE_PLUG
+	GTK_TYPE_SOCKET gtk_socket_new (the TYPE ignores do not work yet)
+
+	* config.h.win32 makefile.msc pygtk/makefile.msc :
+	new files to build pygtk on windoze using the established
+	glib/build/win32 infrastructure
+
+	* pygtk/gtk/gtk-fake-win32.c : (new file) implementing
+	gtk_plug_get_type() and gtk_socket_get_type(). It could
+	vanish if codegen/codegen.py has learned something like
+	'ignore-class-$(sys.platform) or my GtkPlug/GtkSocket
+	patch gets accepted with Gtk.
+
+	* gtk/gtkmodule.c : added a g_assert() to ensure importing
+	pygobject did work.
+
+2002-04-21  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_drag_dest_find_target): implement.
+	(_wrap_gtk_drag_dest_get_target_list): implement.
+	(_wrap_gtk_drag_dest_set_target_list): implement.
+
+2002-04-20  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_container_get_children): implement.
+	(_wrap_gtk_container_set_focus_chain): implement.
+	(_wrap_gtk_container_get_focus_chain): implement.
+
+2002-04-19  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_insert_with_tags): implement.
+	(_wrap_gtk_text_buffer_insert_with_tags_by_name): implement.
+	(_wrap_gtk_text_child_anchor_get_widgets): implement.
+	(_wrap_gtk_tree_view_column_get_cell_renderers): implement.
+	(_wrap_gtk_tree_view_column_set_attributes): implement.
+
+2002-04-18  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_selection_data_get_targets): implement.
+	(_wrap_gtk_tree_get_row_drag_data): implement.
+	(_wrap_gtk_im_context_get_preedit_string): implement.
+	(_wrap_gtk_im_context_filter_keypress): implement.
+	(_wrap_gtk_im_context_get_surrounding): implement.
+	(_wrap_gtk_paint_polygon): implement.
+
+	* gtk/gtk-types.defs (CellEditable): add CellEditable interface.
+
+	* codegen/h2def.py (strip_comments): add function to strip
+	comments, and get rest of script to use it.  This one doesn't use
+	RE's, so it doesn't cause a stack overflow when parsing
+	atkobject.h.
+
+	* gtk/libglade.defs (get_toplevel_names): remove def, as it isn't
+	in the libglade API anymore.
+
+2002-04-16  Matt Wilson  <msw@redhat.com>
+
+	* gtk/libglade.override (_wrap_glade_bindtextdomain): added
+	wrapper which will allow user to bind a textdomain.  Also sets the
+	codeset to UTF-8 if bind_textdomain_codeset is available.
+
+	* config.h.in: added HAVE_BIND_TEXTDOMAIN_CODESET
+
+	* configure.in: check for bind_textdomain_codeset
+
+	* gtk/libglade.defs (bindtextdomain): added extra function to
+	implement gtk.glade.bindtextdomain
+
+	* gtk/gtk.override
+	(pygtk_cell_data_func_marshal,
+	_wrap_gtk_tree_view_column_set_cell_data_func): added wrapper for
+	GtkTreeViewColumn.set_cell_data_func from Jonathan Blandford
+	<jrb@redhat.com>
+
+2002-04-17  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs, gdk/gdk.defs: updates to match final gtk 2.0 APIs.
+
+2002-04-15  James Henstridge  <james@daa.com.au>
+
+	* pango.override: add a PangoAttribute wrapper type, constructors
+	for various attributes, and methods for inserting attributes in a
+	PangoAttrList.
+
+	* pango.defs, gtk/gdk.defs: add missing definitions.
+
+2002-04-12  Xavier Ordoquy  <mcarkan@user.sourceforge.net>
+
+	* configure.in:
+	* gtk/Makefile.am:
+	Added the gtk.gl module.
+
+	* gtk/gtkgl.defs:
+	* gtk/gtkgl.override:
+	* gtk/gtkglmodule.c: (initgl):
+	Updated the gtkgl module and changed the name to gtk.gl
+
+	* examples/gl/dots.py:
+	Updated example but still needs some work.
+
+	* examples/gl/cone.py:
+	* examples/gl/gears.py:
+	Updated working examples.
+
+2002-04-10  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs: remove deprecation messages for many GtkList and
+	GtkListItem methods, as they are still required for the non
+	deprecated GtkCombo.  GtkList's constructor is still marked
+	deprecated.
+
+	* gtk/gtk.override (_wrap_gtk_text_iter_get_char): don't raise an
+	exception for unicode chars > 0xffff if we have 32 bit unicode
+	chars in python.
+
+2002-04-08  James Henstridge  <james@daa.com.au>
+
+	* pango.override (_wrap_pango_glyph_string_get_logical_widths):
+	add wrapper.
+	(_wrap_pango_parse_markup): add wrapper.
+
+2002-03-28  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gdk.defs: Add functions from gdkkeys.h
+
+	* gtk/gdk-types.defs: Add GdkKeymap object
+
+2002-03-22  James Henstridge  <james@daa.com.au>
+
+	* gtk/libglade.override (connect_many): don't decref the return
+	value of PyDict_GetItemString().
+
+2002-03-22  Johan Dahlin  <jdahlin@telia.com>
+
+	* codegen/codegen.py: move type_tmpl to Wrapper class, saves 100 loc
+
+2002-03-22  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py: code generator refactoring.  Reduces file
+	length by 500 lines, and fixes a few bugs in the process.
+
+2002-03-19  Matt Wilson  <msw@redhat.com>
+
+	* autogen.sh: allow override of autoconf and autoheader
+
+	* gtk/gtk.defs (GtkTreeModel.get_iter_root): use the
+	gtk_tree_model_get_iter_first code, get_iter_root is going to be
+	deprecated.
+	(GtkTreeModel.get_iter_first): added
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_get_iter_root): check the
+	return value of gtk_tree_model_get_iter_root and return None if it
+	failed.  Rename to _wrap_gtk_tree_model_get_iter_first.
+
+	* codegen/codegen.py (write_class, write_interface, write_boxed
+	write_pointer): use overrides.is_already_included to prevent from
+	having the same override code included twice in one file.  This
+	allows two methods to point to the same function.
+
+	* codegen/override.py (Overrides.is_already_included): added a
+	function that returns true if the override code has been emitted
+	already.
+
+2002-03-11  Matt Wilson  <msw@redhat.com>
+
+	* gobjectmodule.c: remove pygobject_exception_notifiers and
+	pyg_fatal_exceptions_notify.
+
+2002-03-18  James Henstridge  <james@daa.com.au>
+
+	* pango.defs: remove indic functions -- they are part of the
+	semi-public engine API.
+	Remove pango-module functions -- backend API.
+
+	* pango.override (_wrap_pango_layout_move_cursor_visually): implement.
+	(_wrap_pango_layout_xy_to_index): implement.
+	(_wrap_pango_layout_get_extents): implement.
+	(_wrap_pango_layout_get_pixel_extents): implement.
+	(_wrap_pango_layout_get_size): implement.
+	(_wrap_pango_layout_get_pixel_size): implement.
+	(_wrap_pango_glyph_string_extents): implement.
+	(_wrap_pango_glyph_string_extents_range): implement.
+
+2002-03-17  James Henstridge  <james@daa.com.au>
+
+	* pango.override (_wrap_pango_context_list_families): implement.
+	(_wrap_pango_font_get_glyph_extents): implement.
+	(_wrap_pango_font_family_list_faces): implement.
+	(_wrap_pango_font_map_list_families): implement.
+	(_wrap_pango_tab_array_get_tab): implement.
+	(_wrap_pango_tab_array_get_tabs): implement.
+	(_wrap_pango_layout_set_markup): implement.
+	(_wrap_pango_layout_set_markup_with_accel): implement.
+	(_wrap_pango_layout_index_to_pos): implement.
+	(_wrap_pango_layout_get_cursor_pos): implement.
+
+	* gtk/gtk.override (ignore): ignore the GtkMenu append, insert and
+	prepend methods (they are deprecated and shadow the methods you
+	should use ...).
+	(_wrap_gtk_image_menu_item_new): add wrapper for GtkImageMenuItem
+	constructor (from bug 71893).
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_get_pixels): implement
+	get_pixels to return the pixels as a string.
+
+	* codegen/argtypes.py (GdkRectangleArg.write_return): fix up
+	problem with return type found by Peter Kese.
+
+2002-03-16  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c (add_property_docs): fix up property listing.
+
+	* gtk/libglade.override: add modulename directive.
+
+	* gtk/gdk.override: add modulename directive.
+
+	* gtk/gtk.override: add modulename directive.
+
+	* atk.override: add modulename directive.
+
+	* pango.override: add modulename directive.
+
+	* codegen/codegen.py (write_class): if override.modulename is set,
+	put it into the classname.
+	(write_interface): same here.
+	(write_boxed): same here.
+	(write_pointer): same here.
+
+	* codegen/override.py (Overrides.__parse_override): add support
+	for a "modulename" directive for overrides files.
+
+	* gtk/gtk-types.c (PyGtkStyleHelper_Type): add module name to type
+	name, and remove the commented out obsolete GdkColormap
+	implementation.
+
+	* gtk/gtk.override (_wrap_gtk_widget_get_pointer): return a
+	GdkRectangle instance.
+
+	* gtk/gdk.override: implement setters for GdkRectangle attributes.
+
+	* codegen/codegen.py (write_getsets): allow people to override the
+	setter without having to override the getter too.
+	(write_boxed_getsets): same here.
+
+	* gtk/gdk.override: implement sequence behaviour for GdkRectangle
+	wrapper.
+
+	* gtk/gdk-types.defs (Rectangle): add a GdkRectangle boxed type
+	definition.
+
+	* pango.override (_wrap_pango_font_description_tp_compare):
+	override the compare slot to use pango_font_description_equal.
+	(_wrap_pango_font_description_tp_hash): and the hash function.
+
+	* atk.override (_wrap_atk_relation_new): remove unused variable.
+
+	* gtk/gtk-types.defs (Window): transient_parent field is a
+	GtkWindow, rather than a GtkWidget.
+
+	* gtk/gtk.override (_wrap_gtk_ctree_node_tp_getattr): same here.
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_getattr): change to
+	"override-slot".
+
+	* codegen/codegen.py (slots_list): a list of slots that we allow
+	overriding of.
+	(typetmpl): add extra substs for some slots.
+	(write_class): add code that sets up the slot substitutions.
+	(interfacetypetmpl): add slot substitutions.
+	(boxedtmpl): add slot substitutions.
+	(write_interface): add code to set slots.
+	(write_interface): add code to set slots, and get rid of the old
+	getattr handling.
+
+	* codegen/override.py (Overrides.__parse_override): add support
+	for an "override-slot" section to overrides file for overriding a
+	slot in the PyTypeObject vtable.
+
+	* gtk/gtk.override (_wrap_gtk_selection_data_get_text): add an
+	override for this -- it was the only one correctly making use of
+
+	* codegen/argtypes.py (UCharArg.write_param): unimplement.
+	(guchar *) does not mean unicode, and often uchar returns are just
+	date (eg. pixbuf data).  gtk_selection_data_get_text is the
+	exception.
+
+2002-03-15  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_colormap_alloc_color): new function
+	to allocate colours.
+	(_wrap_gdk_color_alloc): new wrapper that shows a deprecation
+	warning, and calls alloc_color.
+
+2002-03-10  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtktreemodel.c: apply Arjan Molenaar's patch to allow
+	selectively making the model leak free (although prone to crashing
+	if you aren't careful).
+
+	* gtk/pygtktreemodel.h: add a leak_references member.
+
+2002-03-10  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk-types.defs (Window): Add 33 new fields
+
+2002-03-10  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c: remove commented out GtkStyle code, as the
+	GObject based code now provides all the missing features.
+
+	* gtk/gtk.override: implement getters (and some setters) for
+	GtkStyle properties.
+
+	* gtk/gtk-types.c (_pygtk_style_helper_new): upgrade the style
+	helper code to work with gtk 2.0.
+
+	* gtk/gtk-types.defs (Style): add public fields of the GtkStyle
+	object.
+
+	* codegen/codegen.py (write_getsets): allow adding setters for
+	overriden properties (just do a string search for the setter
+	function prototype).
+	(write_boxed_getsets): same here.
+
+2002-02-19  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.defs (MessageDialog): add some fields for the
+	label and icon.  These are marked private, but they are very
+	useful if you want to change the message in a dialog.
+
+	* ChangeLog: spell Michele's name correctly (sorry!).
+
+2002-03-06  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtkmodule.c (init_gtk): If sys.argv is NULL, don't call
+	PyList_Size and don't call PySys_SetArgv if argc and argv is NULL.
+	Bug fix so non gtk stock icons is correctly skipped.
+
+2002-02-28  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gdk.defs: Add functions from gdk-pixbuf-loader.h
+
+	* gtk/gdk-types.defs: Add GdkPixbufLoader object
+
+2002-02-27  Matt Wilson  <msw@redhat.com>
+
+	* configure.in: increase micro version of package (1.99.8)
+
+2002-02-25  Johan Dahlin  <jdahlin@telia.com>
+
+	* examples/pygtk-demo/pygtk-demo.py: Use set_size_request instead of
+	set_usize
+
+	* gtk/gtk.override (_wrap_gtk_widget_translate_coordinates): Impl
+	(_wrap_gtk_editable_get_selection_bounds): Impl
+	(_wrap_gtk_entry_get_layout_offsets): Impl
+
+	* gtk/gtk.defs: Add GtkTreeView.columns_autosize
+	Remove GtkTreeViewColumn.cell_renderer/cell_focus/
+	cell_draw_focus/cell_is_visible_cell_set_dirty
+
+	* gtk/gtk-types.defs: Add a few fields
+
+	* examples/pygtk-demo/demos/appwindow.py: clean up a bit and add
+	broken stock icon registration
+
+2002-02-21  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk.defs: Removed
+	gtk_tree_view_column_cell_render,
+	gtk_tree_view_column_cell_focus,
+	gtk_tree_view_column_cell_draw_focus and
+	gtk_tree_view_column_cell_set_dirty since they're now private
+	in gtk+.
+
+2002-02-18  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (create_item): remove defs for removed
+	GtkItemFactory functions.  Fixes bug #69815.
+
+2002-02-12  Johan Dahlin  <jdahlin@telia.com>
+
+	* gobjectmodule.c (initgobject): Fix a leak
+
+	* gtk/gtkmodule.c (init_gtk): Fix another one
+
+2002-02-06  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_icon_set_get_sizes): added an
+	override that will allow making an empty iconset, thus allowing
+	you to add modified sources to it.
+
+2002-02-05  Johan Dahlin  <jdahlin@telia.com>
+
+	* examples/pygtk-demo/demos/list_store.py: add toggle for the check
+	box column.
+
+2002-02-05  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (register_types): register pointer types as
+	well.
+
+	* codegen/argtypes.py (PointerArg): handling for pointer arg
+	types.
+	(ArgMatcher.register_pointer): add function to register pointer
+	types.
+
+	* gtk/gtk.override (_wrap_gtk_ctree__get_selection): GtkCTreeNode
+	is not a boxed type.
+	(_wrap_gtk_ctree_base_nodes): same.
+	(_wrap_gtk_ctree_insert_node): same.
+	(_wrap_gtk_ctree_find_by_row_data): same.
+	(_wrap_gtk_ctree_find_all_by_row_data): same.
+	(_wrap_gtk_ctree_node_get_text): same.
+	(_wrap_gtk_ctree_node_get_pixmap): same.
+	(_wrap_gtk_ctree_node_get_pixtext): same.
+	(_wrap_gtk_ctree_get_node_info): same.
+	(_wrap_gtk_ctree_node_set_row_data): same.
+	(_wrap_gtk_ctree_node_get_row_data): same here.
+	(_wrap_gtk_ctree_getattr): same here.
+
+	* codegen/codegen.py (write_source): register pointer types as
+	pointers.
+
+	* pango.override (_wrap_pango_font_description_new): ignore some
+	private (well, pango module API) functions.
+
+	* gtk/gtk-types.defs (CTreeNode): make this a pointer type.
+
+	* codegen/codegen.py (write_pointer_method): new method to write
+	methods for GPointer types.
+	(write_pointer_constructor): new function for writing constructor
+	for GPointer types.
+	(write_pointer_getsets): new function for writing getters for
+	pointer objects (this should be merged with the GObject and GBoxed
+	versions ...).
+	(write_pointer): add new function, which calls all the GPointer
+	related functions.
+	(write_source): write pointer types.
+
+	* gobjectmodule.c (initgobject): actually ready the GPointer type.
+
+	* gtk/gtk-types.defs (CTreeNode): get rid of fields here.  They
+	will be covered by the custom getattr() function, so no need to
+	duplicate.
+
+	* codegen/codegen.py (write_boxed_getsets): convert to use getsets
+	for boxed objects.
+	(write_boxed): use write_boxed_getsets() to write the getsets,
+	while allowing boxed objects to specify a getattr() function.
+
+2002-02-04  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (initgobject): add GPointer to the module dict.
+	(pygobject_api_functions): and to the API vtable.
+
+	* pygobject.h (pyg_constant_strip_prefix): and add it to the
+	public header.
+
+	* pygobject-private.h (pyg_pointer_new): add stuff to private
+	header ...
+
+	* pygboxed.c (PyGPointer): add code to handle base GPointer type.
+
+	* codegen/defsparser.py (DefsParser.__init__): add self.pointers
+	attribute.
+	(DefsParser.define_pointer): handle (define-pointer ...).
+	(DefsParser.write_defs): handle pointer types.
+
+	* codegen/definitions.py (PointerDef): new definition type for
+	G_TYPE_POINTER subclasses.
+
+2002-02-04  Richard Hestilow  <hestilow@ximian.com>
+
+	* gtk/gtk.override (gtk_cell_renderer_get_size, get_fixed_size):
+	Don't call pygobject_get, just pass in v->obj.
+
+2002-01-31  James Henstridge  <james@daa.com.au>
+
+	* configure.in: increment version number of package and
+	requirements.  Change -ansi to -std=c9x to work arround potential
+	problems with gcc 2.95.x.
+
+	* gtk/libglade.override (connect_one): fix up signature on
+	function.
+	(connect_many): same here.
+
+2002-01-28  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_type_register): same code here, if __doc__
+	hasn't already been set.
+	(initgobject): don't bother setting __doc__ on GObject here, as
+	pygobject_register_class() does this for us.
+
+	* pygobject.c (pygobject_register_class): need to set the __doc__
+	descriptor on every class, otherwise it gets lost.
+
+2002-01-24  James Henstridge  <james@daa.com.au>
+
+	* examples/pygtk-demo/demos/colorsel.py:
+	* examples/pygtk-demo/demos/dialogs.py:
+	* examples/pygtk-demo/demos/panes.py:
+	* examples/pygtk-demo/demos/sizegroup.py: add examples translated
+	by Michele Campeotto.
+
+	* gtk/gtk.override (_wrap_gtk_stock_add): add gtk.stock_add()
+	function from Skip (bug 68363).
+	(_wrap_gtk_layout_get_size): add gtk.Layout.get_size() routine --
+	from Skip (bug 68930)
+	(_wrap_gtk_frame_get_label): added function from Skip (bug 69024)
+	(_wrap_gtk_misc_get_alignment): same here.
+	(_wrap_gtk_ruler_get_range): same here.
+
+	* examples/simple/simple.py: updated to use gobject.new().
+
+	* examples/simple/hello.py: updated version from Steve
+	George. (bug 67602)
+
+	* pygtype.c (add_signal_docs): use g_string_append_printf().
+	(add_property_docs): same here.
+
+	* examples/simple/tooltip.py: updated version from Steve
+	George. (bug 67581).
+
+2002-01-23  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c (object_doc_descr_get): fill in __doc__ descriptor
+	(add_property_docs): fix small bug.
+	(add_signal_docs): only get the class for a type if it is a
+	classed type.
+
+	* gobjectmodule.c (initgobject): add __doc__ descriptor to GObject
+	and GInterface.  Add __gdoc__ as a synonym because type.__doc__
+	masks our descriptor sometimes :(
+
+	* pygtype.c (object_doc_descr_get): skeleton of the __doc__
+	descriptor.
+	(PyGObjectDoc_Type): type definition.
+	(pyg_object_descr_doc_get): function to create and return the
+	__doc__ descriptor (we only need one for all classes).
+
+2002-01-22  James Henstridge  <james@daa.com.au>
+
+	* pygobject.c: move GObject wrapper stuff here.
+
+2002-01-22  Johan Dahlin  <jdahlin@telia.com>
+
+	* codegen/codegen.py: Fix comments so jed can highlight correctly.
+
+	* codegen/argtypes.py: Add GdkRectangleArg and GdkRectanglePtrArg
+
+	* gtk/gtkgl.override: call pyg_block_threads instead of old
+	pygtk_block_threads.
+
+	* gtk/gtk.override: Don't ignore gtk_paint*
+
+	* gtk/gtk.defs: Remove Container.border_width
+	(GtkIconSet.icon_set_new_from_pixbuf): Make constructor of
+	GtkIconSet instead of gtk_icon_Set_new
+	(GtkStyle.draw_oval) (GtkStyle.draw_cross) (GtkStyle.draw_ramp) Remove.
+	(GtkStyle.draw_type): Add state_type parameter
+
+	* gtk/gtk-types.defs (Widget): Add allocation field
+	(Container): add fields.
+
+	* gtk/gdk-types.defs: Remove GdkRectangle
+
+2002-01-22  James Henstridge  <james@daa.com.au>
+
+	* pygtype.c: move closure stuff here.
+
+	* gobjectmodule.c (initgobject): don't create boxed_marshal hash
+	table, and remove the type functions moved to pygtype.c.
+
+	* pygtype.c: move GType stuff here from gobjectmodule.c.
+	(pyg_register_boxed_custom): store the custom boxed marshal
+	functions as GType data, rather than in a separate hash table.
+
+2002-01-21  James Henstridge  <james@daa.com.au>
+
+	* Makefile.am (gobjectmodule_la_SOURCES): list extra source files.
+
+	* pygobject-private.h (pyg_boxed_new): new header for functions
+	shared between files in gobjectmodule.
+
+	* pygboxed.c (pyg_register_boxed): move GBoxed handling code here.
+
+2002-01-21  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_radio_button_get_group): implemented
+	GtkRadioButton.get_group
+
+2002-01-16  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_toolbar_append_element): remove '!'
+	signs that shouldn't have been there.
+	(_wrap_gtk_toolbar_prepend_element): same here.
+	(_wrap_gtk_toolbar_insert_element): and again.
+
+2002-01-14  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (main): add a --load-types argument that runs
+	a python script before commencing code generation.  The idea is to
+	allow loading of extra argument type handlers.
+
+	* gtk/libglade.override (connect_one): s/ignore_glob/ignore-glob/
+
+2002-1-13  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/Makefile.am: Register gtk-types here, so XML.get_widget works.
+
+2002-01-12  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_type_from_object): convert None, int, long,
+	float, str and object to GTypes.
+
+	* gtk/gtkmodule.c (init_gtk): only raise a runtime error if we
+	can't initialise gtk.
+
+2002-01-11  Matt Wilson  <msw@redhat.com>
+
+	* Makefile.am (EXTRA_DIST): added appwindow.py
+
+	* examples/pygtk-demo/demos/appwindow.py: added demo
+
+	* gtk/gtk.override (_wrap_gtk_toolbar_insert_stock): removed
+	debugging code I didn't mean to check in.
+
+	* gobjectmodule.c (pyg_closure_new): use PyTuple_SetItem to build
+	the tuple if extra_args isn't one.  It's faster than using
+	abstractions and clarifies ownership rules, so we always incref
+	extra_args even if we're about to wrap it in a tuple.  Fixes
+	crashes when passing callback functions into
+	GtkToolbar.{append_item,prepend_item,insert_item,insert_stock,
+	append_element}
+
+2002-01-11  Matt Wilson  <msw@redhat.com>
+
+	* codegen/argtypes.py (GtkTreePathArg.normal): added missing newline
+
+	* gtk/gtk.defs (item_factory_path_from_widget): the return here
+	should be gconst-gchar*.  The header in gtk is wrong, filed
+	#68527 against gtk.
+
+	* gtk/gtk.override (pygtk_item_factory_cb): if the user passed
+	data to GtkItemFactory.create_items, call the callable with the
+	function data as the first parameter.
+	(_wrap_gtk_item_factory_create_items): take an optional
+	callback_data argument.  Use PyGtkCustomNotify and
+	g_object_weak_ref to free up the reference to the callable and
+	data after the item factory is freed.
+
+2002-01-11  James Henstridge  <james@daa.com.au>
+
+	* codegen/h2def.py (find_obj_defs): handle typedef struct { ... }
+	style type defs, as used in bonobo.
+
+2002-01-09  Matt Wilson  <msw@redhat.com>
+
+	* codegen/argtypes.py (GtkTreePathArg.freepath): added missing
+	newline.
+
+	* gtk/gtk.override (pygtk_tree_foreach_marshal,
+	pygtk_tree_selection_marshal): handle exceptions raised in
+	callback func.
+
+2002-01-08  James Henstridge  <james@daa.com.au>
+
+	* gtk/__init__.py (threads_*): provide these functions in the gtk
+	namespace as well as gtk.gdk.
+
+2002-01-07  James Henstridge  <james@daa.com.au>
+
+	* examples/pygtk-demo/demos/itemfactory.py (main): the F10 key is
+	used to start navigating the menu -- not alt.
+
+	* gtk/gtk-types.c (PyGtkStyleHelper_Dealloc): use PyObject_DEL.
+	(PyGtkStyle_Dealloc): same here.
+	(PyGdkWindow_Dealloc): same here.
+	(PyGdkGC_Dealloc): same here.
+	(PyGdkColormap_Dealloc): same here.
+	(pygdk_atom_dealloc): same here.
+
+	* gobjectmodule.c (pyg_type_wrapper_dealloc): use PyObject_DEL to
+	prevent segfaults with pymalloc.
+	(pyg_param_spec_dealloc): same here.
+
+	* gtk/gtkmodule.c (init_gtk): get rid of g_thread_init() call --
+	this occurs in gobjectmodule now.
+
+	* gtk/gdk.override (pygdk_unblock_threads): give the function the
+	right name (duh).
+
+	* configure.in (AM_PATH_GLIB_2_0): add $extra_mods
+
+	* gobjectmodule.c (initgobject): initialise GThread if threading
+	is enabled at compile time (this doesn't initialise GDK threading
+	though -- you need to run gtk.gdk.threads_init for that).
+
+	* gtk/gdk.override (_wrap_gdk_threads_enter): add overriden
+	implementation that allows threads while waiting, so some other
+	thread has a chance to give up the gdk lock.
+
+	* gtk/gtkmodule.c (functions): remove stuff.
+
+	* gtk/pygtk-private.h: remove definitions here as well.
+
+	* gtk/pygtk.h (_PyGtk_FunctionStruct): remove destroy notify and
+	thread block stuff.
+
+	* gtk/gtkobject-support.c: remove pygtk_destroy_notify.
+
+	* gtk/gtk.override (pygtk_tree_foreach_marshal): move this
+	function here from gtkobject-support.c, and don't bother blocking
+	threads.
+	(_wrap_gtk_tree_selection_selected_foreach): same here -- don't
+	need to unblock threads.
+	(pygtk_tree_selection_marshal): move this function here from
+	gtkobject-support.c.  Convert to use pyg_block_threads.
+	(_wrap_gtk_dialog_run): add overriden implementation that unblocks
+	threads.
+	(_wrap_gtk_main): use pyg_block_threads
+	(_wrap_gtk_main_iteration): same.
+	(_wrap_gtk_item_factory_create_items): same here.
+	(_wrap_gtk_menu_popup): same here.
+	(_wrap_gtk_clist_set_row_data): use pyg_destroy_notify
+	(_wrap_gtk_timeout_add): same here.
+	(_wrap_gtk_idle_add): same here.
+	(_wrap_gtk_quit_add): same here.
+	(_wrap_gtk_input_add_full): same here.
+	(_wrap_gtk_ctree_node_set_row_data): same here.
+
+	* gtk/gtkobject-support.c: remove PyGTK_BLOCK_THREADS and
+	PyGTK_UNBLOCK_THREADS macros.
+	(pygtk_destroy_notify): use pyg_block_threads.
+	(pygtk_custom_destroy_notify): same.
+	(pygtk_handler_marshal): same.
+	(pygtk_input_marshal): same.
+
+	* gtk/gdk.override (_wrap_gdk_threads_init): register gdk lock
+	based recursive threads block/unblock functions.  If threading was
+	disabled at compile time, then this function will error out.
+
+	* gtk/gdk.defs (threads_enter, threads_leave, threads_leave): add
+	functions.
+
+	* gobjectmodule.c (functions): add destroy_notify here as well.
+
+	* pygobject.h: add destroy_notify to the PyGObject_Functions
+	vtable.
+
+	* gobjectmodule.c (pyg_set_thread_block_funcs): handler for
+	registering thread block/unblock funcs.
+	(pygobject_destroy_notify): block threads during DECREF call.
+	(pyg_closure_destroy): block threads during closure DECREF.
+	(pyg_closure_marshal): block threads when calling function.
+	(pyg_signal_class_closure_marshal): block threads.
+	(functions): add extra functions to vtable.
+
+	* pygobject.h (struct _PyGObject_Functions): add thread
+	block/unblock slots to the API table.
+
+2002-01-03  Matt Wilson  <msw@redhat.com>
+
+	* Makefile.am (EXTRA_DIST): add missing demo files
+
+	* examples/pygtk-demo/demos/itemfactory.py: added demo
+
+	* gtk/gtk.override (_wrap_gtk_item_factory_create_items): accept a
+	sequence for the entries, not just a list.
+
+2002-01-03  Matt Wilson  <msw@redhat.com>
+
+	* examples/pygtk-demo/demos/list_store.py (create_model): remove
+	-1 from store.set call.
+
+	* gtk/gtk.defs (GtkMenuBar.append, GtkMenuBar.prepend,
+	GtkMenuBar.insert): uncomment, just ignore these in gtk.override
+
+	* gtk/gtk.override (ignore): ignore gtk_menu_bar_append,
+	gtk_menu_bar_insert, and gtk_menu_bar_prepend.
+
+	* gtk/gtkmodule.c (init_gtk): remove unused v variable.
+
+	* gtk/gtk-types.defs (DialogFlags): s/define-enum/define-flags/
+
+2001-12-24  James Henstridge  <james@daa.com.au>
+
+	* Makefile.am (EXTRA_DIST): same here.
+
+	* gtk/Makefile.am (EXTRA_DIST): include the defs files in the
+	dist, or things don't work.
+
+2001-12-24  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk.override: Remove window arg.
+	(_wrap_gtk_item_factory_create_items): Change PyArg_ParseTuple
+	format args a bit and reset cb and ent for every item.
+
+2001-12-24  James Henstridge  <james@daa.com.au>
+
+	* configure.in: define pygtk version and required package versions
+	as m4 macros at the top of the file rather than shell variables.
+	These can be put before the AC_INIT macro without problems.
+	(AM_PATH_PYTHON): require python 2.2 final.
+
+2001-12-21  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.defs (gdk_colormap_change): comment out, as we have two
+	GdkColormap.change's.
+
+	* gtk/gtk.defs (append): this is a method of menu
+	(prepend): same here.
+	(insert): same here.
+	(): now comment out the above three, as they shadow the methods
+	their deprecation messages recommend using.  (problem picked out
+	by running xmllint over output docs).
+
+	* codegen/docgen.py (DocbookDocWriter.__init__): add constructor
+	with a use_xml parameter, which turns on DocBook/XML output.
+	(DocbookDocWriter.create_filename): use ".xml" as extension if we
+	are writing DocBook/XML.
+	(DocbookDocWriter.output_toc): optionally write out the
+	DocBook/XML doctype.
+
+	* codegen/docgen.py (DocWriter.output_interface_docs): new
+	function for outputting documentation about interfaces.
+	(DocWriter.output_docs): output interface definitions.
+	(DocbookDocWriter.write_heirachy): convert the list of interfaces
+	the class implements into a list.
+
+2001-12-20  James Henstridge  <james@daa.com.au>
+
+	* build-docs.py: script to generate documentation.
+
+	* codegen/docgen.py (DocWriter.add_sourcedirs): new function for
+	scanning source dirs, pulled out of the constructor.
+	(DocWriter.output_docs): sort object defs by python name rather
+	than c anme.
+
+	* codegen/docgen.py (DocWriter.__init__): don't actually load the
+	defs and overrides file in the constructor.
+	(DocWriter.add_docs): new method for parsing a (defs, overrides,
+	modulename) triple, -- the aim being to include docs for multiple
+	modules in one sgml document.  Also, build up a map from C type
+	names to python names.
+	(DocbookDocWriter.__format_function): translate to python class
+	names.
+	(DocbookDocWriter.__format_symbol): same here.
+	(DocbookDocWriter.create_constructor_prototype): and here.
+	(DocbookDocWriter.write_heirachy): and here.
+	(DocbookDocWriter.write_method): and here.
+
+	* codegen/scmexpr.py (Parser.startParsing): allow passing a
+	filename as the argument here.
+
+	* codegen/override.py (Overrides.handle_file): don't make this
+	method private.
+
+	* codegen/docextract.py (extract): add second argument doc_dict,
+	so that the function can be used to update an existing dictionary.
+
+	* configure.in (minver): require 2.2c1
+
+	* gobjectmodule.c (pygobject_chain_from_overridden): fix for
+	updated API.
+	(pygobject_methods): just call the method "chain".
+
+2001-12-19  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py (DocWriter.output_object_docs): fix for
+	changes to the way parent types are listed in the defs format.
+	(DocWriter.create_method_prototype): of_object is only a string
+	now -- not a 2-tuple.
+	(DocbookDocWriter.make_method_ref): same here.
+	(DocbookDocWriter.__format_function): and here ...
+	(DocbookDocWriter.__format_symbol): and here :)
+	(DocbookDocWriter.write_method): again here.
+
+2001-12-18  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_value_from_pyobject): add support for
+	int64/uint64.  Fix up code for unsigned int/long to parse long
+	ints if necessary.
+	(pyg_value_as_pyobject): add support for int64/uint64, and get
+	UINT/ULONG to return python long ints if necessary, rather than
+	wrapping around.
+
+	* Makefile.am (EXTRA_DIST): add new example to dist.
+
+	* examples/gobject/properties.py: test program that implements a
+	few properties.
+
+	* gobjectmodule.c (add_properties): new function for parsing the
+	__gproperties__ class attribute.
+	(create_property): helper routine for creating and installing the
+	new pspecs.
+	(pyg_type_register): add code to call add_properties if a
+	__gproperties__ attribute is found.
+	(pyg_object_class_init): set set_property/get_property methods in
+	vtable, and get rid of debug message.
+	(initgobject): add G_PARAM_* constants.
+
+2001-12-17  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_chain_from_overridden): add chaining
+	function.  This will need to change when Tim makes the changes to
+	the chaining API.  This was just to test that things worked
+	correctly (and they do).  Possibly this should be renamed to just
+	GObject.chain() or GObject._chain().
+
+2001-12-15  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (add_signals): put the class ref/unref in here,
+	so it is only done once.  The ref/unref is really needed for
+	adding signals as well, so that we don't end up with dups.
+
+2001-12-14  Johan Dahlin  <jdahlin@telia.com>
+
+	* gobjectmodule.c (initgobject): Add gobject.glib_version.
+
+	* configure.in (PYGTK_MINOR_VERSION): Add and define
+	PYGTK_[MAJOR,MINOR,MACRO]_VERSION. Also add *_REQUIRED_VERSION
+	for dependencies.
+
+	* gtk/gtkmodule.c (init_gtk): remove gtk_major_version,
+	gtk_minor_version and gtk_macro_version and replace them with
+	gtk_version,
+	Add pygtk_version.
+
+2001-12-14  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (override_signal): another helper function for
+	overriding existing signals.  Haven't done chaining support yet.
+	(add_signals): if value in __gsignals__ dict is None or
+	'override', then call override_signal instead.
+	(override_signal): add g_type_class_ref() calls so that parent
+	signals are registered.
+
+	* examples/gobject/signal.py: use __gsignals__ notation here.
+
+	* gobjectmodule.c (create_signal, add_signals): helper routines
+	for handling __gsignals__ attribute of classes.
+	(pyg_type_register): add support for creating signals as part of
+	type registration.
+
+2001-12-14  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtk.override (_wrap_gtk_window_get_position):
+	(_wrap_gtk_window_get_size):
+	(_wrap_gtk_window_get_default_size): Impl.
+
+	* gtk/gtk-types.defs (FileSelection): Added fields.
+
+	* gtk/gtk.defs (gtk_pixmap_new): Fix deprecation warning. GtkPixbuf->GdkPixbuf
+	* gtk/gtk.defs (set_usize): dito, set_default_size -> set_size_request
+
+2001-12-12  Matt Wilson  <msw@redhat.com>
+
+	* gobjectmodule.c (pyg_closure_marshal,
+	pyg_signal_class_closure_marshal): always print and clear the
+	exceptions in callback marshalers.  People who want to catch these
+	exceptions and make them fatal should use sys.excepthook.
+	(pyg_fatal_exceptions_notify, pyg_fatal_exceptions_notify_add,
+	pyg_fatal_exceptions_remove): remove now unused functions.  Also
+	remove them from the PyGObject_API.
+
+	* gtk/pygtk.h (PyGtk_FatalExceptions): remove.
+
+	* gtk/pygtk-private.h (PyGtk_FatalExceptions): remove.
+
+	* gtk/gtkmodule.c (init_gtk): don't bother with
+	PYGTK_FATAL_EXCEPTIONS.
+	(pygtk_main_quit): remove unused code.
+
+	* gtk/gtk.override (_wrap_gtk_item_factory_create_items,
+	_wrap_gtk_menu_popup): likewise, always print and clear the
+	exception.
+
+2001-12-11  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs: added deprecation messages
+
+	* codegen/definitions.py (FunctionDef.write_defs,
+	MethodDef.write_defs): write out deprecation messages if they
+	exist
+	(MethodDef.__init__, FunctionDef.__init__): parse deprecated tags
+	in defs file, added some sanity checking and error reporting
+
+	* codegen/codegen.py (write_method, write_constructor,
+	write_function): write out deprecation warning messages.
+
+2001-12-11  James Henstridge  <james@daa.com.au>
+
+	* atk.defs: remove atk_attribute_get_name/value (again).
+
+2001-12-10  Matt Wilson  <msw@redhat.com>
+
+	* gtk/libglade.defs: added missing defs.
+
+	* atk.defs: add missing defs.
+
+2001-12-09  James Henstridge  <james@daa.com.au>
+
+	* atk.defs (text_attribute_get_name): rename.
+	(text_attribute_get_value): rename.
+
+	* gtk/gtk.override (_wrap_gtk_input_add_full): use
+	PyObject_AsFileDescriptor to convert the first arg to the fd.
+
+2001-12-07  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (GtkTable.get_row_spacing): one more missing defs
+	entry.
+
+2001-12-07  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (ignore-glob): ignore all functions that start
+	with _
+
+	* codegen/definitions.py (FunctionDef.merge): if a cname changed
+	from a method to a function, the merge would fail here.  Handle
+	the exception.
+
+	* codegen/argtypes.py, codegen/codegen.py: don't use + for
+	strings, use literal concatenation or """.
+
+	* codegen/defsparser.py (DefsParser.printMissing): new function to
+	support missingdefs.py
+
+	* codegen/missingdefs.py: new program to help find things missing
+	in .defs files
+
+	* gtk/gtk.defs, gtk/gtk-types.defs: merged in missing entries in
+	the defs file.
+
+2001-12-06  Matt Wilson  <msw@redhat.com>
+
+	* codegen/argtypes.py (BoxedArg, CustomBoxedArg): for null-ok
+	functions, added "or None" to the error string.
+
+	* gtk/gtk.defs (GtkTreeModel.iter_n_children,
+	GtkTreeModel.iter_nth_child): add null-ok to the special cased
+	iter parameters that mean 'root'.  Reported by Robert Nikander.
+
+2001-12-05  Matt Wilson  <msw@redhat.com>
+
+	* codegen/codegen.py (write_function, write_method,
+	write_boxed_method): output the args and kwargs to the wrapper
+	function only if it takes arguments
+
+2001-12-05  Matt Wilson  <msw@redhat.com>
+
+	* codegen/argtypes.py (WrapperInfo): split get_varlist into
+	get_varlist and get_kwlist to avoid unused kwlists when generating
+	noarg functions.
+
+	* codegen/codegen.py (write_boxed, write_functions, write_class,
+	write_interface): check to see if override function wants no args,
+	use METH_NOARGS if so.  Also get the method flags from the various
+	function writers so they can ask to have noargs placed in their
+	flags
+	(write_function, write_method, write_boxed_method): write out the
+	parse args and keywords only if there are parameters to parse.
+	Return METH_NOARGS if we don't accept arguments,
+	METH_VARARGS|METH_KEYWORDS otherwise.
+
+	* codegen/override.py (Overrides.is_overriden): keep a dictionary
+	of overrides that have the 'noargs' key in them.
+
+	* gtk/gtkgl.override, gtk/gtk.override, gtk/gdk.override): removed
+	argument parsing from functions/methods that take no arguments,
+	mark them as noarg
+
+	* examples/pygtk-demo/demos/list_store.py (create_model): use new
+	GtkListStore.set method.
+
+2001-12-04  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_list_store_set,
+	_wrap_gtk_tree_store_set): added.
+
+2001-12-03  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_rc_set_default_files,
+	_wrap_gtk_rc_get_default_files, _wrap_gtk_icon_set_get_sizes,
+	_wrap_gtk_cell_renderer_get_size,
+	_wrap_gtk_cell_renderer_get_fixed_size): added
+
+	* codegen/argtypes.py (UCharArg.write_return): implemented.
+
+	* codegen/codegen.py (exc_info): wrote a common function that
+	returns a descriptive string when wrapper generation goes wrong.
+	Modified codegen functions to call it on exception.
+
+	* gtk/gtk.defs (rc_set_image_loader, ctree_node_from_cobject):
+	removed
+
+2001-12-02  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_create_tag): fix up
+	format string, from bug #65636 (Skip again).
+
+	* gobjectmodule.c (pyg_type_wrapper_repr): fix up format string,
+	from bug #65640 (from Skip).
+
+	* codegen/argtypes.py (GTypeArg.write_return): use pyg_error_check
+	to raise the exception.  Now the domain and code elements of the
+	GError are available.
+	(GtkTreePathArg.write_param): add to codeafter in order to free
+	the tree path we created, fixing a leak.
+
+	* gobjectmodule.c (initgobject): create a gobject.GError
+	exception.
+	(pyg_error_check): function for converting a GError into a
+	gobject.GError python exception.
+
+2001-12-01  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py: change write_return methods to simply add a
+	"ret" variable to the varlist of the appropriate return type, and
+	add code for returning the correct value to codeafter code list.
+	(GErrorArg.write_param): add error handling code to the codeafter
+	code list.
+
+	* codegen/codegen.py: s/extracode/codebefore/
+	(*): get rid of the %(handlereturn)s stuff, and replace with "ret
+	= functioncall" statements, followed by %(codeafter)s.
+
+	* codegen/codegen.py: update to use WrapperInfo.
+
+	* codegen/argtypes.py: lots of changes to add a WrapperInfo class,
+	that replaces many of the arguments to the
+	write_param/write_return methods of ArgTypes.
+
+2001-11-30  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_register_class): get rid of
+	class_hash, and store the pointer to the python class with
+	g_type_set_qdata().
+	(pygobject_lookup_class): look up python class with
+	g_type_get_qdata.
+	(pyg_object_class_init): a class_init function for types defined
+	in python.  The python class is passed as the "class_data"
+	argument.  Currently empty, but will be used to install
+	eg. get_property and set_property members.
+	(pyg_type_register): store pointer to class like we do for types
+	defined in C.
+	(initgobject): move the quark initialisations above the
+	registration of GObject.
+
+2001-11-29  Matt Wilson  <msw@redhat.com>
+
+	* gtk/libglade.defs (glade_xml_new): fname is actually required.
+	Added default to NULL for all arguments that are null-ok.
+
+	* gtk/libglademodule.c: added missing #include pygobject.h.  Why
+	does pygtk.h define NO_IMPORT_PYGOBJECT?
+
+	* atk-types.defs: split atk types off into its own file
+
+	* Makefile.am, gtk/Makefile.am: more Makefile cleanups
+
+2001-11-28  Matt Wilson  <msw@redhat.com>
+
+	* gtk/Makefile.am: removed disthook, marked autogenerated .c files
+	as nodist sources.
+
+	* Makefile.am: likewise.  Use a suffix rule instead of a pattern
+	rule for wider make compatibility.
+
+	* gtk/gtk.override (_wrap_gtk_window_set_geometry_hints): added
+	min_aspect and max_aspect to the kwlist so that the kwlist length
+	matches the number of arguments in the argparse format string.
+
+	* codegen/h2def.py (define_func): someone was thinking that a
+	re.split looked like string.split.  Also fix the argument munger
+	that I broke the other day.
+
+	* atk.override (_wrap_atk_relation_new): fixed the constructor so
+	it actually works
+
+	* gtk/Makefile.am ($(srcdir)/gtk.c): get the atk types
+
+	* gtk/gtk.override: import atk.Object as PyAtkObject_Type
+
+	* Makefile.am (EXTRA_DIST): added examples/atk/atk-demo.py
+
+	* atk.defs (relation_new): mark as constructor of AtkRelation
+	(atk_no_op_object_factory_new): mark as constructor of
+	AtkNoOpObjectFactory
+
+2001-11-27  Matt Wilson  <msw@redhat.com>
+
+	* atk.defs, atk.override, atkmodule.c: added start of atk wrapper
+
+	* gtk/Makefile.am (DISTCLEANFILES): remove generated files
+	($(srcdir)/gtk.c): modify targets to output generated files in the
+	builddir, not the srcdir.
+	($(srcdir)/gdk.c): likewise.
+	($(srcdir)/libglade.c): likewise.
+
+	* codegen/h2def.py (define_func): add check to workaround broken
+	string.replace semantics on python 1.5
+
+	* codegen/codegen.py (write_enums): if the enum or flag doesn't
+	have a GType, just add those enum values listed in the defs file
+	by hand.
+
+	* codegen/argtypes.py (ArgMatcher.register_enum): if defs file
+	doesn't specify a GType for the enum, use G_TYPE_NONE.
+	(ArgMatcher.register_flag): likewise.
+
+	* gobjectmodule.c (pyg_enum_get_value): allow enums to pass
+	G_TYPE_NONE in as the type, disabling the string to value
+	conversion.
+	(pyg_flags_get_value): likewise.
+	(pyg_constant_strip_prefix): new function to combine common
+	codepath.
+	(pyg_enum_add_constants): use pyg_constant_strip_prefix
+	(pyg_flags_add_constants): likewise.
+	(functions): make pyg_constant_strip_prefix available to users of
+	pygobject
+
+	* pygobject.h: added pyg_constant_strip_prefix wrapper
+
+	* configure.in: added ATK test, subst for ATK_CFLAGS and ATK_LIBS.
+
+	* Makefile.am (%.c): added generic codegen target for pango and
+	atk.  Added DISTCLEANFILES so that generated files will be
+	removed.  Added atk targets, cflags, ldflags.
+
+2001-11-26  Matt Wilson  <msw@redhat.com>
+
+	* configure.in: bump up required versions of gtk, pango, and glib.
+
+2001-11-26  Matt Wilson  <msw@redhat.com>
+
+	* configure.in: 1.99.5
+
+2001-11-20  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (GtkStyle.render_icon): change size argument type
+	to GtkIconSize.
+	(gtk_image_new_from_stock): likewise, change from constructor to
+	function, rename to image_new_from_stock.
+	(gtk_image_new_from_icon_set): likewise.
+	(gtk_image_new_from_animation): change from constructor to
+	function, rename to image_new_from_animation.  Should these just
+	go in as an overloaded constructor for GtkImage()?
+	(icon_source_new): is-constructor-of GtkIconSource
+	(icon_set_new): is-constructor-of GtkIconSet
+
+2001-11-19  Matt Wilson  <msw@redhat.com>
+
+	* codegen/codegen.py (attrchecktmpl): fix indention.
+	(write_getsets): use the handler's error handling code snippits.
+	(write_boxed_getattr): likewise.
+
+	* gobjectmodule.c (pyg_fatal_exceptions_notify_{add,remove}):
+	fixed think-o, don't store a pointer to the function pointer, just
+	store the function pointer.
+
+	* pango.defs (PangoContext.add_font_map): renamed to set_font_map
+	(PangoFontMap.load_font): added context argument
+
+2001-11-17  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs: added GtkTreeView.get_columns,
+	GtkTreeView.move_column_after, GtkTreeView.map_expanded_rows,
+	GtkTreeView.row_expanded, GtkTreeView.get_cursor,
+	GtkTreeView.get_bin_window, GtkTreeView.enable_model_drag_source,
+	GtkTreeView.enable_model_drag_dest, GtkTreeView.set_enable_search,
+	GtkTreeView.get_enable_search, GtkTreeView.get_search_column,
+	GtkTreeView.set_search_column, GtkTreeView.get_search_equal_func,
+	GtkTreeView.set_search_equal_func,
+	GtkTreeView.set_destroy_count_func
+
+2001-11-17  Matt Wilson  <msw@redhat.com>
+
+	* codegen/codegen.py (write_*): pass in any error checking and
+	handling code snippets into the return function writer.  Only add
+	keywords for arguments that are going to be parsed, Python 2.2 now
+	checks to make sure the kwlist length equals the paramspec.
+
+	* codegen/argtypes.py: remove GtkCTreeNode custom registration,
+	it's a generic boxed type.  Added a GErrorType requested in bug
+	#63980.  This requires inserting possible error checking in each
+	type's write_return method.
+
+	* gtk/gtk.defs (gtk_image_new_from_icon_set): changed size
+	argument from char* to GtkIconSize
+	(GtkIconSet.render_icon): likewise
+
+	* gtk/gtk-types.defs (IconSet): added GtkIconSet boxed type
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_get_value): value is not
+	parsed, remove it from the kwlist.
+
+2001-11-16  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos): remove
+	window argument
+
+	* gtk/gtk.defs (GtkTreeView.get_path_at_pos): remove window argument
+
+	* gobjectmodule.c (pyg_param_spec_getattr, pyg_param_spec_repr):
+	s/g_param_get_{name,nick,blurb}/g_param_spec_get_{name,nick,blurb}/g
+	(pyg_fatal_exceptions_notify_remove): use the right type.
+
+	* gtk/pygtk.h (init_pygtk): need to cast to the right type for
+	_PyGTK_API init.
+
+2001-11-15  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (GtkEditable.insert_text): note default for
+	position to be 0.
+
+	* gtk/gtkmodule.c (init_gtk): added gtk.major_version,
+	gtk.minor_version, and gtk.micro_version.  #59830.
+
+2001-11-15  Matt Wilson  <msw@redhat.com>
+
+	* gtk/pygtk.h (init_pygtk): cast void* to _PyGtk_FunctionStruct*
+	when retrieving the API struct, #62872
+
+	* pygobject.h: added PyGFatalExceptionFunc typedef, API wrapper
+	for pyg_fatal_exceptions_{add,remove}.
+
+	* gobjectmodule.c (pyg_boxed_new): return NULL on assertion
+	failures, #62814
+	(pyg_closure_new): actually assign swap_data to the closure.
+	(pyg_fatal_exceptions_notify, pyg_fatal_exceptions_notify_add,
+	pyg_fatal_exceptions_remove): added mechanism for gobjectmodule using
+	modules to get a function called when a fatal exception happens in
+	closures, etc.
+	(pyg_closure_marshal, pyg_signal_class_closure_marshal): return
+	NULL if a gobjectmodule using module registered a fatal exception
+	function.
+
+	* gtk/pygtk-private.h: added declarations for
+	pygtk_custom_destroy_notify, pygtk_tree_selection_marshal,
+	pygtk_tree_foreach_marshal.  Added typedef for
+	PyGtkCustomNotify. #62814
+
+	* gtk/gtkmodule.c (init_gtk): register stock items, #62814.  Set
+	up fatal exception stuff if PYGTK_FATAL_EXCEPTIONS is set.  This
+	isn't 100% done yet, gtk mainloop specific functions still need
+	work.
+
+	* gtk/gtkobject-support.c (pygtk_tree_selection_marshal): added,
+	#62814
+	(pygtk_tree_foreach_marshal): added, #62814
+	(pygtk_custom_destroy_notify): added, #62814
+
+	* gtk/gtk.override (_wrap_gtk_tree_selection_set_select_function):
+	added, #62814
+	(_wrap_gtk_tree_selection_selected_foreach): added, #62814
+	(_wrap_gtk_widget_path): added, #62393
+	(_wrap_gtk_widget_class_path): added, #62393
+
+	* gtk/gtk.defs (GtkWidget.set_size_request): added, #62474
+	(GtkTreeSelection.get_mode): added, #62474
+
+2001-11-13  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs: removed GtkAccelGroup.accel_group_get_default,
+	GtkAccelLabel.get_accel_object, GtkAccelLabel.set_accel_object,
+	item_factory_parse_rc, item_factory_parse_rc_string,
+	GtkWidget.remove_accelerators, GtkWidget.accelerator_signal,
+	GtkWidget.lock_accelerators, GtkWidget.unlock_accelerators,
+	GtkWidget.accelerators_locked to reflect Tim's accelerator API
+	revamp checkin.
+	(GtkTreeDragDest.row_drop_possible): modified arguments to match
+	new API.
+
+2001-11-01  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (GtkSelectionData.tree_set_row_drag_data): renamed
+	GtkSelectionData.data_set_tree_row, #60218
+	(GtkSelectionData.tree_get_row_drag_data): renamed
+	GtkSelectionData.data_get_tree_row, #60218
+	(GtkFontSelection.get_preview_text): constify return arg
+	(GtkFontSelectionDialog.get_preview_text): likewise.
+	(GtkSelectionData.set_text): added len parameter
+
+2001-10-31  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (GtkTreeStore.clear): added
+
+2001-10-29  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs: remove gtk_cell_renderer_toggle_[gs]et_active.
+
+2001-10-26  Matt Wilson  <msw@redhat.com>
+
+	* configure.in (AC_INIT): increase version to 1.99.4
+	(AM_PATH_GLIB_2_0): change minver to 1.3.10
+	(PKG_CHECK_MODULES): change pango requirement to >= 0.21
+	(AM_PATH_GTK_2_0): change minver to 1.3.10
+
+2001-10-25  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (PyGObject_Type): include the module name in the
+	typename.
+	(PyGInterface_Type): same here.
+	(PyGBoxed_Type): same here.
+	(pygobject_register_class): when working out what name to put into
+	the module dictionary, strip off everything before the last dot,
+	so the type name can include the module.
+
+	* configure.in (minver): require python 2.2b1
+
+	* gobjectmodule.c (initgobject): remove statements using
+	tp_defined (they are no longer needed).
+
+2001-10-23  Matt Wilson  <msw@redhat.com>
+
+	* codegen/codegen.py (boxedgetattrtmpl, write_boxed_getattr): at
+	the end of the getattr function, we must use Py_FindMethod.  This
+	fixes GtkSelectionData's methods, and DnD works again.
+
+	* codegen/h2def.py (clean_func): deal with const return types when
+	cleaning up function prototype
+	(proto_pat): add '-' to the ret group so that const- will work in
+	the return type
+
+2001-10-23  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_text_iter_forward_search): use new
+	forward search API with flags enum in CVS.
+	(_wrap_gtk_text_iter_backward_search): likewise.
+	(_wrap_gtk_selection_data_set): use pygdk_atom_from_pyobject.
+	(_wrap_gtk_selection_add_targets): likewise.
+
+	* gtk/pygtk-private.h (pygdk_atom_from_pyobject): added
+	declaration.
+
+	* gtk/gtk.defs (GtkTextIter.forward_search): use new flags enum
+	(GtkTextIter.backward_search): likewise.
+
+	* gtk/gdk.override (_wrap_gdk_gc_new_with_values):
+	s/GPOINTER_TO_INT/GDK_POINTER_TO_ATOM/
+	(_wrap_gdk_property_get): use pygdk_atom_from_pyobject
+	(_wrap_gdk_property_change): likewise.
+
+	* codegen/argtypes.py (AtomArg.write_param): use
+	pygdk_atom_from_pyobject when getting atom args
+
+	* gtk/gtk-types.defs (TextSearchFlags): added new enum.
+
+	* gtk/gtk-types.c (pygdk_atom_from_pyobject): implemented a
+	function to get a GdkAtom from a Python object
+	(PyGdkWindow_PropertyGet): use pygdk_atom_from_pyobject to get
+	atoms from args, not this two-try ParseTuple.
+	(PyGdkWindow_PropertyChange): likewise.
+	(PyGdkWindow_PropertyDelete): likewise.
+
+	* gtk/gdk-types.defs (Selection): removed, no longer an enum
+	(Target): Likewise.
+	(SelectionType): Likewise.
+
+2001-10-22  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk-types.c (pygdk_atom_number): remove numeric bits,
+	GdkAtom is now opaque.
+
+	* gtk/gtk.defs (GtkTreeModelSort.set_model): removed, is static now.
+	(GtkTreeModelSort.convert_path): rename to
+	GtkTreeMOdelSort.convert_path_to_child_path
+
+2001-10-19  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_tree_model_iter_children): override
+	GtkTreeModel.iter_children(parent) to return a new iter, like
+	GtkTreeModel.get_iter_root().
+
+2001-10-18  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.defs (pixbuf_new_from_inline): rename from
+	pixbuf_new_from_stream to match gdk-pixbuf changes in CVS.
+
+	* pygtk.spec.in (%files devel): get header from new location
+
+	* Makefile.am (pkgincludedir): put pygobject.h in
+	$(includedir)/pygtk-2.0, not $(includedir)/pygtk-2.0/pygtk
+
+2001-10-16  Matt Wilson  <msw@redhat.com>
+
+	* codegen/h2def.py (define_func): convert all argument type
+	whitespace to '-'.
+
+2001-10-15  Matt Wilson  <msw@redhat.com>
+
+	* pygtk-2.0.pc.in (pygtkincludedir): move headers to a
+	version-specific directory so we can have old pygtk-devel and
+	pygtk2-devel installed at the same time.
+
+	* Makefile.am (pkgincludedir): likewise
+
+	* gtk/Makefile.am (pkgincludedir): likewise
+
+	* pygtk.spec.in (%files devel): pick up the new header location
+
+2001-10-11  Matt Wilson  <msw@redhat.com>
+
+	* pygtk.spec.in (%files devel): fixed typo in devel filelist
+	(header) added macro that tests to see if we have libglade2
+	(%files libglade) make the filelist a condition of that
+	(Name) changed name to 'pygtk2' to avoid name conflict with pygtk
+
+2001-10-11  Murray Cumming  <murrayc@usa.net>
+
+	* h2def.py: Now it doesn't stop when it finds a function parameter
+	with a type but no name. The resulting define-* will be missing
+	that parameter, but at least the rest will have succeeded.
+
+2001-10-10  Matt Wilson  <msw@redhat.com>
+
+	* gobjectmodule.c (pygobject_dealloc): also go set up the reflist
+	if we're doing refcount debugging.
+
+2001-10-11  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_dealloc): if we are saving a
+	reference to the wrapper during dealloc (which is probably bad),
+	check if it is a heap type, and if so, incref its type, so that
+	subtype_dealloc() doesn't decref the type out from under us.  This
+	problem was tracked down by Matt Wilson
+
+2001-10-09  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-extrafuncs.defs (GenericTreeModel): fix up c-name.
+
+	* examples/pygtk-demo/demos/treemodel.py (MyTreeModel): subclass
+	from gtk.GenericTreeModel.
+
+	* pygtk.spec.in (Requires): add new files to spec file.
+
+2001-10-09  James Henstridge  <james@daa.com.au>
+
+	* pango-types.defs: move types.
+
+	* gtk/Makefile.am: modify rules to take into account splitting out
+	the type definitions.  --register arguments now only parse the
+	type defs and not the function defs, which should speed up the
+	build a bit.
+
+	* gtk/gdk-types.defs: same here.
+
+	* gtk/gtk.defs: and include gtk-types.defs here.
+
+	* gtk/gtk-types.defs: move
+	define-{object,interface,enum,flags,boxed} defs to this file.
+
+	* gtk/gtk-extrafuncs.defs (get_selection): and add it back here.
+
+	* gtk/gtk.defs: remove gtk_list_get_selection function from this
+	file.
+
+	* gtk/gtk-extrafuncs.defs (pygtk_generic_tree_model_new): similar
+	changes here.
+
+	* gtk/pygtktreemodel.c: same changes here.
+
+	* gtk/pygtktreemodel.h (pygtk_generic_tree_model_get_type): rename
+	to PyGtkGenericTreeModel, so that short name doesn't collide with
+	GtkTreeModel.
+
+2001-10-08  Matt Wilson  <msw@redhat.com>
+
+	* pygtk.spec.in: added specfile template
+
+	* configure.in (AC_CONFIG_FILES): add pygtk.spec
+
+	* Makefile.am (dist-hook): copy the spec file into the dist dest
+	dir
+
+	* gtk/gtk.defs (ColorSelectionDialog): added colorsel, ok_button,
+	cancel_button, and help_button fields.
+	(GtkList.get_selection): marked as a PyGTK extension.
+
+2001-10-08  James Henstridge  <james@daa.com.au>
+
+	* pango.defs (pango_font_metrics_new): comment out, as it is only
+	for use by engines.
+
+	* gtk/libglade.override: same here.
+
+	* gtk/gdk.override: same here.
+
+	* gtk/gtk.override: use import section here.
+
+	* pango.override: use the new import stuff to get the reference to
+	the GObject type.
+
+	* codegen/codegen.py (write_source): write out code based on the
+	import statements in the overrides file.  Most modules have some
+	code like this, and this helps reduce the boilerplate code that
+	needs to be entered in.
+
+	* codegen/override.py (Overrides.get_imports): add handlers for
+	"import" sections of the overrides file, which are used to get
+	references to the types in other modules.
+
+2001-10-06  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_list__get_selection): remove unused
+	variable (the line number on the gcc warning matched exactly!)
+
+	* codegen/codegen.py (write_source): reset line numbering after
+	writing headers and init overrides.
+	(main): add --outfilename argument, for specifying the final name
+	of the file -- output is not written to this file.  If argument is
+	not passed, derive from defs filename.
+
+	* codegen/override.py (Overrides.__parse_override): add #line
+	outputs for headers and init type overrides.
+
+	* codegen/codegen.py (main): pass the filename to overrides.
+	(FileOutput): wrapper class for file objects to keep track of line
+	numbers, so that #line statements can be written.
+	(write_class): write out #line statements for overriden
+	constructor and methods.
+	(write_getsets): write #line's for getsets.
+	(write_interface): write #line's for methods.
+	(write_boxed): write #line's for constructor and methods.
+
+	* codegen/override.py (Overrides.__init__): rewrite the code that
+	reads in the overrides file, so it only splits on lines with only
+	'%%' in them.  Also keep track of line numbers, so we know where
+	each section starts.
+	(Overrides.__parse_override): save the start line for 'override'
+	sections and 'override-attr' sections.
+	(Overrides.getstartline): new function to retrieve the start line
+	for a .overrides section.
+	(Overrides.__init__): take the filename rather than file handle as
+	argument.
+
+2001-10-05  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_list__get_selection): implemented
+	function to return the selection.
+	(_wrap_gtk_list_get_selection): use above to implement a method
+	for getting the selection, like old pygtk.
+
+	* gtk/gtk.defs (GtkList.get_selection): added function to be
+	compatible with previous versions.
+	(GtkList): added "selection" field
+
+	* gobjectmodule.c (pyg_closure_new): too many tuples.
+
+2001-10-05  Matt Wilson  <msw@redhat.com>
+
+	* gobjectmodule.c (pygobject_emit): mask out
+	G_SIGNAL_TYPE_STATIC_SCOPE to fix signal emission.
+
+2001-10-05  Johan Dahlin  <zilch.am@home.se>
+
+	* gobjectmodule.c (pyg_closure_new): Handle non-Tuple parameters.
+
+	* gtk/gtk.override (_wrap_gtk_window_list_toplevels): Bound
+	(_wrap_gtk_toolbar_insert_stock): Bound.
+
+	* gtk/gtk.defs (binding_entry_clear): rename from
+	gtk_bindings_entry_clear
+	(color_selection_palette_from_string): rename from
+	gtk_color_selection_palette_from_string
+	(set_border_width): Added
+	(set_resize_mode): Added
+	(get_children): Added
+	(children): Mark as deprecated
+	(get_focus_chain): Added
+	(get_focus_vadjustment): Added
+	(get_focus_hadjustment): Added
+	(gtk_container_add_child_arg_type): Removed
+	(gtk_container_query_child_args): Removed
+	(gtk_containerchild_getv): Removed
+	(gtk_container_child_setv): Removed
+	(gtk_container_add_with_args): Removed
+	(gtk_container_addv): Removed
+	(gtk_container_add_set): Removed
+	(gtk_container_add_get): Removed
+	(GtkContainer.child_set): Added
+	(GtkContainer.child_get): Added
+	(gtk_container_child_args_collect): Removed
+	(gtk_container_child_arg_get_info): Removed
+	(GtkDrawingArea.size): Mark as deprecated
+	(GtkEditable.get_editable): Added
+	(GtkEntry.new_with_max_length): Mark as deprecated
+	(GtkEntry.get_visibility): Added
+	(GtkEntry.get_invisible_char): Added
+	(GtkEntry.get_max_length): Added
+	(GtkFontSelection.get_font): Mark as deprecated
+	(GtkFontSelectionDialog.get_font): Mark as deprecated
+	(GtkFrame.get_label_widget): Added
+	(GtkFrame.get_label_align): Added
+	(GtkFrame.get_shadow_type): Added
+	(GtkGC.gc_get): Added
+	(gtk.gc_release): Rename from gtk_gc_release
+	(GtkHandleBox.get_shadow_type): Added
+	(GtkHandleBox.get_handle_position): Added
+	(GtkHandleBox.get_snap_edge): Added
+	(GtkHscale.new_with_range): Added
+	(GtkLayout.freeze): Mark as deprecated
+	(GtkLayout.thaw): Mark as deprecated
+	(GtkListStore.new): Fix parameters
+	(GtkListStore.newv): Added (needed?)
+	(GtkListStore.set): Added
+	(GtkListStore.clear): Added
+	(gtk_init_abi_check): Remove
+	(gtk_init_check_abi_check): Remove
+	(gtk_exit): Remove
+	(gtk.get_current_event_state): Added
+	(GtkMenu.get_tearoff_state): Added
+	(GtkMenu.get_title): Added
+	(gtk_rc_*): Rename to rc_*
+	(GtkToolbar.insert_stock): Added
+	(GtkToolbar.set_icon_size): Added
+	(GtkToolbar.unset_style): Added
+	(GtkToolbar.unset_icon_size): Added
+	(GtkToolbar.get_orientation): Added
+	(GtkToolbar.get_style): Added
+	(GtkToolbar.get_icon_size): Added
+	(GtkToolbar.get_tooltips): Added
+	(gtk_type_unique): Remove
+	(gtk_type_class): Remove
+	(gtk_type_new): Remove
+	(gtk_enum_get_values): Remove
+	(gtk_flags_get_values): Remove
+	(gtk_enum_find_value): Remove
+	(gtk_flags_find_value): Remove
+	(GtkViewport.get_shadow_type): Added
+	(GtkVscale.new_with_range): Added
+
+2001-10-05  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): fixed
+	argument format string.
+
+2001-10-03  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.defs (Rectangle): added definition for GdkRectangle
+
+2001-10-04  Matthew Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_toolbar_append_item): make user_data
+	optional
+
+	* gtk/gtk.defs (GtkToolbar.append_item): make user_data optional
+
+2001-10-04  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_item_factory_create_items): fixed
+	non-compiling function.
+
+2001-10-04  Johan Dahlin  <zilch.am@home.se>
+
+	* gtk/gtk.override (_wrap_gtk_item_factory_create_items): Modify
+	ParseTuple to accept 6 argument, so we can use stock icons and gdkpixbufs.
+	(_wrap_gtk_spin_button_get_range): Bound.
+	(_wrap_gtk_spin_button_get_increments): Bound.
+
+	* gtk/gtk.defs: rename gtk.gtk_* gtk.*.
+
+2001-10-04  James Henstridge  <james@daa.com.au>
+
+	* pygtk.spec: spec file changes.
+
+	* gtk/gtk.defs (AccelGroup): this is an object now -- not a boxed.
+
+2001-10-03  Matt Wilson  <msw@redhat.com>
+
+	* gobjectmodule.c (pygobject_repr): tweak the repr such that
+	calling it on an uninitialized PyGObject won't segfault.  Also
+	print the python class name.
+
+2001-10-02  Johan Dahlin  <zilch.am@home.se>
+
+	* gtk/gdk.override (_wrap_gdk_color_parse): Added.
+
+	* gtk/gtk.override (_wrap_gtk_label_get_selection_bounds):
+	(_wrap_gtk_label_get_layout_offsets):
+	(_wrap_gtk_button_box_get_child_size):
+	(_wrap_gtk_button_box_get_child_ipadding): Added.
+
+	* gtk/gtk.defs
+	GtkAccelGroup.activate, attach, detach, groups_activate, add,
+	remove:
+	s/GtkObject/GObject/
+	(gtk_adjustment_new) (GtkAdjustment.clamp_page): s/gfloat/gdouble/
+	(GtkAdjustment.get_value): Added
+	(GtkBin.get_child): Added
+	(GtkBox.get_homogeneous): Added
+	(GtkCellRenderer.event): Removed
+	(GtkCellRenderer.activate): Added
+	(GtkCellRenderer.start_editing): Added
+	(GtkCellRenderer.set_fixed_size): Added
+	(GtkCellRenderer.get_fixed_size): Added
+	(GtkCheckMenuItem.get_activate): Added
+	(gtk_color_selection_get_type): Added
+	(gtk_color_selection_new): Added
+	Removed old functions from gtkbindings.h.
+
+2001-10-02  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.defs (gdk.screen_width): bound
+	(gdk.screen_height): bound
+	(gdk.screen_width_mm): bound
+	(gdk.screen_height_mm): bound
+	(gdk.flush): bound
+	(gdk.beep): bound
+	(gdk.set_double_click_time): bound
+	(gdk.gdk_window_get_toplevels): renamed to window_get_toplevels
+	(gdk.get_default_root_window): bound
+	(gdk.gdk_color_parse): renamed to color_parse
+	(gdk.gdk_drag_context_get_type): renamed to drag_context_get_type
+	(gdk.gdk_drag_context_new): renamed to drag_context_new
+	(gdk.gdk_gc_new): renamed to gc_new
+	(gdk.gdk_image_new_bitmap): renamed to image_new_bitmap
+	(gdk.gdk_device_get_type): renamed to device_get_type
+	(gdk.gdk_devices_list): renamed to devices_list
+	(gdk.device_free_history): renamed to device_free_history
+	(gdk.gdk_rgb_xpixel_from_rgb): renamed to rgb_xpixel_from_rgb
+	(gdk.gdk_rgb_gc_set_foreground): renamed to rgb_gc_set_foreground
+	(gdk.rgb_gc_set_background): renamed to rgb_gc_set_background
+
+	* gobjectmodule.c (pygobject_dealloc): remove debugging message
+	James checked in.
+
+	* gtk/gtk.override (_wrap_gtk_text_buffer_set_text): override
+	GtkBuffer.set_text so that you don't have to pass in the length.
+
+	* codegen/argtypes.py (FlagsArg.write_param): preserve flags that
+	have a default value by short circuiting the conversion of NULL
+	Python flags to 0.
+
+	* gobjectmodule.c (pyg_object_new): rewrote function to use
+	g_object_newv and instantiate the object after we check to make
+	sure the class handles all the properties passed.  This solves the
+	problem of trying to destroy a GtkObject after creating it, which
+	can be a little tricky.
+
+2001-10-02  Matt Wilson  <msw@redhat.com>
+
+	* gobjectmodule.c (pyg_object_new): added a new gobject.new
+	function to create an object of any registered type with kwargs
+	property setting.
+
+2001-10-02  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_new): fix bug where we were INCREFing
+	the saved widget even in the hasref case (where we should be
+	passing ownership of the last reference).
+
+2001-10-02  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_clist_new_with_titles): accept unicode
+	objects as well.
+	(_wrap_gtk_clist_prepend): likewise
+	(_wrap_gtk_clist_append): likewise
+	(_wrap_gtk_clist_insert): likewise
+	(_wrap_gtk_combo_set_popdown_strings): likewise
+	(_wrap_gtk_ctree_new_with_titles): likewise
+	(_wrap_gtk_ctree_insert_node): likewise
+
+2001-10-02  Johan Dahlin  <zilch.am@home.se>
+
+	* gtk/gtk.defs: Added
+	GtkAccelLabel: get_accel_object, set_accel_object.
+	GtkButton: set_label, get_label, set_use_underline,
+	           get_use_underline, set_use_stock, get_use_stock.
+	GtkLabel: get_attributes, set_label, get_label, set_use_markup,
+	          get_use_markup, set_use_underline, get_use_underline,
+	          get_justify
+	GtkRadioButton: get_group
+	GtkSpinButton: get_digits, get_increments, get_range,
+	               get_update_policy, get_numeric, get_wrap,
+	               get_snap_to_tickets, get_mode
+
+2001-10-01  Matt Wilson  <msw@redhat.com>
+
+	* codegen/codegen.py (write_boxed_getattr): added code to write
+	out __members__ attribute so that dir(foo) works on boxed types
+
+2001-10-01  Matthew Wilson  <msw@redhat.com>
+
+	* examples/pygtk-demo/demos/treemodel.py
+	(MyTreeModel.on_get_column_type): use gobject.TYPE_STRING instead
+	of hard coded values
+
+2001-09-30  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_dealloc): use plain old
+	PyObject_GC_Del, as the overridden tp_free seems to ignore the GC
+	header.
+	(pygobject_new): GC track wrappers created through pygobject_new.
+
+	* configure.in: increment version number, and require gtk 1.3.9
+	(we already required it before).
+
+	* gobjectmodule.c (pygobject_new): initialise extra members.
+	Problem found by msw.
+
+2001-09-29  Matthew Wilson  <msw@redhat.com>
+
+	* examples/pygtk-demo/demos/dnd.py: port to new namespace
+
+2001-09-29  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_param_spec_new): add a wrapper for a
+	GParamSpec.  Currently it only exposes the base parameter info;
+	none of the extra info provided by derived param specs.
+	(pyg_object_class_list_properties): return a list of GParamSpec
+	objects, rather than just strings.
+	(pyg_value_as_pyobject): catch NULL strings.
+
+	* configure.in (minver): require 2.2a4.
+
+	* gtk/pygtktreemodel.c (pygtk_tree_model_get_column_type): use
+	pyg_type_from_object instead.  Based on patch from Elliot.
+
+	* gtk/gtk.override (_wrap_gtk_selection_data__get_data): convert
+	getter to a function to match codegen changes.
+
+	* : merge in python22-branch (see changelog entries below).
+
+2001-09-25  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_get_dict): getter for __dict__ on
+	GObject wrappers.
+	(PyGObject_Type): include getsets list.
+
+	* codegen/codegen.py (write_getsets): change "struct getsets" to
+	PyGetSetDef to match recent changes in python.
+
+	* gtk/gdk.override (_wrap_gdk_device__get_axes): change to getter.
+	(_wrap_gdk_device__get_keys): turn into a getter.
+	(_wrap_gdk_drag_context__get_targets): same here.
+
+	* gtk/gtk.override (_wrap_gtk_clist__get_selection): turn into a
+	getter.
+	(_wrap_gtk_ctree__get_selection): turn into a getter.
+
+	* codegen/codegen.py (write_getsets): rename to write_getsets, and
+	don't allow overriding the whole routine, as it is implemented as
+	a number of smaller routines now.
+	(gettertmpl): rename from getattrtmpl.  Refactor for handling
+	single attribute.
+	(write_getsets): finish conversion over to using getsets.
+	(write_class): call write_getsets instead.
+	(typetmpl): substitute %(getsets)s rather than %(getattr)s.
+
+2001-09-23  James Henstridge  <james@daa.com.au>
+
+	* gtk/__init__.py: don't import ExtensionClass.
+
+	* gobjectmodule.c (object_gc_free): new function to free an GC
+	managed object.
+	(PyGObject_Type): use object_gc_free for the tp_free slot.
+
+	* codegen/codegen.py (write_class): don't write getattr routine.
+	This is a temporary hack to see if things work.
+
+	* gobjectmodule.c (pygobject_dealloc): handle case of destruction
+	when self->obj == NULL.
+
+	* gtk/gtk.override (_wrap_gtk_clist_new_with_titles): return an
+	int.
+	(_wrap_gtk_tree_view_get_path_at_pos): same here.
+	(_wrap_gtk_button_new): same here.
+	(_wrap_gtk_toggle_button_new): same here.
+	(_wrap_gtk_check_button_new): same here.
+	(_wrap_gtk_radio_button_new): same here.
+	(_wrap_gtk_list_item_new): same here.
+	(_wrap_gtk_menu_item_new): same here.
+	(_wrap_gtk_check_menu_item_new): same here.
+	(_wrap_gtk_radio_menu_item_new): same here.
+	(_wrap_gtk_ctree_new_with_titles): same here.
+	(_wrap_gtk_dialog_new_with_buttons): same here.
+	(_wrap_gtk_message_dialog_new): same here.
+	(_wrap_gtk_message_dialog_new): same here.
+
+	* gtk/gdk.override (_wrap_gdk_cursor_new): return an int.
+
+	* pango.override (_wrap_pango_font_description_new): constructors
+	return ints.
+
+	* codegen/codegen.py (write_constructor): small hack to convert
+	"return NULL;" to "return -1;" in constructors, as they should
+	return ints.
+	(write_boxed_constructor): same here.
+
+2001-09-22  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtk.h: remove traces of ExtensionClass.
+
+	* gtk/libglade.override: s/PyExtensionClass/PyTypeObject/.
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): get rid of
+	mentions of ExtensionClass.
+
+	* gtk/gdk.override: s/PyExtensionClass/PyTypeObject/.
+
+	* gtk/gtk.override: s/PyExtensionClass/PyTypeObject/.
+
+	* gobjectmodule.c (pygobject_traverse): implement a traverse
+	function for PyGObject.
+	(PyGObject_Type): add GC support.
+	(object_free): use PyObject_GC_Del to delete the memory.
+	(pygobject_dealloc): stop GC tracking the object here.
+	(pygobject_register_class): set a few more type fields here.
+	(pygobject_new): use PyObject_GC_New to allocate the object here.
+	(pygobject_dealloc): readd the 1-1 object/wrapper hack.  It should
+	work as expected since adding GC support.
+
+	* pango.override: s/PyExtensionClass/PyTypeObject/
+
+	* codegen/codegen.py (consttmpl): constructor template returns an
+	int.
+	(noconstructor): return int rather than PyObject.
+	(typetmpl): change def to be a PyTypeObject, with extra fields.
+	(interfacetypetmpl): same here.
+	(boxedconsttmpl): return int rather than pyobject.
+	(boxedtmpl): change def to PyTypeObject.
+	(write_class): put the constructor in the right place.
+	(write_boxed): put the constructor in the right place.
+	(write_source): don't include ExtensionClass.h, forward declare
+	type objects as PyTypeObjects, rather than PyExtensionClasses.
+
+	* gobjectmodule.c (pygobject_register_class): set type->ob_type.
+	(pyg_register_boxed): same here.
+	(pyg_register_interface): same here.
+	(initgobject): set the ob_type member of PyGInterface_Type and
+	PyGBoxed_Type.
+	(pygobject__gobject_init__): add __gobject_init__ method, that
+	just calls pygobject_init.
+	(pygobject_methods): readd __gobject_init__ method.
+
+2001-09-21  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_register_class): convert to use
+	PyTypeObjects instead of ExtensionClass.
+	(pygobject_new): don't need to set inst_dict.  Python takes care
+	of that for us.
+	(pyg_register_boxed): convert to 2.2.
+	(pyg_boxed_new): convert to 2.2.
+	(pyg_value_from_pyobject): get rid of ExtensionClass calls.
+	(pygobject_init): convert to 2.2.
+
+	* pygobject.h: don't include ExtensionClass.h
+
+	* configure.in (AM_PATH_PYTHON): require python 2.2.
+
+	* Makefile.am: remove ExtensionClass.
+
+2001-09-28  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (gtk_progress_bar_new_with_adjustment): mark as
+	constructor
+
+	* gtk/gtk.override (_wrap_gtk_progress_bar_new_with_adjustment):
+	override constructor for ProgressBar to optionally take adjustment
+
+2001-09-27  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (GtkTreeView.set_cursor): added new parameters.
+
+	* gtk/pygtk-private.h: removed old PyGtkCTreeNode code, move to
+	generic generated code.
+
+	* gtk/gtkmodule.c (_PyGtk_FunctionStruct): likewise
+
+	* gtk/pygtk.h: likewise.
+
+	* gtk/gtk-types.c: likewise.
+
+	* gtk/gtk.override (_wrap_gtk_tree_store_get_root_iter): moved to
+	gtk_tree_model_get_iter_root.
+	(_wrap_gtk_ctree_node_from_cobject): removed
+	(_wrap_gtk_ctree_node_getattr): moved gtk-types.c getattr code to
+	generic boxed interface and placed here.
+	(_wrap_gtk_ctree_*): migrated to generic PyGBoxed for GtkCTreeNodes
+
+2001-09-26  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtkmodule.c (_PyGtk_FunctionStruct): removed PyGtkCTreeNode
+	functions
+
+	* codegen/argtypes.py: remove GtkCTreeNode custom registration
+
+	* gtk/gtk.defs (GtkContainer.queue_resize): remove, use
+	gtk_widget_queue_resize instead of gtk_container_queue_resize
+	(GtkContainer.child_composite_name): remove, this is private
+	(GtkContainer.clear_resize_widgets): likewise
+	(GtkTreeViewColumn.set_cell_renderer): remove, use
+	GtkTreeViewColumn.pack_start instead
+	(CTreeNode): added CTreeNode boxed definition
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_column_new): changed from
+	gtk_tree_view_column_set_renderer to gtk_tree_view_column_pack_start.
+
+2001-09-25  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (get_has_resize_grip): bound
+	(set_has_resize_grip): bound
+
+2001-09-24  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_render_pixmap_and_mask):
+	implemented GdkPixbuf.render_pixmap_and_mask.
+
+	* gtk/gdk.defs (GdkPixbuf.render_pixmap_and_mask): set
+	alpha_threshold default to 127
+
+	* gtk/gtk.override (ignore): added gtk_entry_new to the big list
+	of ignores.
+
+	* gtk/gtk.defs (gtk_entry_new_with_max_length): bound
+	(GtkCList.set_pixmap): default mask to NULL
+
+2001-09-24  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (gtk_adjustment_new): added defaults to match
+	previous version, changed step_increment to step_incr and
+	page_increment to page_incr to match previous version.
+	(gtk_table_new): added defaults to match previous version.
+
+2001-09-22  Matthew Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (ctree_node_from_cobject): added binding.
+
+	* gtk/gtk.override (_wrap_gtk_ctree_node_from_cobject): added a
+	function to turn a PyCObject into a PyCListNodeObject object.
+	This is a hack until GtkCTreeNode becomes a boxed type.
+
+2001-09-21  Matthew Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_ctree_new_with_titles): use the same
+	defaults as previous versions, make count and tree_column optional
+	(_wrap_gtk_clist_new_with_titles): likewise
+
+2001-09-21  Matt Wilson  <msw@redhat.com>
+
+	* codegen/argtypes.py (BoxedArg.write_return): handle returning
+	both a pointer to a boxed type and a boxed type itself
+	(ArgMatcher.register_boxed): register both pointers to boxed types
+	and boxed types themselves
+
+	* gtk/gtk.defs (Style): add "black" and "white" fields.  More to
+	do here later.
+
+	* gtk/gtk.override (_wrap_gtk_radio_button_new): use
+	new_from_widget, not the group->group member when creating a new
+	button in a group.
+
+2001-09-20  James Henstridge  <james@daa.com.au>
+
+	* pango.defs (FontMetrics): uncomment this now it has a boxed type.
+
+	* gtk/Makefile.am (EXTRA_DIST): add gdk.override to dist.
+
+	* configure.in: update version number.
+
+	* pygobject.h (_PyGObject_Functions.newgobj): rename from new, so
+	that the header is includable in C++ programs.
+
+2001-09-19  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (gtk_message_dialog_new): define defaults
+
+	* gtk/gtk.override (_wrap_gtk_message_dialog_new): override this
+	function so we can use "%s" as the format string and pass the
+	entire last argument as a string securely.
+
+2001-09-19  James Henstridge  <james@daa.com.au>
+
+	* pango.defs: update for newer Pango API.
+
+2001-09-19  James Henstridge  <james@daa.com.au>
+
+	* pango.defs (FontDescription): remove fields from
+	PangoFontDescription, as it is an opaque type now.
+
+	* configure.in (ACLOCAL): require glib 1.3.8, pango 0.19 and gtk+
+	1.3.8.
+
+2001-09-18  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): add a cast
+	in pointer comparison to squelch compiler warning.
+
+2001-09-18  Matt Wilson  <msw@redhat.com>
+
+	* gtk/gtk.defs (gtk_dialog_new_with_buttons): note the defaults in
+	the definition.
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): implement
+	a full-featured constructor for GtkDialog that will allow flags
+	(as well as other parameters) to be passed in during object
+	construction.  The form is a bit different than the C version,
+	which uses varargs.  To pass a list of buttons at construction
+	time, pass a tuple of text/id pairs as the 4th argument or in the
+	buttons keyword.
+
+	* gtk/gtk.defs (CTree): add selection to the fields
+	(GtkCTree::insert_node): note the defaults in the definition.
+	(GtkCTree::base_nodes): added base_nodes method back into GtkCTree
+
+	* gtk/gtk.override (_wrap_gtk_ctree_insert_node): only require the
+	first three parameters and use the defaults from previous versions
+	for all the other values.
+	(override-attr GtkCTree.selection): implementation for getting the
+	selection of a CTree
+	(_wrap_gtk_ctree_base_nodes): ported old base_nodes method to new
+	binding.
+
+	* gtk/gtk.defs (CList): add columns and selection to the fields
+
+	* gtk/gtk.override (GtkCList.selection): implementation for
+	getting the selection of a CList
+
+2001-09-18  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_object_class_list_properties): rename to
+	gobject.list_properties.
+
+2001-09-18  Matt Wilson  <msw@redhat.com>
+
+	* examples/pygtk-demo/demos/treemodel.py: fixed to work with new
+	namespace
+
+	* gtk/gdk.defs (pixbuf_new_from_file): don't defined
+	gdk_pixbuf_new_from_file as a constructor of GdkPixbuf.  Define it
+	as pixbuf_new_from_file to match pixbuf_new_from_stream.
+
+	* gtk/gtk.defs (gtk_aspect_frame_new): add defaults to match old
+	behavior
+	(gtk_alignment_new): likewise
+	(GtkCTree::construct): likewise
+	(gtk_clist_new): likewise
+	(gtk_clist_new_with_titles): likewise
+	(gtk_ctree_new): likewise
+	(gtk_ctree_new_with_titles): likewise
+	(GtkImage::construct): use gtk_image_new to construct GtkImages -
+	this allows us to use more than just pixmaps to create them.
+	(gtk_image_new): new definition.
+
+2001-09-18  James Henstridge  <james@daa.com.au>
+
+	* pygobject.h (pyg_type_wrapper_new): export this function.
+
+	* codegen/argtypes.py (GTypeArg.write_return): wrap GType return
+	values as PyGTypeWrappers rather than ints.
+
+	* codegen/codegen.py (write_source): pass the typecode macros to
+	pygobject_register_class and pyg_register_interface rather than
+	references to the get_type functions.
+
+	* pygobject.h (_PyGObject_Functions): fix up prototypes.
+
+	* gobjectmodule.c (check_bases): check if the base class is an
+	extensionclass before poking around in class->bases.
+	(pyg_type_*): don't bother storing the _get_type() function for
+	lazy initialisation.  Instead, just store the GType.  Also, remove
+	code for coercing them into numbers.
+	(pygobject_register_class): take the type, rather that get_type
+	routine as an argument.
+	(pyg_register_interface): same here.
+	(pyg_type_from_object): don't accept types that convert to ints as
+	being equivalent to GTypes.
+	(pyg_register_boxed): set the __gtype__ attribute to a
+	PyGTypeWrapper.
+	(pyg_type_register): set __gtype__ to a PyGTypeWrapper.
+	(pyg_type_name): use pyg_type_from_name
+	(pyg_type_from_name): return a PyGTypeWrapper object.
+	(pyg_type_parent): update.
+	(pyg_type_is_a): update.
+	(pyg_type_children): update.
+	(pyg_type_interfaces): update.
+	(initgobject): set __gtype__ attributes to PyGTypeWrapper objects.
+	(initgobject): make type constants PyGTypeWrapper objects.
+
+2001-09-17  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override: don't #define these types to G_TYPE_INVALID,
+	as they are now valid.
+
+	* gtk/gdk.defs: remove the FrameAction enum -- it is private to
+	the GIF loader module.
+
+2001-09-16  James Henstridge  <james@daa.com.au>
+
+	* gtk/Makefile.am (pygtk_PYTHON): install keysyms.py and not GDK.py
+
+	* gtk/__init__.py: import keysyms, rather than GDK.py
+
+	* gtk/gtk.defs: add missing enums.
+
+	* gtk/gdk.defs: add missing enums.
+
+	* gtk/GDK.py: remove this file.
+
+	* gtk/keysyms.py: put all keysyms here.
+
+2001-09-15  James Henstridge  <james@daa.com.au>
+
+	* gtk/libglademodule.c (initglade): fix name of init function.
+
+	* codegen/codegen.py (write_enums): don't write out the
+	add_constants fucntion if there are no enums/flags.
+
+	* gtk/libglade.override (connect_many): fix small bug in
+	connection function.
+
+	* gtk/Makefile.am (pygtk_PYTHON): don't install the GTK.py header.
+	(glademodule_la_SOURCES): rename the libglade module to gtk.glade.
+
+	* pygtk.spec: update spec file, and add -devel sub package.
+
+	* configure.in: use AC_HELP_STRING to format help strings, update
+	version number.
+
+	* acinclude.m4: remove the AM_PATH_PYTHON macro, as it is in
+	automake 1.5.
+
+	* Makefile.am: require automake 1.5 to build.
+
+2001-09-15  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_enum_add_constants): allow '_' as start of
+	constant name.
+	(pyg_flags_add_constants): same here.
+
+	* gtk/__init__.py (TRUE): don't import GTK.
+
+	* gtk/gtkmodule.c (init_gtk): same here.
+
+	* pangomodule.c (initpango): add constants to the pango module.
+
+	* codegen/codegen.py (write_enums): new function that writes a
+	function to add constants for all the enums and flags in the
+	parser.
+	(write_source): call write_enums().
+
+	* gtk/gtkmodule.c (init_gtk): add test use of add_constants.
+
+	* pygobject.h (_PyGObject_Functions): add new functions to header.
+
+	* gobjectmodule.c (pyg_enum_add_constants): new function for
+	adding constants to a module dictionary from a particular GType.
+	(pyg_flags_add_constants): similar for flag types.
+	(functions): add to export function vtable.
+
+2001-09-14  James Henstridge  <james@daa.com.au>
+
+	* pygtk-2.0.pc.in (defsdir): fix up defsdir definition.
+
+	* Makefile.am (pkginclude_HEADERS): install ExtensionClass.h
+	header (this can go when we switch over to python2.2 type/class
+	stuff.
+
+	* pygobject.h (pyg_register_boxed_custom): same change.
+
+	* gobjectmodule.c (pyg_register_boxed_custom): rename from
+	pyg_boxed_register to avoid confusion.
+
+2001-09-14  James Henstridge  <james@daa.com.au>
+
+	merge from short-class-names-branch
+
+2001-09-12  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (write_class, write_interface): set the short
+	name as the class name here.
+
+	* gobjectmodule.c (pygobject_register_class): pass ec->tp_name as
+	the name for the class passed to PyExtensionClass_Export*.
+
+	* codegen/codegen.py (write_source): pass the C name to
+	pygobject_register_class again.
+
+2001-09-11  James Henstridge  <james@daa.com.au>
+
+	* gtk/__init__.py (create_pixmap): few fixups to get things to
+	import correctly.
+
+	* gtk/gtkmodule.c (init_gtk): there is no _pygdk_register_boxed().
+
+	* gtk/libglade.override (init): same here.
+
+	* gtk/gtk.override (init): same here.
+
+	* gtk/gdk.override (init): use short class names here.
+
+	* gtk/gtkmodule.c (init_gtk): initialise both the gtk._gtk and
+	gtk.gdk modules.
+
+	* gtk/gtk.defs: don't include gdk.defs
+
+	* gtk/gtk.override: remove all GDK override wrappers.
+
+	* gtk/gdk.override: new file taking the overrides for GDK
+	functions.
+
+	* codegen/codegen.py (write_source): register only the short name
+	of the GObject, interface or boxed type.
+
+2001-09-13  Johan Dahlin  <zilch.am@home.se>
+
+	* gtk/gtk.defs (CellRendererTextPixbuf): removed.
+	(gtk_cell_renderer_text_pixbuf_get_type): removed.
+	(gtk_cell_renderer_text_pixbuf_new): removed.
+	(gtk_cell_renderer_text_iter_spew): removed.
+	(row_changed): Renamed.
+	(row_inserted): Renamed.
+	(row_has_child_toggled): Renamed.
+	(row_deleted): Renamed.
+	(rows_reordered): Renamed, and fixed.
+	(set_fixed_width): Renamed.
+	(get_fixed_width): Added.
+
+	* gobjectmodule.c (initgobject): Adjust
+	g_boxed_type_register_static to compile under latest cvs.
+
+2001-09-10  Johan Dahlin  <zilch.am@home.se>
+
+	* autogen.sh: add check and usage for AUTOMAKE and ACLOCAL.
+
+2001-09-06  James Henstridge  <james@daa.com.au>
+
+	* gtk/GTK.py: fix up enums.
+
+	* gobjectmodule.c (pyg_closure_marshal): if return_value is NULL,
+	don't set it.
+	(pyg_signal_class_closure_marshal): same here.
+
+	* gtk/gtk.defs: various updates to make it compile.
+
+	* gtk/gtk-types.c (pygdk_atom_str): fallback to returning the repr
+	of the atom if we can't resolve its name, rather than returning
+	NULL.  Patch from Skip.
+
+	* gobjectmodule.c (pyg_value_from_pyobject): look at the
+	fundamental type in this function so we can use a switch statement
+	that catches the fundamental types easily, reducing the number of
+	type checks.
+	(pyg_value_as_pyobject): similar here.  Also handle boolean types
+	using patch from Skip.
+
+	* gtk/GDK.py: add extra constants from Skip.
+
+2001-08-23  James Henstridge  <james@daa.com.au>
+
+	* configure.in (build_libglade): add forth argument to
+	PKG_CHECK_MODULES call so that configure doesn't die a horrible
+	death when it can't find libglade.
+
+2001-08-22  James Henstridge  <james@daa.com.au>
+
+	* gtk/libglade.override: add signal connection function overrieds.
+
+	* pygtk-2.0.pc.in: add a pkg-config data file that contains some
+	information about how to link other wrapper modules, and where
+	pygtk installs its defs files.
+
+2001-08-21  James Henstridge  <james@daa.com.au>
+
+	* configure.in (build_libglade): add checks for libglade.
+
+	* gtk/libglade*: add the libglade module to the build
+
+	* configure.in: update for autoconf 2.52
+
+	* gtk/gtk.defs: make GtkAccelGroup a GObject rather than a boxed
+	type.  remove the gtk_tree_model_get_first function.
+
+2001-07-09  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (initgobject): add a gobject.TYPE_PYOBJECT
+	constant for the PyObject boxed typecode.
+
+2001-07-08  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_signal_new): fix argument type for
+	return_type.
+	(initgobject): register a "PyObject" boxed type with glib..
+	(pyg_value_from_pyobject): if the value holds a PY_TYPE_OBJECT,
+	set the value directly.
+	(pyg_value_as_pyobject): special case the PY_TYPE_OBJECT case
+	again.
+
+	* gtk/gdk.defs, gtk/gtk-extrafuncs.defs, gtk/gtk.defs: update to
+	new format.
+
+	* pango.defs: update to new format.
+
+	* codegen/codegen.py: various fixes to make it work with the new
+	defs format.
+
+	* codegen/argtypes.py (ObjectArg.__init__): take the typecode as
+	an argument, and use it to deduce the cast macro (s/_TYPE_/_/).
+	(BoxedArg.__init__): take typecode as argument explicitly.
+	(EnumArg.__init__): take typecode as argument explicitly.
+	(FlagsArg.__init__): take typecode as argument explicitly.
+	(ArgMatcher.register_enum): pass typecode argument.
+	(ArgMatcher.register_flag): same here.
+	(ArgMatcher.register_object): same here.
+	(ArgMatcher.register_boxed): same here.
+
+	* codegen/definitions.py (ObjectDef): update parser for new format.
+	(InterfaceDef): same here.
+	(EnumDef): same here.
+	(BoxedDef): same here.
+	(MethodDef): same here.
+	(FunctionDef): same here.
+
+	* codegen/defsparser.py (DefsParser): add define- prefix to the
+	defs we look for.
+
+	* codegen/defsconvert.py (convert): new program to convert v2 defs
+	to v3 defs.  It will probably only work with files in the style
+	created by the h2def.py program.
+
+2001-07-07  James Henstridge  <james@daa.com.au>
+
+	* codegen/h2def.py (to_upper_str): add function to convert a type
+	name to upper case with underscores using the same algorithm as
+	gtk+ (with an extra rule to catch cases like GObject.
+	(typecode): function to create a typecode like GTK_TYPE_WIDGET
+	from the type name.
+	(write_obj_defs): output v3 defs.
+	(write_enum_defs): output v3 defs.
+	(define_func): replace 'G_CONST_RETURN ' to 'const-' for return
+	value.
+	(write_func): output v3 defs.
+
+	* codegen/scmexpr.py (parse): make the parser ignore single
+	quotes, which are used in the new defs format.
+
+2001-07-03  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_list_store_new): fix up function
+	call.
+	(_wrap_gtk_tree_store_new): fix up function call.
+
+	* configure.in (AC_OUTPUT): add pygtk-codegen-2.0 to list of files
+	to be processed.
+
+	* codegen/codegen.py (register_types): fix typo s/parser/defsparser/
+
+	* gtk/Makefile.am ($(srcdir)/gtk.c): register types from
+	pango.defs.
+
+	* gtk/gtk.override (init): import the PangoContext and PangoLayout
+	classes from the pango module.
+
+2001-07-02  James Henstridge  <james@daa.com.au>
+
+	* pango.defs: add is-constructor-of arguments to some defs, and
+	add fields to some object and boxed defs.
+
+	* pango.override: add more overrides.
+
+	* pango.defs: add more boxed type defs.
+
+	* gtk/gtk.defs (dequeue_resize_handler): remove removed function.
+
+	* codegen/override.py (Overrides.__parse_override): fix bug here.
+	string.find returns negative value on error -- not zero.
+
+	* codegen/argtypes.py (GTypeArg.write_param): fix up arg handler.
+
+	* Makefile.am (pangomodule_la_SOURCES): fix up makefile rules to
+	build the pango module.
+
+	* pango.override: changes so that it builds properly.
+
+	* configure.in: add line to check for pango and set PANGO_CFLAGS
+	and PANGO_LIBS.
+
+	* Makefile.am (pangomodule_la_SOURCES): add rules to build pango
+	module.
+
+	* pango.defs:
+	* pango.override:
+	* pangomodule.c: new files for the pango wrapper module.
+
+2001-07-01  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_signal_list_names): function to list the
+	signals of an object type.  From patch by Skip Montanaro
+	(pyg_object_class_list_properties): function to list the
+	properties of a GObject.  Also from Skip.
+
+	* gtk/gtk.override (_wrap_gtk_list_store_new): fix to use
+	gtk_list_store_newv.
+	(_wrap_gtk_tree_store_new): similar fix here.
+
+2001-06-30  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c: remove GdkDevice stuff from this file.
+
+	* gtk/gtk.override: add attribute getters for some GdkDevice
+	attributes, and overrides for some GdkDevice methods.
+	(_wrap_gdk_event_getattr): change stuff for GdkDevices, as they
+	are now GObjects.
+
+	* gtk/gdk.defs (Device): add device boxed type here.
+
+	* gtk/gtk.override (_wrap_gtk_selection_add_targets): fix up to
+	use PyGBoxed version of GdkEvent.
+
+	* gtk/gtk-types.c: remove GdkEvent stuff from here.  Also delete
+	the commented out GdkDragContext code, as the current GObject
+	implementation has the same features now.
+
+	* gtk/gtk.override (_wrap_gdk_event_getattr): implement the
+	getattr method for GdkEvents.
+
+	* gtk/gdk.defs (Event): add boxed type here.
+
+	* gobjectmodule.c (initgobject): remove g_type_init() argument.
+
+	* gtk/gdk.defs (Visual): make GdkVisual a boxed.
+
+	* gtk/gtk.override (GdkDragContext.targets): override getter for
+	this attribute.
+	(_wrap_gtk_list_store_new): comment out most of this function as
+	there is no way to construct a GtkListStore without C varargs as
+	of the last GtkTree related commit.
+
+	* gtk/gtk-types.c: remove uses of GtkSelectionData.
+
+	* gtk/gtk.override (GtkSelectionData.data): override the data
+	attribute for GtkSelectionData types.
+	(_wrap_gtk_selection_data_set): override method.
+
+	* gtk/gtk.defs (SelectionData): add GtkSelectionData boxed type
+	here.
+
+2001-06-29  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (write_getattr): add code to allow overriding
+	the getter for a single attribute.
+	(write_boxed_getattr): same here.
+
+	* codegen/override.py (Overrides): add code to handle
+	"override_attr" statements in an overrides file.
+
+	* codegen/codegen.py (write_getattr): add support for overriding
+	the complete getattr method for a GObject class.
+	(write_boxed_getattr): similar change here.
+
+	* configure.in: require 1.3.7 versions of glib and gtk+.
+	(AC_ARG_ENABLE): fix --disable-thread argument.  It was actually
+	looking for --disable-numpy, which causes all kinds of weirdness.
+
+	* gtk/gtk.override (_wrap_gdk_cursor_new): constructor for
+	GdkCursor that handles both the standard and pixmap cases for
+	cursors.
+
+	* gtk/gtk-types.c: remove GdkCursor related stuff from this file.
+
+	* gtk/gdk.defs (Cursor): add boxed type for cursor.
+	(cursor_new): mark as constructor.
+	(cursor_new_from_pixmap): mark this one as a constructor as well.
+
+2001-06-27  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (arg): don't register a boxed handler for
+	GtkTextIter here.
+
+	* gtk/gtk.override: add overrides for various GtkTextIter methods.
+
+	* codegen/argtypes.py (BoxedArg.write_param): fix up variable type.
+
+	* gtk/gtk.override (_wrap_gtk_text_iter_copy): implement text iter
+	copy function, and ignore the gtk_text_iter_free function (it
+	could cause troubles).
+	(*): replace function calls using the old GtkTextIter wrapper.
+
+	* gtk/gtk.defs: update defs for GtkTextIter.
+	(TextIter): add text iter boxed type here.
+
+	* examples/pygtk-demo/demos/toolbar.py (main): fix up toolbar
+	constructor.
+
+	* examples/pygtk-demo/demos/treemodel.py: add on_get_iter()
+	method, and put tree view in a scrolled window.
+
+	* gtk/pygtktreemodel.c (pygtk_tree_model_get_iter): add missing
+	function to GtkTreeModel implementation.
+
+	* codegen/argtypes.py (arg): remove registrations for `custom'
+	boxed types for objects converted to PyGBoxed.
+
+	* gtk/gtk.override: use PyGBoxed calls fro GtkTreeIters.
+
+	* gtk/gtk-types.c: remove GtkTreeIter stuff from here.
+
+	* gtk/gtk.defs (TreeIter): add boxed type here.
+
+2001-06-26  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c: remove traces of GdkColor from this file.
+
+	* gtk/gtk.override: convert occurences of PyGdkColor_* with
+	correct PyGBoxed calls.
+
+	* gtk/gdk.defs (Color): add GdkColor boxed type here.
+
+2001-06-25  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_binding_entry_add_signal): new
+	function, based on implementation from Skip.  Some small cleanups
+	applied.
+
+	* gtk/gtkobject-support.c: remove dead code for GtkArg handling,
+	etc.  (also tidied up references to it in other files).
+
+2001-06-24  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c: removed all traces of GdkFont.
+
+	* gtk/gdk.defs (Font): add boxed type for font.
+
+	* gtk/gtk-types.c: removed all traces of GdkVisual.
+
+	* gtk/gdk.defs (Visual): add boxed type for visual.
+
+	* gtk/gtk-types.c: remove all traces of GtkAccelGroup from this
+	file -- GtkAccelGroup is now generated code.
+
+	* gtk/gtk.defs (AccelGroup): add boxed type here.
+
+2001-06-23  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py: generate wrappers for boxed types as well.
+
+	* codegen/defsparser.py (DefsParser.boxed): handle (boxed ...)
+	lines.
+
+	* codegen/definitions.py (BoxedDef): add a class for holding a
+	Boxed definition.
+
+	* gobjectmodule.c (pyg_signal_new): more fixups to use
+	pyg_type_from_object.
+
+	* gtk/gtk.override (_wrap_gtk_accel_group_new): don't use
+	PyGtkAccelGroup_New (not sure why I am fixing this -- will change
+	soon anyway).
+	(_wrap_gtk_tree_store_set_value): use pyg_type_from_object here.
+	(_wrap_gtk_list_store_set_value): same here.
+
+	* codegen/argtypes.py (CustomBoxedArg): rename from BoxedArg.
+	(BoxedArg): new code for standardised PyGBoxed handling.
+	(ArgMatcher.register_custom_boxed): rename from register_boxed
+	(ArgMatcher.register_boxed): new function for PyGBoxed types.
+	(arg): use ArgMatcher.register_boxed to register GtkAccelGroup.
+
+	* pygobject.h (pyg_boxed_check): change macro to check against the
+	typecode, rather than python wrapper type.
+
+2001-06-22  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (GTypeArg.write_param): new arg type for
+	GType and GtkType args that uses pyg_type_from_object.
+
+	* gobjectmodule.c (pyg_type_from_object): new function to get a
+	type code from various types of python objects (currently, integer
+	like objects, strings and other objects that have a __gtype__
+	attribute).
+	(pygobject__init__): use pyg_type_from_object to get the object
+	type.
+	(pyg_signal_new): same here.
+
+2001-06-21  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_boxed_getattro): allow getattr to work on
+	PyGBoxed types (while not overloading tp_getattr).  We fall back
+	to tp_getattr if provided by the boxed type.
+	(pyg_register_boxed): make sure tp_getattro is set correctly.
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): convert
+	GtkAccelGroup to a PyGBoxed type.
+
+	* gtk/gtkobject-support.c (pygtk_dict_as_container_args): comment
+	out, as container args have been switched to properties now.
+
+2001-06-19  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_value_from_pyobject): handle PyGBoxed
+	types.
+	(pyg_value_as_pyobject): pass out PyGBoxed types if no custom
+	handler is found, rather than straight CObjects.  Will need to do
+	something about cases where we want mutable values (ie. don't copy
+	the boxed type).
+
+	* configure.in: require glib/gtk+ 1.3.6
+
+2001-06-13  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (Dialog): add fields that were missing (pointed out
+	by Skip).
+
+	* gtk/gtk.override: various updates to overrides file.
+
+2001-06-12  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos): fix bug
+	when no keyword arguments are passed in.  Bug found by Skip
+	Montanaro.
+
+	* examples/pygtk-demo/pygtk-demo.py (create_list): correct signal
+	name.
+
+	* gtk/gtk.defs: update for changes made to gtk.
+
+2001-06-09  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (write_interface): remove the constructor
+	from interfaces.  It is now provided by GInterface.
+	(write_source): use pyg_register_interface to register interfaces.
+
+	* gobjectmodule.c (PyGInterface_Type): add a GInterface class that
+	is the base of all interfaces.  It prevents subclassing of
+	interface objects, etc.
+
+2001-06-08  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_register_boxed): function to register a new
+	boxed type ExtensionClass.
+	(pyg_boxed_new): new function to create wrapper instances for a
+	particular boxed type (given its typecode).
+
+2001-06-07  James Henstridge  <james@daa.com.au>
+
+	* pygobject.h (pyg_boxed_get): add prototypes for a PyGBoxed type
+	that will be used for all boxed types in pygtk (well, I can hope
+	:)
+
+	* gobjectmodule.c (pyg_register_interface): new function to
+	register interfaces with.  Makes sure I don't accidentally give
+	the interface a parent class :).  Also adds a __gtype__ class
+	attribute similar to GObject classes.  May also make interfaces
+	subclasses of GInterface at some point.
+
+2001-05-29  James Henstridge  <james@daa.com.au>
+
+	* codegen/Makefile.am: install the code generator
+
+	* gtk/Makefile.am: install the pygtk.h header
+
+	* Makefile.am: install the pygobject.h header
+
+	* gtk/gdk.defs, gtk/gtk.defs, gtk/gtk-types.c: changes to make
+	things compile.
+
+2001-05-28  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (write_source): add code to reorder object
+	definitions if necessary.  To catch ordering problems in .defs
+	file.
+
+2001-05-27  James Henstridge  <james@daa.com.au>
+
+	* codegen/codegen.py (write_source): interfaces don't have
+	parents.
+
+	* codegen/definitions.py (InterfaceDef.write_defs): don't look for
+	(parent ...) sections in interface definitions.
+
+	* gtk/gtk.defs (Editable): interfaces don't have parents.
+
+2001-05-07  James Henstridge  <james@daa.com.au>
+
+	* examples/gobject/signal.py: register new types.
+
+2001-05-06  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject__init__): make the __init__ function
+	choose what GType to pass to g_object_new based on the __gtype__
+	attribute.
+	(pygobject_methods): make __gobject_init__ an alias for
+	GObject.__init__.
+	(pyg_type_register): new function for registering new GTypes.
+	(pyg_type_register): register the type as "module+class" rather
+	than "module.class", as the second form is considered bad (would
+	like to use the second form though.
+
+	* configure.in: require 1.3.5 versions of glib and gtk+.
+
+2001-05-05  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py (DocbookDocWriter.output_toc): Produce kind of
+	nice docbook documentation.  Example output available at
+	http://www.gnome.org/~james/pygtk-docs/.
+
+2001-05-03  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py (DocWriter): handle output of constructor and
+	method docs.  Use overrides file so as not to output info about
+	methods we don't actually wrap.
+
+	* codegen/Makefile.am (noinst_PYTHON): update file list.
+
+	* codegen/__init__.py (__all__): update module list.
+
+	* codegen/mergedefs.py: same here.
+
+	* codegen/docgen.py (DocWriter.__init__): same here.
+
+	* codegen/codegen.py: import defsparser instead.
+
+	* codegen/defsparser.py: rename from parser.py.
+
+2001-05-01  James Henstridge  <james@daa.com.au>
+
+	* autogen.sh: fix up autogen script to call autoheader
+
+	* gtk/gtk.defs: remove colorsel palette manipulation functions.
+
+2001-05-01  Matthew Wilson  <msw@redhat.com>
+
+	* acinclude.m4 (AM_PATH_PYTHON_JH): only run the AC_PATH_PROGS
+	check if we don't have a PYTHON environment variable set
+
+	* autogen.sh: run autoheader
+
+	* acinclude.m4 (AM_PATH_PYTHON_JH): s/AC_PATH_PROG/AC_PATH_PROGS/
+	so we check for more than one python interpreter.
+
+2001-04-28  James Henstridge  <james@daa.com.au>
+
+	* Makefile.am, pygtk/Makefile.am: limit the symbols exported by
+	the various modules to just their module init function.
+
+	* gtk/Makefile.am (_gtkmodule_la_LDFLAGS): only export the
+	init_gtk symbol.
+
+	* examples/pygtk-demo/demos/toolbar.py (main): remove buttons that
+	called set_space_size method.
+
+	* gtk/__init__.py: remove __all__ definition.  It causes problems
+	with python 2.1.
+
+	* gtk/gtk.override: updated GtkColorSelection method overrides
+	(ignore): remove gtk_entry_new from ignore list, as other entry
+	constructor is gone.
+
+	* gtk/gtk.defs: updates to make it work with current gtk+
+
+2001-04-21  James Henstridge  <james@daa.com.au>
+
+	* codegen/docgen.py, codegen/docextract.py: start of automatic
+	documentation generator.
+
+2001-04-08  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override: same here.
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): more fixups
+
+	* gtk/gtkobject-support.c: lots of similar fixups.
+
+	* codegen/argtypes.py (_enum_name): gdk type codes now seem to be
+	named GDK_TYPE_... and not GTK_TYPE_GDK_...
+
+2001-04-07  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs: lots of defs file updates.
+
+2001-04-06  James Henstridge  <james@daa.com.au>
+
+	* codegen/h2def.py: add --onlyobjdefs flag to script.
+
+2001-03-30  James Henstridge  <james@daa.com.au>
+
+	* examples/pygtk-demo/demos/toolbar.py (main): toolbar demo.
+
+	* examples/pygtk-demo/demos/buttonbox.py (main): add button box
+	demo.
+
+	* examples/pygtk-demo: moved rewritten testgtk demo here, and make
+	changes to account for renamings in gtk.
+
+	* gobjectmodule.c (pygobject_set_property): initialise the GValue
+	to { 0, }, so set_property actually works.
+	(pygobject_get_property): same here.
+
+	* gtk/gtk.defs: updated enum/flag defs.
+
+	* gtk/gdk.defs: updated enum/flag defs.
+
+	* examples/gobject/signal.py (D.do_my_signal): add small example
+	of overriding class closure for a signal introduced from python
+	code.
+
+	* codegen/h2def.py: add --onlyenums flag to only output enum defs.
+
+2001-03-27  James Henstridge  <james@daa.com.au>
+
+	* examples/gobject/signal.py: simple example program that adds a
+	signal to a class, connects a handler to an instance of that
+	class, and finally emits that signal.  Messages are printed by
+	both the signal handler and class method closure.
+
+	* gobjectmodule.c (pyg_signal_class_closure_marshal): convert
+	dashes in signal name to underscores.  Why does g_siganl_name use
+	dashes?
+	(pyg_signal_class_closure_marshal): fix off by one error when
+	setting up the python argument tuple.  The first element was
+	getting left uninitialised.  Signals introduced in python now
+	work.
+
+	* gtk/gtk.defs (GtkFileSelection.get_filename): return value is
+	const.
+
+	* gtk/gtk.override (_wrap_gtk_list_store_set_value): change name.
+	(_wrap_gtk_tree_store_insert): change name.
+
+	* gtk/gtk.defs (GtkListStore.set_value): change from set_cell to
+	set_value.
+	(GtkListStore.set_value): same here.
+
+	* gobjectmodule.c (pyg_signal_class_closure_get): new function to
+	get the closure used as the `class closure' for signals.  We only
+	need one, as we can get all the information we need from the
+	invocation hint.
+	(pyg_signal_new): new function to create new signals.  Doesn't
+	work right yet.
+
+2001-03-26  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject__class_init__): add some comments
+	about creating new GTypes here.
+
+	* gobjectmodule.c: add type info functions to module.
+
+2001-03-24  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c (pygtk_text_iter_is_end): s/is_last/is_end/
+
+	* gobjectmodule.c (pyg_closure_new):
+	s/add_fnotify/add_finalize_notifier/
+
+	* gtk/gdk.defs, gtk/gtk.defs, gtk/gtk.override: various changes to
+	make it compile again.
+
+2001-03-18  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtktreemodel.c (pygtk_tree_model_class_init): signals are
+	now created in the gtktreemodel.c, so we don't need to.
+
+	* gtk/gtk.defs (Adjustment): make parent GtkObject, as GtkData is
+	gone.
+	(GtkText): remove from binding.
+
+	* codegen/codegen.py (write_source): pass in the get_type function
+	when registering classes.
+	(gettypetmpl): remove template.
+	(write_class): remove get_type method generator.  Handled by __gtype__
+
+	* gobjectmodule.c (initgobject): add argument to g_type_init call.
+	(pyg_value_from_pyobject): use G_VALUE_HOLDS_* rather than
+	G_IS_VALUE_*.
+	(pyg_value_as_pyobject): same here.
+	(pygobject_register_class): add an argument that takes the
+	get_type function for the GObject.  This is used to add a
+	__gtype__ attribute to the class (the get_type function is not
+	actually called until __gtype__ is accessed).
+
+2001-02-03  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtktreemodel.c (*): s/tree_node/user_data/
+
+	* gtk/gtk-types.c (pygtk_text_iter_forward_to_line_end): rename
+	function.
+	(pygtk_tree_iter_compare): fix compare function.
+	(pygtk_tree_iter_hash): fix hash function.
+
+2000-12-16  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c (pygtk_text_iter_forward_to_delimiters): rename
+	function.
+
+2000-12-14  James Henstridge  <james@daa.com.au>
+
+	* examples/testgtk/demos/menu.py (main): destroy window on
+	button's clicked signal rather than destroy signal.
+
+	* gtk/gtk.defs: remove gtk_object_default_construct and
+	gtk_object_constructed.
+
+	* gobjectmodule.c: change over to new notification functions.
+
+	* gtk/gtk-types.c: rename functions.
+
+	* gobjectmodule.c (pygobject_get_property):
+	(pygobject_set_property): change function names to match changes
+	in glib.
+	(...connect|emit): use g_signal_parse_name instead of
+	g_signal_lookup, so we can parse the detail out of the signal name
+	string.
+
+2000-12-07  James Henstridge  <james@daa.com.au>
+
+	* examples/testgtk/demos/treemodel.py (MyTreeModel.on_get_path):
+	fix small typo.
+
+2000-12-06  James Henstridge  <james@daa.com.au>
+
+	* gtk/pygtktreemodel.c: fix PyObject_CallMethod calls to add
+	parentheses around argument type list.
+	(pygtk_tree_model_get_flags): decref py_ret -- not Py_None
+	(pygtk_tree_model_get_n_columns): same here.
+	(pygtk_tree_model_get_column_type): same here.
+	(*): conditionally print out debugging messages.
+
+	* examples/testgtk/demos/treemodel.py: simple test of
+	PyGtkTreeModel.
+
+	* gtk/pygtktreemodel.c: set iter->tree_node to NULL when returning
+	FALSE, as GTK sometimes ignores the return value :(
+
+	* codegen/codegen.py (interfacetypetmpl): don't set the interface
+	type as having an instance dictionary.
+	(write_interface): actually use interfacetypetmpl when writing out
+	the interface type def.
+
+	* codegen/argtypes.py (_conv_special_cases): add a special case
+	for the underscore version of PyGtkTreeModel.
+
+	* gtk/gtk.override: include pygtktreemodel.h
+
+	* gtk/__init__.py: don't error out if we can't import ltihooks.
+
+	* gtk/gtk-extrafuncs.defs: include defs for PyGtkTreeModel type.
+
+	* gtk/Makefile.am (_gtkmodule_la_SOURCES): compile PyGtkTreeModel
+	into pygtk.
+
+	* gtk/pygtktreemodel.c: fix errors.
+
+	* gtk/pygtktreemodel.[ch]: check in initial leaky implementation
+	of the GtkTreeModel for use from python.  Can't test it right now
+	because gtk head is broken.
+
+2000-11-29  James Henstridge  <james@daa.com.au>
+
+	* configure.in (enable_thread): update checks for glib/gtk+ to
+	require at least 1.3.2.
+
+	* codegen/h2def.py (write_enum_defs): Havoc's enum handling patch.
+
+	* TODO: add todo item about creating real GObject subclasses, and
+	add some info on the GInterface stuff.
+
+	* examples/testgtk/testgtk.py (load_module): fix bug where
+	mod.__file__ is the .pyc file rather than the .py file.
+
+	* gtk/gtk.defs: change parent type for some classes to GtkDialog
+	to match changes in gtk+.
+
+	* gtk/Makefile.am (pysitedir, pyexecdir): fix up directory names.
+	It wasn't installing these files in a gtk/ subdirectory :(
+
+2000-11-16  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs: make changes to make GtkEditable into an
+	interface.
+
+	* examples/testgtk/demos/__init__.py (demos): create the list of
+	example modules on the fly, rather than having them hard coded
+	into a list.
+
+2000-11-11  James Henstridge  <james@daa.com.au>
+
+	* examples/testgtk/testgtk.py: start of a revamped testgtk
+	example, similar to the new one in gtk.
+
+	* gtk/gtk-types.c (PyGdkEvent_New): guard against a NULL axes
+	member in the GdkEvent structure.
+
+	* gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos):
+	implementation of this function.
+
+	* codegen/argtypes.py (GtkTreePathArg): add an arg matcher for
+	GtkTreePath objects, that represents them as tuples of integers.
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): add marshalers
+	for GtkTreeIter and GtkTreePath so they can be used from signal
+	handlers now.
+
+	* gtk/gtk.override, gtk/gtk.defs: make name change for
+	GtkTreeStore constructor.
+
+2000-11-10  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override: ignore the gtk_tree_view_new function, so
+	gtk_tree_view_new_with_model gets chosen as the constructor.
+	(_wrap_gtk_tree_store_...): fix up the iterator creation methods
+	so that they can take NULL arguments.
+	(_wrap_gtk_tree_view_column_new): new implementation of this
+	constructor.  Map keyword arguments to column attributes.
+
+	* gtk/gtk.defs (gtk_tree_view_new_with_model, GtkTreeView.set_model):
+	Allow NULL to be passed in as the model argument.
+
+	* gtk/gtk.override: add gtk_tree_model_get_{iter,path,value}
+	functions.
+	(_wrap_gtk_list_store_*): add constructor and set_cell
+	implementations, and impls of the insertion functions that return
+	the new GtkTreeIter, rather than treating it as an out argument.
+	(_wrap_gtk_list_store_set_cell): allow string versions of type
+	codes for convenience.
+	(_wrap_gtk_list_store_insert): directly access column_headers
+	structure member as the get_column_type method doesn't exist.
+	(_wrap_gtk_tree_store_*): constructor, set_cell and tree iter
+	creation methods added.  Ignore [gs]et{,v}.
+
+2000-11-09  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.defs (ListStore, TreeStore): these implement the
+	GtkTreeModel interface.
+	(TreeModel): add interface definition here.
+
+	* codegen/codegen.py (register_types): register interfaces into
+	the argument type matcher.
+	(write_source): write out interface source.  Register interface
+	class types before object types, as they may be used by objects.
+	(write_source): set multiple base classes if an object implements
+	an interface.
+	(write_interface): function to write out the code for an
+	interface.  It is really a simplified version of write_class.
+
+	* codegen/parser.py (DefsParser.interface): handle interface
+	clauses.
+
+	* codegen/definitions.py (InterfaceDef): add a class for interface
+	definitions.
+	(ObjectDef): add support for an implements keyword.
+
+	* codegen/codegen.py (write_source): change code generator to pass
+	bases in as a tuple rather than a single PyExtensionClass
+	structure.
+
+	* pygobject.h: change prototype.
+
+	* gobjectmodule.c (pygobject_register_class): allow for registerin
+	a type with multiple base classes.
+
+2000-11-08  James Henstridge  <james@daa.com.au>
+
+	* codegen/argtypes.py (_conv_special_cases): add a special case
+	for converting GObject -> G_OBJECT.
+
+	* gobjectmodule.c (pygobject_connect*): g_signal_connect_closure
+	renaming.
+
+	* codegen/argtypes.py (arg): add GtkTreeIter support.
+
+	* gtk/gtk-types.c, gtk/pygtk.h, gtk/pygtk-private.h: add a
+	skeleton for the GtkTreeIter wrapper.
+
+2000-11-04  James Henstridge  <james@daa.com.au>
+
+	* TODO: todo file with a few items needed for the gtk 2.0 based
+	pygtk.
+
+	* gtk/gtk.defs: add new GtkTree widget definitions.
+	(GtkTreeViewColumn.get_justification): comment out as it doesn't
+	exist.
+
+2000-11-02  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): small changes to
+	handle GtkTextIter objects as arguments to signals, now that Havoc
+	made the appropriate changes in gtk.
+
+2000-10-30  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pyg_closure_marshal): reorder parameters to
+	make it work with latest glib.
+	(pygobject_connect*): pass 0 for the new detail parameter.  Don't
+	know what it is for.
+	(pygobject_emit): pass 0 for detail parameter.
+	(pygobject_stop_emission): pass 0 for detail parameter.
+
+	* gtk/gtkmodule.c (init_gtk): init as module gtk._gtk.  Using just
+	_gtk doesn't seem to work with python 2.0
+
+2000-10-29  James Henstridge  <james@james.daa.com.au>
+
+	* examples/ide/gtkcons.py: small changes to make example run.
+
+	* gtk/gtk-types.c: add GtkTextIter.forward_search implementation.
+
+	* gtk/gtk.override: more override functions.
+
+	* gtk/gtkobject-support.c: remove some of the unused functions from
+	this file.
+
+2000-10-28  James Henstridge  <james@james.daa.com.au>
+
+	* gtk/gtk.override: override the functions used to initialise
+	GtkTextIter objects so that they return the iterator rather than
+	setting up an static GtkTextIter structure.
+
+	* gtk/gtk.defs (TextMark): add missing GtkTextMark object.  Don't
+	know why h2defs missed it.
+	("gtk-extrafuncs.defs"): include gtk-extrafuncs.defs.
+
+	* codegen/argtypes.py: add GdkDevice and GtkTextIter to list of
+	recognised boxed types.
+
+	* gtk/gtk-types.c: add skeleton implementation of GtkTextIter.
+
+	* gtk/pygtk.h, gtk/pygtk-private.h: add prototypes for GtkTextIter
+	wrapper.
+
+	* gtk/gtk.override: ref and sink GtkObjects which have their
+	constructors listed in the overrides file.  This should get rid of
+	the last few warnings on exit related to reference counting.
+
+	* codegen/codegen.py: use the keyword module to check for method
+	and argument names that conflict with the python keywords.  By
+	using this module, we shouldn't have problems with new keywords in
+	future versions of python.
+
+2000-10-27  James Henstridge  <james@james.daa.com.au>
+
+	* gobjectmodule.c (pygobject_emit): support for emiting signals on
+	GObjects from python.
+
+	* codegen/codegen.py (write_constructor): sink GtkObjects.  This
+	prevents us losing our reference to the object if it is sunk.
+
+	* codegen/argtypes.py (ArgMatcher.object_is_a): function to check
+	if one object type is another type.
+
+	* codegen/codegen.py (register_types): pass the parent type when
+	registering a new GObject type.
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): register
+	marshalers for the various boxed types, so that they work as
+	expected inside the signal handlers.
+
+	* gobjectmodule.c (pygobject_repr): small change to match style of
+	other repr functions in python.
+
+	* gtk/gtkmodule.c (init_gtk): only call g_thread_init() if pygtk
+	threading support is enabled.
+
+	* configure.in (enable_thread): add configure checks so that
+	threading support can be disabled even if python was compiled with
+	it.  It defaults to off for now because GSignal has some mutex
+	deadlocks at the moment.
+
+2000-10-26  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtkmodule.c (init_gtk): remove gtk_signal_set_funcs call.
+
+	* gobjectmodule.c (pyg_value_from_pyobject): default to using
+	CObject for unknown boxed values and pointer values.
+	(pyg_value_as_pyobject): same here.
+	(pygobject_connect*): Add signal connection functions.
+
+	* gobjectmodule.c (pyg_boxed_register): new function for
+	registering functions to marshal boxed GValues to/from their
+	python wrappers.
+	(pyg_value_from_pyobject): add boxed support.
+	(pyg_value_as_pyobject): add boxed support.
+	(pyg_closure_new): new function to create a python GClosure.
+	(pyg_closure_destroy): cleanup function for a PyGClosure.
+	(pyg_closure_marshal): marshaler for PyGClosure.
+	(pyg_value_as_pyobject): add const to GValue argument.
+
+	* pygobject.h: export a pyg_boxed_register function to register
+	new boxed types for use with pyg_value_from_pyobject and
+	pyg_value_as_pyobject.
+
+2000-10-25  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtkmodule.c (init_gtk): set the default python character
+	encoding to UTF-8.
+
+	* gtk/gtk.defs: more setting constructors and default arguments.
+
+	* gtk/gtk.defs: more updates.
+
+	* gobjectmodule.c (pygobject_getattro): return NULL on error.
+	This fixes the segfault :)
+
+	* gtk/gtk.defs (Bin): add a field just to test pygobject_getattro.
+	It isn't working quite properly at the moment though :(
+
+	* gobjectmodule.c (check_bases): class->bases is a tuple -- not a
+	list.
+	(check_bases): check if class->bases != NULL before using it :(
+
+	* gtk/gtk.defs: comment out new tree widget stuff at hp and owen's
+	suggestion.
+
+	* gtk/__init__.py: import gobject here as well to prevent weirdness.
+
+	* gtk/gtk.defs: more updates, adding (is-constructor-of ...) and
+	(default "...") clauses.
+
+	* gtk/gtk.override (_wrap_gtk_button_new): handle the accel_group
+	argument, and try to create a stock button if possible.
+
+	* gtk/gtk.defs, gtk/gdk.defs: various small fixes.
+
+	* gtk/gtk.override: fix lots of overrides to work with gtk 2.0
+
+2000-10-24  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.defs: remove unneeded gdk_input_* functions.
+
+	* gtk/gtk.override: small updates.
+
+	* gtk/gtk.defs: update with defs from all of gtk.
+
+	* codegen/h2def.py (find_enum_defs): small fix to enums parsing.
+
+	* gtk/gtk-types.c: add support for GdkDevice and convert function
+	names to lowercase.
+
+	* gtk/gtkmodule.c: add GdkDevice stuff to PyGtk_API.
+
+	* gtk/pygtk.h, gtk/pygtk-private.h: add GdkDevice to list of boxed
+	types.
+
+2000-10-23  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c: don't set the getattr method on objects if it
+	isn't already set.  Also, install a getattro handler that will
+	perform the usual method/attribute lookup and then call the
+	getattr method for all base classes to allow specifying of class
+	specific attributes
+
+2000-07-03  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtkmodule.c (init_gtk): actually initialise the gobject stuff
+	for gtk._gtk.
+
+	* pygobject.h (pygobject_check): call the correct ExtensionClass
+	check macro.
+	(init_pygobject): small fixup here.
+
+	* codegen/codegen.py (noconstructor): handle the null constructor
+	better.
+	(consttmpl): use pygobject_register_wrapper.
+	(getattrtmpl): make the getattr function raise an exception on
+	unhandled attributes.  I will use a tp_getattro function to bind
+	all the getattr functions of base classes together.
+
+	* gtk/gtk-types.c (_pygtk_register_boxed_types): commented out the
+	object implementations for types that have been converted to
+	GObjects.
+
+	* gtk/gtkobject-support.c: commented out some of this code to get
+	it to compile again.  Also converted some functions over to GObject.
+
+	* codegen/argtypes.py (EnumArg,FlagsArg): use the version from gobject.
+
+	* gtk/gtkmodule.c: update
+
+	* gtk/gtk.override: fix up the overrides for the new gdk.defs stuff.
+	(GTK_TYPE_GDK_*): add some dummy defines to make things compile until
+	the gdk-pixbuf enums are added to
+
+	* codegen/argtypes.py (ObjectArg.write_param): use PyGObject
+	rather than PyGtk_Object.
+
+	* pygobject.h (pygobject_check): add check function.  Just a wrapper
+	around ExtensionClassSubclassInstance.
+
+	* codegen/codegen.py: updated to use PyGObject rather than
+	PyGtk_Object.
+
+	* gtk/gtk.defs: removed most of the stuff here so I can test out
+	the gdk stuff.
+
+	* gtk/gdk.defs: updated to gdk-1.3.  A lot of stuff in here.
+
+	* codegen/h2def.py (verbose): remove the special case for GtkObject.
+	(find_obj_defs): amend regexes so that GObject is considered a valid
+	object name.
+
+2000-06-29  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c: use pygobject.h.
+	(pygobject_[gs]et_param): free the GValue afterwards so as not to
+	leak memory.
+
+	* pygobject.h: header for modules that want to use GObject.
+
+2000-06-28  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c: add get_data / set_data methods.
+	Add get_param / set_param methods.
+	(pygobject__init__): simple init function for GObjects.  Doesn't
+	handle params yet.
+	(pygobject_register_wrapper): don't ref the GObject -- it isn't like
+	GtkObjects where we ref/sink them.
+	(pygobject_queue_param_changed): add queue_param_changed method.
+
+2000-06-27  James Henstridge  <james@daa.com.au>
+
+	* gobjectmodule.c (pygobject_dealloc): start of gobject wrapper.
+
+2000-06-19  Frederic Gobry  <frederic.gobry@epfl.ch>
+
+	* gdkimlibmodule.c: do an actual call to create_from_array instead
+	of create_from_data, and fixed broken test on alpha channel
+
+2000-04-15  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: move gtk_set_locale here, and set LC_NUMERIC back to
+	"C" after call.  Python's numeric locale should be fixed on C.
+
+2000-04-07  James Henstridge  <james@daa.com.au>
+
+	* NEWS: added news items.
+
+	* pygtk.spec, configure.in: updated version number.
+
+	* configure.in (enable_numpy): added --disable-numpy argument that
+	disables numeric python support even if numpy is found.
+
+	* gtkmodule.c (PyGdkWindow_{Pointer,Keyboard}{Grab,Ungrab}): new
+	GdkWindow methods.
+
+	* gtk.py (rc_reparse_all): fix spelling mistake.
+	(GtkTreeItem.__getattr__): fix bug reported by Aaron Digulla.
+
+	* generate/gtklists.defs (gtk_clist_get_selectable): fix bug in
+	return type.
+
+2000-04-06  James Henstridge  <james@daa.com.au>
+
+	* (lots of files): switch over to using libtool and automake-1.4a.
+
+2000-03-13  James Henstridge  <james@daa.com.au>
+
+	* pyglade/__init__.py: remove python-1.4 ni stuff, and put in a
+	warning message that you should think of switching over to libglade.
+
+	* pygtk.spec: incremented version number.  Code gtk+ dependency into
+	spec file.  Made auxillary packages depend on the pygtk package of
+	the same version.
+
+	* configure.in: incremented version number.  Incremented minimum
+	required GTK+ so that when threading is compiled in we don't get
+	problems caused by using old buggy versions of GTK+.
+
+	* gtkmodule.c (PyGdkWindow_PropertyChange): fixed the 32 bit data
+	part of the case statement correctly this time :)
+
+2000-03-08  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c (PyGdkWindow_PropertyChange): fixed up problem in
+	property_change method that could cause a crash if data of
+	size 16 or 32 was set.
+	(PyGtkStyleHelper_SetItem): added missing return that could cause
+	a fallthrough to the g_assert_not_reached() call when setting a
+	bg_pixmap element on a GtkStyle.
+
+2000-03-03  James Henstridge  <james@daa.com.au>
+
+	The following is from Paul Clifford <paul@plasma.demon.co.uk>
+
+	* libglade.py (GladeXML.signal_autoconnect): pass all the extra
+	arguments to autoconnect.
+
+	* libglademodule.c (connect_many): don't exit if the handler is
+	a tuple instead of a function.
+
+	The following fixes are from John Ehresman <jpe@archaeopteryx.com>
+
+	* gtk.py (GtkWidget.set_scroll_adjustments): return the value to
+	user.
+
+	* gtkmodule.c (GtkArg_AsPyObject): check if GtkObject is not NULL.
+	(_wrap_gtk_clist_get_pixmap, _gtk_clist_get_pixtext): check that
+	returned pixmap is not NULL.
+	(_wrap_gtk_ctree_node_get_pixmap, _gtk_ctree_node_get_pixtext): check
+	that returned pixmap is not NULL.
+
+	* gtk.py (GtkToolbar): wrap callbacks when inserting a toolbar item.
+	(GtkNotebook.set_menu_label_text): fixed typo
+	(GtkTreeItem.__getattr__): wrap subtree attribute.
+
+2000-03-01  Frederic Gobry  <gobry@lith.di.epfl.ch>
+
+	* gtkmodule.c (PyGtkSelectionData_GetAttr): added .length field,
+	so that it is possible to check for invalid selection during
+	copy/paste.
+
+2000-02-23  Frederic Gobry  <gobry@lith.di.epfl.ch>
+
+	* gtkmodule (GtkRet_FromPyObject): added missing break in switch.
+
+2000-02-21  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkTable.resize): added missing function.  Patch from
+	wrobell <wrobell@posexperts.com.pl>.
+
+	* generate/gtkcontainers.defs (gtk_table_resize): added missing
+	function.
+
+2000-02-20  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkCList.get_[hv]adjustment): apply fix from Martin
+	Preishuber.
+
+2000-02-16  James Henstridge  <james@daa.com.au>
+
+	* configure.in, pygtk.spec: updated version to 0.6.4
+
+2000-01-27 Elliot Lee <sopwith@redhat.com>
+	* gtk.py: s/sel/self/ in GtkSpinButton.get_adjustment()
+
+2000-01-26  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkObject.__hash__): use C level GtkObject for hash
+	function.
+	(GtkAccelGroup.__cmp__): use C level object for comparisons.
+	(GtkAccelGroup.__hash__): use C level object for hashing.
+
+	* gtkmodule.c: added hash functions for many object types.
+
+2000-01-25  Kelly Lynn Martin  <kelly@poverty.bloomington.in.us>
+
+	* gtk.py (gdk_beep): new wrapper
+	* gtkmodule.c (_wrap_gdk_beep): new implementation
+
+2000-01-21  Matt Wilson  <msw@redhat.com>
+
+	* generate/generate.py: add a hack to allow a null-ok flag on the
+	return type.  This lets us create wrappers which return None if
+	the C function returns NULL.
+
+	* generate/gtklists.defs (gtk_ctree_node_nth): return None when
+	gtk_ctree_node_nth returns NULL.
+
+2000-01-20  Matt Wilson  <msw@redhat.com>
+
+	* gtkmodule.c (PyGtk_New): disable object sinking for now, until
+	we rework the .def file and generation routines to know which
+	functions are creators.
+
+2000-01-20  Matt Wilson  <msw@redhat.com>
+
+	* gtk.py (GtkCList.row_move): s/soure_row/source_row/g typo
+
+2000-01-17  Matt Wilson  <msw@redhat.com>
+
+	* gtkmodule.c: following changes from ChiDeok Hwang
+	<cdhwang@sr.hei.co.kr>
+
+	* gtkmodule.c (_wrap_gtk_adjustment_set_all): parse the 6 optional
+	arguments.
+
+	* gtkmodule.c (_wrap_gtk_widget_draw,
+	_wrap_gtk_widget_size_allocate, _wrap_gtk_widget_intersect,
+	_wrap_gdk_color_alloc): fix PyArg_ParseTuple format strings to use
+	shorts instead of ints where necessary.
+
+	* gtkmodule.c (_wrap_gtk_toolbar_insert_item): check to make sure
+	callback isn't Py_None before Py_INCREF()
+
+	* gtkmodule.c (_wrap_gtk_toolbar_insert_item,
+	_wrap_gtk_toolbar_append_item, _wrap_gtk_toolbar_prepend_item):
+	fix broken ParseTuple specification strings.
+
+	* gtkmodule.c (_wrap_gtk_clist_get_selection): use
+	GPOINTER_TO_UINT to get row.
+
+2000-01-17  Matt Wilson  <msw@redhat.com>
+
+	* libglademodule.c (connect_one, _wrap_glade_xml_signal_connect):
+	don't INCREF objects passed into Py_BuildValue as they are
+	INCREF'ed for you automatically.  Pass new PyObjects in with 'N'
+	to consume the reference.
+
+	* gtkmodule.c (PyGtk_New): sink the object upon creation.  We
+	don't want floating GtkObjects.
+
+	* gtkmodule.c: general cleanups, testing for success of PyObject
+	creation, reference count fixes.  Several functions used
+	Py_BuildValue with 'O' format strings.  This increfs the object
+	passed into the tuple where.  When using Py*New in Py_BuildValue,
+	use 'N' in the format string to consume the reference of the new
+	object.
+
+2000-01-05  Matt Wilson  <msw@redhat.com>
+
+	* gdkimlibmodule.c, gtkglmodule.c, gtkmodule.c: Patch from ChiDeok
+	Hwang <cdhwang@sr.hei.co.kr> to decref PyObjects retrieved by
+	PySequence_GetItem.
+
+1999-12-18  Matt Wilson  <msw@redhat.com>
+
+	* gtkmodule.c (_wrap_gtk_clist_get_rows): removed function
+
+	* generate/gtklists.defs (GtkCList): add field for rows
+
+1999-12-16  Matt Wilson  <msw@redhat.com>
+
+	* gtk.py (GtkCList.__getattr__): oops - left out the _gtk. part
+
+1999-12-15  Matt Wilson  <msw@redhat.com>
+
+	* gtk.py (GdkColor): added a function to create a GdkColor
+	object.  You should use this if you don't want to allocate a color
+	before passing it into functions that don't need an allocated
+	color.
+
+	* gtkmodule.c (_wrap_gdk_color_new, PyGdkColor_GetAttr): add a
+	functions to create and modify a GdkColor object.
+
+1999-12-15  Matt Wilson  <msw@redhat.com>
+
+	* gtk.py (GtkCList.__getattr__): added 'rows' attribute.
+
+	* gtkmodule.c (_wrap_gtk_clist_get_rows): added wrapper to get
+	number of rows in a clist
+
+	* gtkmodule.c (PyGtkStyle_New): If the GtkStyle passed in is NULL,
+	return a None object.  This is a bit of a hack, but without it
+	you'll fail NULL assertions when you attach to the style_set
+	signal.
+
+	* generate/gtkmisc.defs (gtk_pixmap_new): mask is null-ok.
+
+	* generate/gtklists.defs (gtk_clist_set_pixmap): likewise.
+
+	* pygtk.h (PyGdkBitmap_Check): define PyGdkBitmap_Check to be the
+	same as PyGdkWindow_Check.
+
+	* gtkmodule.c: -Wall cleanups
+
+	* libglademodule.c (init_libglade): removed unused variable
+
+	* gdkimlibmodule.c (_wrap_gdk_imlib_init): s/static/static int/
+
+1999-12-12  Matt Wilson  <msw@redhat.com>
+
+	* generate/generate.py (FunctionDefsParser.define_func): added new
+	string_or_null type to check for NULL when passing strings back
+
+1999-09-30  James Henstridge  <james@daa.com.au>
+
+	* pygtk.spec: updated spec file.
+
+	* NEWS: added news items
+
+	* configure.in: updated version number.
+
+	* libglademodule.c: don't segfault when a widget name does not exist.
+
+1999-09-28  James Henstridge  <james@daa.com.au>
+
+	* libglade.py: enable gnome functionality if it is available.
+
+	* gtk.py (GtkEditable.__getattr__): added accessors to GtkEditable.
+
+	* generate/gtkedit.defs (GtkEditable): added accessors for some
+	fields of the GtkEditable.
+
+	* gtkmodule.c: added _raise, lower and input_get_pointer methods to
+	the GdkWindow wrapper.
+
+	* gtk.py (GtkAspectFrame.__init__): fixed prototype for GtkAspectFrame
+
+1999-08-25  Matt Wilson  <msw@redhat.com>
+
+	* gtkmodule.c (_wrap_gdk_char_width): added wrapper for gdk_char_width
+	* gtk.py (gdk_char_width): added wrapper for gdk_char_width
+
+1999-08-09  James Henstridge  <james@daa.com.au>
+
+	* pygtk.spec: updated spec file, and added subpackages pygtk-glarea
+	and pygtk-libglade.  Also incremented version number.
+
+1999-08-08  James Henstridge  <james@daa.com.au>
+
+	* NEWS: updated news file.
+
+	* configure.in: increased version number to 0.6.2.
+
+	* gdkimlibmodule.c (_wrap_gdk_imlib_image_get_array): make sure that
+	the image data is not freed while the returned array is in use, so
+	that we don't get into an inconsistent state.
+
+	* gtk.py: added gdkrgb functions to this file.
+
+	* gtkmodule.c: added the gdkrgb functions for drawing rgb and greyscale
+	images.
+	(gdk_draw_array): a new function that will draw a numpy array to a
+	drawable with gdkrgb.  It is written so that it can handle slicing
+	on the first two axes -- it does not handle non contiguous data on
+	the third axis.
+
+1999-08-04  Matt Wilson  <msw@redhat.com>
+
+	* GdkImlib.py (create_image_from_xpm): new wrapper for creating
+	imlib images from xpm data
+
+	* gdkimlibmodule.c (_wrap_gdk_imlib_create_image_from_xpm): New
+	wrapper
+
+1999-08-03  James Henstridge  <james@daa.com.au>
+
+	* description.py (GdkWindow): added descriptions of the new routines.
+
+	* gtkmodule.c (GdkWindow.property_{get,change,delete}): new functions
+	for manipulating the properties on a window.
+
+	* gtk.py (_window_foreign_new, _root_window): added wrappers for
+	the new functions.
+
+	* gtkmodule.c: added xid attribute to GdkWindow's, and added functions
+	gdk_window_foreign_new and gdk_get_root_win.  The second function is
+	simply a wrapper that returns a GdkWindow for the root window.
+
+1999-08-02  James Henstridge  <james@daa.com.au>
+
+	* libglade.py: new file that wraps the _libglade module.
+
+	* libglademodule.c: handle connecting to another object correctly.
+
+	* gtkmodule.c: added support for passing an object for
+	gtk_signal_connect_object type behaviour.
+	(_wrap_gtk_signal_connect_object)
+	(_wrap_gtk_signal_connect_object_after): new wrappers.
+
+	* gtk.py (idle_add, timeout_add, quit_add): pass extra arguments to
+	the callback.
+
+	* libglademodule.c (_wrap_glade_xml_signal_connect): fixed a small
+	problem with reference counting here.
+
+	* gtkmodule.c: added support for passing arguments to timeout, quit
+	and idle functions.
+
+1999-08-01  James Henstridge  <james@daa.com.au>
+
+	* pyglade/build.py (optionmenu_new): a small fix from David Cole.
+
+	* configure.in: added tests to see if libglade is installed.
+
+	* libglademodule.c: the rest of the libglade module
+
+	* generate/libglade.defs: a .defs file for libglade.
+
+1999-07-31  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: put in Paul Fisher's enhancements to the threading
+	code.  It should now work better with multiple threads calling
+	GTK+ routines (remember to use threads_enter/threads_leave), and
+	doesn't reintroduce the global interpreter lock problems that
+	Duncan's original code worked around.
+
+	* configure.in: added a check for the numpy header.
+
+	* GdkImlib.py: added wrappers for the numpy routines.
+
+	* gdkimlibmodule.c: added Travis Oliphant's Numeric python stuff to
+	the imlib module.
+
+1999-07-20  Matt Wilson  <msw@redhat.com>
+
+	* gtk.py (gdk_flush): new wrapper
+	* gtkmodule.c (_wrap_gdk_flush): new implementation
+
+1999-07-19  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkAdjustment.set_all): a wrapper for the new function.
+
+	* gtkmodule.c (_wrap_gtk_adjustment_set_all): simple wrapper for
+	setting values on an adjustment.
+
+	* gtk.py (GtkCList.get_column_width): a wrapper for this new function.
+
+	* gtkmodule.c (_wrap_gtk_clist_get_column_width): a function to get
+	the column width for a column in a clist.
+
+	* gtk.py (_filtprops): convert GtkAccelGroup and GdkImlibImage types
+	back to the C equivalents.  This makes adding GnomeCanvasImage items
+	to the GnomeCanvas easier.
+	(GtkCTree.node_get_selectable): added wrapper function.
+
+1999-07-18  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c (_wrap_gdk_threads_enter): don't use PyGTK_BLOCK_THREADS,
+	since it should only be called outside the gtk main loop.  Instead
+	use Py_BEGIN_ALLOW_THREADS.
+
+	* examples/gl/*: new examples of use of gtkgl.
+
+	* gtkgl.py: renamed from GtkGL.py.
+
+	* gtkglmodule.c (_wrap_gtk_gl_area_new, _wrap_gtk_gl_area_share_new):
+	fixed small typo.
+
+	* GtkGL.py: added constants.
+
+1999-07-15  James Henstridge  <james@daa.com.au>
+
+	* configure.in, Makefile.am: added tests for gtkglarea.
+
+	* GtkGL.py: python wrapper for the GtkGLArea widget, and a few extra
+	functions for use with the widget.
+
+	* generate/gtkgl.defs, gtkglmodule.c: added wrapper for gtkglarea.
+
+1999-07-14  James Henstridge  <james@daa.com.au>
+
+	* gdkimlibmodule.c: modified to use the pygdkimlib.h header.
+
+	* pygdkimlib.h: new file similar to pygtk.h, but for _gdkimlib module.
+
+	* gdkimlibmodule.c: modified to use the pygtk.h header.
+
+	* gtkmodule.c: modified file to use the pygtk.h header, and set
+	up the _gtk._PyGtk_API object correctly.
+
+	* pygtk.h: a new file with a similar use to the arrayobject.h in
+	numeric python.  I will convert over to using this in pygtk and
+	gnome-python.
+
+1999-07-13  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c (_wrap_gdk_threads_enter): unblock threads when waiting
+	for the GDK lock.  This allows other threads to unlock it, and should
+	prevent some deadlocks.
+
+	* gtkmodule.c (gtk_main_iteration, gtk_events_pending): removed code
+	to unlock gtk thread -- Owen fixed this properly in gtk.
+
+1999-07-12  James Henstridge  <james@daa.com.au>
+
+	* gtk.py: fixed a few bugs reported by Ville Lauriki.
+
+	* generate/gtkmenus.defs (gtk_item_factory_add_foreign): fix a typo.
+
+	* gtkmodule.c: fixed problems if gdk_atom_name returns NULL.
+
+	(_wrap_gtk_main_iteration, _wrap_gtk_events_pending): added
+	GDK_THREADS_LEAVE() and GDK_THREADS_ENTER() calls round these
+	functions.  Without this, it deadlocks if threads are enabled.
+
+	* generate/gtklists.defs (GtkTreeItem): added wrapper for
+	treeitem->subtree attribute.
+
+	* pyglade/build.py (text_new): small fix.
+
+1999-05-19  James Henstridge  <james@daa.com.au>
+
+	* NEWS: added news about changes in this version.
+
+	* configure.in, pygtk.spec: updated version number to 0.6.1.
+
+1999-05-13  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c (PyGtk_item_factory_cb): forgot to wrap the function
+	call in PyGTK_{,UN}BLOCK_THREADS -- this was causing seg faults
+	for people with threading built into their python.
+	(PyGtk_MenuPosition): similar fix.
+
+1999-04-25  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkWidget.get_allocation): a wrapper for the new function.
+
+	* gtkmodule.c: added a routine for getting the allocation of a widget.
+
+1999-04-22  James Henstridge  <james@daa.com.au>
+
+	* NEWS: added a summary of the new features.
+
+	* pygtk.spec: upped version number.
+
+	* configure.in: upped version number to 0.6.0.  I think thread support
+	is a big enough feature to bump it up to 0.6.
+
+1999-04-21  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (create_bitmap_from_data): added new wrapper.
+
+	* gtkmodule.c: added gdk_bitmap_create_from_data function.  Also
+	export PyGtk_BlockThreads and PyGtk_UnblockThreads through the
+	_private dictionary, so they can be used from within other modules
+	(gnome-python in particular).
+
+1999-04-20  James Henstridge  <james@daa.com.au>
+
+	* pygtk.spec: updated package version number.
+
+	* configure.in: added a check for the python thread module.  If it
+	is found, then also link _gtkmodule to the gthread library.
+	Incremented minimum GTK version to 1.2.1.
+	Incremented version to 0.5.13.
+
+	* gtkmodule.c: call g_thread_init if python was built with thread
+	support.  This is required to turn thread support on inside gdk/gtk.
+
+	* gtk.py: added new functions.
+	(GtkList.insert_items): this function wasn't looking at the internal
+	GtkObject for the children to insert, so would fail.
+
+	* generate/gtkbase.defs (gtk_widget_accelerators_locked): new func.
+
+	* generate/gtkmenus.defs (gtk_item_factory_add_foreign): new func.
+	(gtk_menu_get_accel_group): new func.
+	(gtk_menu_reorder_child): new func.
+	(gtk_menu_shell_deselect): new func.
+
+	* gtkmodule.c (_wrap_gtk_combo_set_popdown_strings): accept any
+	sequence for the second argument, rather than just lists.
+	(_wrap_gtk_init): check the return value, and throw an exception
+	when a connection to the X server could not be made, rather than
+	exiting.
+
+	* gtk.py: got rid of some warnings when pygtk is imported when
+	DISPLAY is not set.  Not completely necessary, but it doesn't hurt.
+	(GtkObject.remove_data) fixed small bug pointed out by Duncan Grisby.
+
+1999-04-08  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (threads_enter,threads_leave): export these two new functions.
+
+	* gtkmodule.c: applied a modified version of Duncan Grisby's threading
+	patch.  The changes were mainly inlining some of the code with macros
+	and making it so that the extra code was not added unless python
+	was compiled with thread support.  Also added wrappers for
+	gdk_thread_enter and gdk_thread_leave.
+
+	* gtk.py (GtkList.{,un}select_item): fixed small bug reported by
+	Ben Darnell.
+
+	* gtkmodule.c: fixed some small bugs in gtk_ctree stuff.  Thanks go
+	to Chi-Deok Hwang.  Also fixed the bug in gtk_clist where I copy
+	and pasted from.
+
+	* gtk.py (GtkNotebook.set_tab_label_text): Small typo.  Fix from
+	Toby D. Reeves.
+
+1999-03-13  James Henstridge  <james@daa.com.au>
+
+	* examples/testgtk/testgtk.py: Applied some fixes from Chi-Deok Hwang
+	to this example.  Mainly clean ups needed because of me not changing
+	testgtk with the rest of pygtk.
+
+1999-03-12  James Henstridge  <james@daa.com.au>
+
+	* configure.in, pygtk.spec: increased version number to 0.5.12.
+
+	* gtkmodule.c: added optional support for not catching exceptions in
+	callbacks.  This way it should be a lot easier to debug a pygtk
+	program with pdb.
+
+	* gtkmodule.c, gtk.py: a few fixes for problems sent in by
+	Chi-Deok Hwang.  This includes a fix to GtkWidget.event(),
+	assignments to GtkStyle attributes throwing exceptions,
+	font loading getting reference counting correct and throwing
+	exceptions for bad font names and allowing None to be passed
+	as a colour to GnomeCanvasItem.set() (the fix is in pygtk).
+
+	* generate/gtklists.defs (gtk_ctree_new): I had missed this
+	function in previous releases.
+
+1999-02-24  James Henstridge  <james@daa.com.au>
+
+	* gtk.py: made changes to match those in the defs files and _gtk.
+
+	* description.py (GdkGC.set_dashes): describe new GdkGC method.
+
+	* generate/gtkcontainers.defs: removed gtk_window_set{focus,default},
+	since these are internal to GtkWindow.  Also added
+	gtk_handle_box_set_handle_position and gtk_handle_box_set_snap_edge.
+
+	* gtkmodule.c: added gtk_widget_get_child_requisition.
+	(PyGdkGC_GetAttr): added method GdkGC.set_dashes to set the dash
+	pattern for this GC.
+
+1999-02-23  James Henstridge  <james@daa.com.au>
+
+	* pyglade/build.py: added some code to get the option menu creation
+	code working.
+
+	* pyglade/xmlparse.py: check if xmllib is included in the standard
+	python library, use it for the XML parser -- it is much more complete,
+	and doesn't barf on some valid XML files like the old one does.  If
+	xmllib is not found, the old parser is used.
+
+	* README, Makefile.am, pygtk.spec: added references to the MAPPING
+	file.
+
+	* MAPPING: new file describing the mapping of GTK+ onto python as
+	pygtk does it.
+
+1999-02-22  James Henstridge  <james@daa.com.au>
+
+	* description.py (GdkCursor): added information about this type.
+
+	* gtk.py: commented out the __getattr__, __setattr__ and __delattr__
+	methods of GtkObject.  There were too many things that broke because
+	of these changes.  If I can get these to work correctly in the
+	future, I will consider re-enabling it, but not till then.
+
+	* examples/testgtk/testgtk.py (create_cursor_test): added a cursor
+	test to the python testgtk.  It is adapted from the translation sent
+	in by Osamu Tanimoto.
+
+	* gtkmodule.c: fixed a bit of bad copy'n'paste in the GC part of the
+	style wrapper code.  Thanks go to Osamu Tanimoto <tanimoto@rios.co.jp>.
+	(PyGdkCursor_GetAttr): now GdkCursor objects have a type attribute
+	that returns the type number for the object, and a name attribute
+	that gives a string representation of that type number.
+
+1999-02-20  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkTooltips.set_tip): made tip_private argument optional.
+	(GtkObject.__[gs]etattr__, GtkObject.__delattr__): added some more
+	fixes to this code so that it shouldn't throw exceptions as much
+	when it shouldn't.
+
+	* gtkmodule.c: PyGdkEvent_New wasn't interpreting GDK_BUTTON_RELEASE
+	events correctly.  Also some fix ups for gtk_menu_popup.
+
+	* generate/gtkcontainers.defs (gtk_container_set_focus_child): allow
+	null child argument.
+
+1999-02-19  James Henstridge  <james@daa.com.au>
+
+	* gtk.py: added __getattr__ and __setattr__ methods to GtkObject so
+	that you can set data on a GtkObject directly in a persistent way
+	(reference counting problems prevent pygtk from always passing the
+	same python object to a callback).  These functions ignore attributes
+	starting with an underscore.
+	Also modified all the other __getattr__ methods to call their
+	parent class's __getattr__ method when they fail instead of
+	raising an exception.
+
+	* gtk.py: some changes to make use of the new null-ok flags.
+
+	* generate/*.defs: added some null-ok tags where appropriate.
+
+	* gtkmodule.c: removed gtk_frame_new, as the null-ok change in
+	generate.py makes it unnecessary.  Also gtk_spin_button_new_no_adj
+	has been removed because it is no longer necessary.
+
+	* generate/generate.py (FunctionDefsParser.define_func): altered the
+	code generation routines so that they recognise the (null-ok) tag in
+	the .defs file.  This should give a lot more flexibility to the
+	generator, and allow me to move some of the special case code in
+	gtkmodule.c back to the .defs files.  The null-ok tag is currently
+	only recognised for string, object and boxed type arguments.
+
+	* gtkmodule.c: fixes to the gtk_window_set_geometry_hints function to
+	throw an exception for bad aspect values.  Also let it understand
+	integers for aspect values.
+	Also fixed up gtk_menu_popup so that you could give None for a few
+	more arguments.
+
+1999-02-16  James Henstridge  <james@daa.com.au>
+
+	* description.py: added documentation about GtkStyle changes to this
+	pseudo module.
+
+	* gtkmodule.c: added a new python type GtkStyleHelper that is used
+	by python GtkStyle objects as a sequence type that alows us to write
+	back to the arrays in the GtkStyle object.  I have also made it
+	possible to update the font and (black|white){,_gc}.  I also added
+	a GtkStyle.copy() method.  This gives the user everything they need
+	to alter styles inside their applications.  I still believe that
+	rc files are better, but there seem to be a lot of people who want
+	this functionality.
+
+	* gtkmodule.c (_wrap_gtk_window_set_geometry_hints): made changes so
+	apect ratios can be set to integers.  Also made it throw an exception
+	for aspect ratios of zero, since this caused my X server to crash
+	a few times.
+
+1999-02-15  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkPaned.set_position): added function.
+
+	* generate/gtkcontainers.defs (gtk_paned_set_position): added new
+	function
+
+1999-02-14  James Henstridge  <james@daa.com.au>
+
+	* gtk.py: added GtkWindow.set_geometry_hints to match below addition.
+
+	* gtkmodule.c: added gtk_window_set_geometry_hints.
+
+1999-02-08  James Henstridge  <james@daa.com.au>
+
+	* description.py (GdkWindow.depth): documented presence of this
+	attribute.
+
+	* gtk.py (GtkFileSelection.complete): I had left out the argument in
+	this prototype.  Fixed now.
+
+1999-02-04  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (create_pixmap_from_xpm,create_pixmap_from_xpm_d): altered
+	these functions to use the gdk_pixmap_colormap_create variants if
+	the first argument is a GtkWidget or GtkStyle.  This means you
+	don't have to realise the widget before creating pixmaps from it.
+	(GtkCheckMenuItem.set_state, GtkToggleButton.set_state): removed
+	these compatibility routines so they don't mask GtkWidget.set_state.
+
+	* gtkmodule.c: moved gtk_item_factory_get_widget here so I can catch
+	NULL returns and convert them to None returns.  Also added the
+	depth attribute to GdkWindow objects.
+	Also added gdk_pixmap_colormap_create_* variants.  These can be used
+	if you only have a colormap reference, rather than a window.
+
+	* GtkExtra.py: there were a couple of calls to
+	GtkContainer.border_width which is deprecated.
+
+	* examples/testgtk/testgtk.py: fixes to dnd code in this example.  I
+	hadn't looked at it since Owen made the dnd changes.
+
+	* examples/simple/tooltip2.py: fixed small bug pointed out by Markus
+	Oberhumer.
+
+	* pyglade/build.py (clist_new): fixes to make it parse after clist
+	changes.
+
+1999-02-02  James Henstridge  <james@daa.com.au>
+
+	* generate/gtklists.defs, gtk.py: added GtkCList.focus_row.
+
+	* _gdkimlibmodule.c, GdkImlib.py: added push_visual and pop_visual,
+	that can be used to easily set GTK to use the imlib visual/colormap
+	combination.
+
+	* gtkmodule.c: the PyObject -> GtkArg conversion routines were not
+	catching some exceptions that they generated.  This would cause
+	wierd problems if you passed the wrong argument types to signal
+	handlers.  This was found by Chi-Deok Hwang <cdhwang@sr.hei.co.kr>
+
+	* examples/simple/dnd.py, examples/simple/dndpixmaps.py: and example
+	of drag and drop contributed by Chi-Deok Hwang <cdhwang@sr.hei.co.kr>
+
+	* gtkmodule.c: added gtk_ctree_get_selection, that returns nodes
+	rather than pointers.
+
+	* gtk.py: made changes to reflect those below.  Also added
+	GtkWidget.get_colormap() (it was missing previously).
+
+	* generate/gtkedit.defs (gtk_spin_button_update): added function.
+
+	* generate/gtkmenus.defs (gtk_check_menu_item_set_active): function
+	renaming.
+	(gtk_menu_set_title): added function.
+
+	* generate/gtkmisc.defs (gtk_toggle_button_[sg]et_active): added
+	functions, and removed gtk_toggle_button_set_state.
+
+1999-01-27  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: fixed some typos in _wrap_gtk_ctree_get_row_data and
+	_wrap_gtk_ctree_base_nodes.  This fix was sent to me by Jim
+	Robinson <robinson@ipsg.mot.com>.
+
+1999-01-26  James Henstridge  <james@daa.com.au>
+
+	* gtk.py: fixed typo in GtkProgress.configure.
+
+1999-01-22  James Henstridge  <james@daa.com.au>
+
+	* gdkimlibmodule.c: (_wrap_gdk_imlib_create_image_from_data): function
+	would raise an exception if there was a null in the data or alpha
+	arguments.  Also added some sanity checks on the lengths of data
+	and alpha.  This patch was submitted by Toby D. Reeves.
+
+1999-01-21  James Henstridge  <james@daa.com.au>
+
+	* examples/testgtk/testgtk.py (create_scrolled_windows): changed
+	a call to GtkContainer.add to GtkScrolledWindow.add_with_viewport.
+
+	* gtk.py (GtkPacker.add): Added defaults for the arguments.
+
+1999-01-11  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkProgress.get_current_percentage): fixed function call
+
+	* gtk.py (GtkScrolledWindow): changed so it inherits from GtkBin
+	instead of GtkContainer, to match changes in GTK.
+
+	* GDK.py (DRAG_PROTO_ROOTWIN): Added the constant.
+
+	* gtkmodule.c: forgot to include GTK_TYPE_DOUBLE in one of the GtkArg
+	processing routines.  Also fixed a problem for events with a NULL
+	window.
+
+1998-12-24  James Henstridge  <james@daa.com.au>
+
+	* gdkimlibmodule.c(_wrap_gdk_imlib_get_rgb_height): I accidentally
+	returned rgb_width instead of rgb_height.  This bug report was from
+	Osamu Tanimoto <tanimoto@rios.co.jp>.
+
+1998-12-22  James Henstridge  <james@daa.com.au>
+
+	* GtkExtra.py: modified the signal connect bit in the MenuFactory
+	code so it is a bit more sane.
+
+1998-12-21  James Henstridge  <james@daa.com.au>
+
+	* pygtk.spec: updated version here as well.
+
+	* README: updated required GTK version to 1.1.9
+
+	* configure.in: Updated version for pygtk to 0.5.9, increased
+	GTK version check to 1.1.9.
+
+1998-12-20  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c, generate/gtkmisc.defs: moved gtk_preview_draw_row here
+	because python's string conversion routines do not like nuls in a
+	string, but you quite often want them in image data.
+
+1998-12-17  James Henstridge  <james@daa.com.au>
+
+	* examples/*/*.py: changed calls to GtkLabel.set to GtkLabel.set_text.
+
+	* gtk.py: made changes to reflect those below.
+
+	* generate/gtkbase.defs (gtk_widget_set_app_paintable): added this
+	stub.
+
+	* generate/gtkmisc.defs (gtk_label_set_text): renamed gtk_label_set to
+	this, added gtk_label_set_line_wrap.
+
+	* generate/gtkdnd.defs: Added gtk_drag_source_unset.
+
+	* generate/gtklists.defs: moved reordering function stubs from ctree
+	to clist.
+
+	* generate/gtkcontainers.defs: removed GtkDrawWindow.  Added
+	gtk_paned_pack[12]
+
+	* GtkExtra.py (MenuFactory.create): wasn't passing extra arguments
+	onto signal connect.  Bug fix from Sam Tannous <stannous@cisco.com>
+
+	* gtkmodule.c: Applied some fixes to the ctree code from
+	A.Hartgers@phys.tue.nl
+
+1998-12-09  James Henstridge  <james@daa.com.au>
+
+	* gtk.py, generate/gtkmisc.defs, GTK.py: Added
+	gtk_toolbar_set_space_style and the required enum.
+
+1998-12-08  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: fixed up the toolbar functions, so they also use
+	gtk_signal_connect_full, and now return the added child, like
+	the C functions do.
+
+	* examples/testgtk/testgtk.py: fixed up some stuff in the main
+	function and clist test.
+
+	* gtk.py, generate/gtkcontainers.defs: added
+	gtk_window_set_transient_for and gtk_window_set_default_size.
+
+	* gtkmodule.c: Changed to use _full functions instead of _interp
+	functions.  Also made gtk_signal_connect and friends use the
+	gtk_signal_connect_full function rather than the default marshaller
+	method.
+
+1998-12-07  James Henstridge  <james@daa.com.au>
+
+	* generate/gtkcontainers.defs (gtk_viewport_new): Accept NULL
+	arguments for adjustments of a viewport.  This is the correct
+	fix for Michael's other patch.
+
+	* examples/*/*.py: got rid of deprecation messages.  Put scrolled
+	windows round all clists.
+
+	* pyglade/build.py: Fixes a bug in scrolledwindow_new pointed out
+	by Michael Hudson.  Also made some changes so that it doesn't use
+	any deprecated functions.
+
+	* gtkmodule.c: fixed two typos pointed out by Michael Hudson
+
+1998-12-05  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c, generate/*.defs, gtk.py: updated to latest CVS.  This
+	includes the function name changes Tim Janik introduced.  I have
+	added backward compatibility wrappers for the old functions in gtk.py,
+	which also print out a deprecation message.
+
+1998-12-01  James Henstridge  <james@daa.com.au>
+
+	* gtk.py (GtkLayout): I had left a few remnants from when this class
+	was in gnome.ui.  This is now fixed.
+
+1998-11-29  James Henstridge  <james@daa.com.au>
+
+	* description.py: Added a description of the GtkCTreeNode type.
+
+	* gtk.py (GtkCTree): Added the GtkCTree class to this layer.
+	Hopefully I haven't made any mistakes.
+
+1998-11-28  James Henstridge  <james@daa.com.au>
+
+	* generate/gtklists.defs: added entries for GtkCTree.
+
+	* gtkmodule.c: Added the GtkCTreeNode type.  It exports some of the
+	attributes of the GtkCTreeRow associated with the node.  Specifically,
+	the parent, next sibling links, and a list of children.  This should
+	be enough attributes to make the type useful.
+	Also added extra functions for GtkCTree.
+
+1998-11-27  James Henstridge  <james@daa.com.au>
+
+	* generate/gtk*.defs: updated for GTK+-1.1.5.
+
+	* gtkmodule.c: added the PyGtk_RegisterBoxed function, exported through
+	the _private dictionary.  This allows adding extra boxed types so they
+	will be recognised in signal handlers and the like.
+
+	* gtk.py: this file used to be Gtkinter.py.  People should make this
+	change in their programs.  Also updated for changes to the API.
+
+	* Gtkinter.py: new file.  Simply does a "from gtk import *", so old
+	programs will still run properly.
+
+	* examples/*/*.py, pyglade/*.py, GdkImlib.py, GtkExtra.py: changed
+	occurences of Gtkinter to gtk.
+
+1998-11-17  James Henstridge  <james@daa.com.au>
+
+	* GdkImlib.py: missed a closing parenthesis.  This caused problems.
+
+	* generate/gtk.defs(gtk_rc_add_*_style): removed these functions.
+	They weren't exported by Gtkinter, and their declaration has changed
+	in newer GTK+'s.  Now pygtk should compile with both GTK+-1.1.3 and
+	CVS GTK (tested for a 1998-11-16 checkout).
+
+	* configure.in, NEWS: bumped version up to 0.5.5, and made new release.
+
+	* generate/gtkmisc.defs, Gtkinter.py: added the GtkCalendar widget.
+
+1998-11-15  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: added GdkCursor type.
+
+	* gtkmodule.c(GdkWindow.set_cursor): function to set cursor for window
+
+	* generate/gtk.defs (gtk_cursor_*): new functions to create cursors
+
+	* gtkmodule.c(gtk_pixmap_create_from_xpm_d): new function to create
+	a GdkPixmap from a list of strings (XPM data).  This allows you to
+	store pixmaps inline with your program for distribution.
+
+	* gdkimlibmodule.c: export the GdkImlibImageType, and a _private
+	dictionary that holds exported functions.  I should be able to
+	add the GdkImlibImage dependent functions to _gnomeui now.
+
+	* GDK.py, GTK.py: updated with new constants.
+
+	* examples/simple/*1.py: stopped importing _gtkbase, and don't call
+	_gtk.pygtk_init().
+
+	* pyglade/build.py: added menu widgets to the interface building code.
+
+	* pygtk.spec: new file -- an RPM spec file for this package.
+
+	* NEWS: add information about this new version.
+
+1998-11-15  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: added GdkAtom handling.  There is now a special type for
+	GdkAtoms that can be cast to string and int with str() and int()
+	respectively, and it supports coercions, so it should act like an
+	int in most cases.  Functions that take GdkAtom's as arguments
+	actually take ints, so backward compatibility is kept, but functions
+	that return GdkAtoms now return this special type.
+
+	* gtkmodule.c, generate/gtkdnd.defs, Gtkinter.py: added the new DnD
+	code, and support for selections.  The gtk_selection_* functions have
+	been mapped to GtkWidget.selection_*, and the gtk_drag_* functions
+	have been mapped to GtkWidget.drag_*
+
+	* GdkImlib.py: added function create_image_from_data, so you can
+	create an image from raw RGB data.  Also added the Image.get_pixmap
+	method, which is like Image.make_pixmap, except it returns the
+	GdkPixmap,GdkBitmap pair, instead of a GtkPixmap widget.
+
+1998-11-14  James Henstridge  <james@daa.com.au>
+
+	* generate/*.defs: changes to bring pygtk up to date with GTK+-1.1.3
+
+1998-11-13  James Henstridge  <james@daa.com.au>
+
+	* gtkmodule.c: added wrappers for GdkDragContext and GtkSelectionData.
+	Also removed all the old DnD GdkEvent mappings, and added the
+	GdkEventDND mapping.  This should be enough to get the new Dnd signals
+	working.
+
+	* generate/gtkbase.defs, gtkmodule.c(_wrap_gtk_widget_dnd_*): removed
+	the old gtk_widget_dnd_* functions from the bindings.
+
+1998-11-10  James Henstridge  <james@daa.com.au>
+
+	* build system: Converted over to using automake.  Note thay some
+	modifications have been made to the original version of automake,
+	so you will need to apply my patches if you want to modify pygtk.
+
+	* swigsrc/*: removed.  I am now using some code generation tools
+	that take .defs files as input.
+
+	* gdkimlibmodule.c: got rid of all the swig stuff, and cleaned up the
+	code a bit.  This has reduced the source code size by half.
+
+1998-11-10  James Henstridge  <james@daa.com.au>
+
+	* ChangeLog: started change log.  Old Changelog file has been moved
+	to NEWS
+
+	* NEWS: used to be Changelog
+
Index: pkg/pygtk/branches/upstream/current/COPYING
===================================================================
--- pkg/pygtk/branches/upstream/current/COPYING	(revision 4)
+++ pkg/pygtk/branches/upstream/current/COPYING	(revision 4)
@@ -0,0 +1,513 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
Index: pkg/pygtk/branches/upstream/current/pangocairomodule.c
===================================================================
--- pkg/pygtk/branches/upstream/current/pangocairomodule.c	(revision 4)
+++ pkg/pygtk/branches/upstream/current/pangocairomodule.c	(revision 4)
@@ -0,0 +1,70 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   pangomodule.c: module wrapping the Pango library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+#include <Python.h>
+#include <pygobject.h>
+
+#include <pango/pangocairo.h>
+#include <pycairo.h>
+
+/* include any extra headers needed here */
+
+void pypangocairo_register_classes(PyObject *d);
+void pypangocairo_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pypangocairo_functions[];
+extern PyTypeObject PyPangoCairoContext_Type;
+extern GType pypango_layout_line_type;
+
+Pycairo_CAPI_t *Pycairo_CAPI;
+
+
+DL_EXPORT(void)
+initpangocairo(void)
+{
+    PyObject *m, *d;
+
+    /* perform any initialisation required by the library here */
+
+    m = Py_InitModule("pangocairo", pypangocairo_functions);
+    d = PyModule_GetDict(m);
+
+    Pycairo_IMPORT;
+    if (Pycairo_CAPI == NULL)
+        return;
+
+    PyPangoCairoContext_Type.tp_base = &PycairoContext_Type;
+    if (PyType_Ready(&PyPangoCairoContext_Type) < 0) {
+        g_return_if_reached();
+    }
+    init_pygobject();
+
+    pypangocairo_register_classes(d);
+
+    Py_INCREF(&PyPangoCairoContext_Type);
+    PyModule_AddObject(m, "CairoContext", (PyObject *)&PyPangoCairoContext_Type);
+
+    pypango_layout_line_type = g_type_from_name("PangoLayoutLine");
+}
+
Index: pkg/pygtk/branches/upstream/current/MANIFEST.in
===================================================================
--- pkg/pygtk/branches/upstream/current/MANIFEST.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/MANIFEST.in	(revision 4)
@@ -0,0 +1,11 @@
+exclude atk.c pango.c gtk/gtk.c gtk/gdk.c gtk/libglade.c
+include ChangeLog AUTHORS COPYING MAPPING NEWS README THREADS TODO
+include MANIFEST.in
+include pygobject.h  pygobject-private.h
+include *.defs *.override
+include pygtk.py pygtk-2.0.pc.in
+include dsextras.py
+recursive-include gtk *.override *.defs *.h
+recursive-include codegen README.defs *.py pygtk-codegen-2.0.in 
+recursive-include examples README *.py *.xpm 
+global-exclude */CVS/* .cvsignore
Index: pkg/pygtk/branches/upstream/current/NEWS
===================================================================
--- pkg/pygtk/branches/upstream/current/NEWS	(revision 4)
+++ pkg/pygtk/branches/upstream/current/NEWS	(revision 4)
@@ -0,0 +1,1086 @@
+pygtk-2.10.4 4-februrary-2007
+    - Documentation build fixes (John Finlay, Gustavo)
+    - Return NULL on error in TextBuffer.register_serialize_format 
+      (Paolo Borelli)
+    - Do not overwrite sys.argv (JP Calderone)
+    - Add status icon example (Nikos Kouremenos)
+    - Make it possible to remove rows in the gtk.TreeModel.foreach 
+      callback (Gustavo)
+    - Code generator fix for %define (#381389, Manish Singh)
+    - Duplicate GdkEvent.string member when setting it (#382428,
+      Gustavo, John Ehresman)
+    - Make it possible to use automake 1.10 (Kjartan Maraas)
+    - distutils build fixes (#385934, Sebastien Bacher, Michael Bienia)
+    - Allow None to be passed into gdk.Display (Johan)
+    - Undeprecate gtk.container_class_list_child_properties (Johan)
+    - Fix memory leak in gtk.Container.child_get (Gian Mario Tagliaretti)
+
+pygtk-2.10.3 3-october-2006
+    - Fix a crasher bug introduced in 2.10.2 (Gustavo)
+    - Make PyGTK work with Python 2.5 and 64-bit (#337368, Gustavo)
+      (when used in conjunction with the soon-to-be-released PyGObject 2.12.2)
+
+pygtk-2.10.2 3-october-2006
+    - distutils / win32 compilation fixes (Cedric Gustin)
+    - gtk.TreeSelection.selected_foreach bug fix (#347273, Gustavo)
+    - Fix compilation older C compilers (John Ehresman)
+
+pygtk-2.10.0 4-september-2006
+    - Issue a warning when a DISPLAY is not set (#316877, Johan, Jeremey Katz)
+    - Copy style.css from pygobject docs when installing docs.
+      (#351385 Gian Mario Tagliaretti)
+    - Include the built docs in the tarball (Johan)
+
+pygtk-2.9.6 8-august-2006
+    - GtkTreePath can be converted from integers again (#350252, Gustavo,
+      Sebastien Bacher)
+    - Fix parallel build (#350225, Ed Catmur)
+    - Reduce exception abuse in code generator (Gustavo)
+    - Documentation improvements (Johan, John)
+
+pygtk-2.9.5 6-august-2006
+    - Make it possible to build with GTK+ 2.10 (#350008, Joseph Sacco)
+    - Make sure dir(gtk.keysyms) work again (#349892, Johan, John)
+    - reloading the gtk module works again (#349026, Johan, Alexander Larsson)
+
+pygtk-2.9.4 4-august-2006
+    - Include John Finlay's PyGTK reference manual (Johan, John)
+    - Setters and getters for GtkWidget.activate_signal (#331445, Gustavo)
+    - GtkToolItemType setter/getter (#331355, Gustavo)
+    - Code generator fixes (Gustavo, Johan, John, Yevgen Muntyan, Gustavo)
+    - Add more gtk+ 2.10 API (#337011, John, Sebastian Pölsterl)
+    - Don't copy treeiters in callbacks (#347273, John, Stefano Maggiolo)
+    - Provide full information for GtkTreeSelection.set_select_function 
+      (#340475 John, Wouter Bolsterlee)
+    - Export less symbols and reduce the size of the libraries (#347825,
+      Rafael Espíndola)
+    - Allow negative values for GtkTreeModel.set/getitem (#311852, Baiju M)
+    - Much improved interface/virtual method support (John)
+    - Remove evil 100ms timeout timer (#348937, Gustavo)
+
+pygtk-2.9.3 12-july-2006 
+    - Update to latest gtk+ 2.10 API changes (#345447, #345623, Newren, Peters)
+    - Many more new gtk+ 2.10 APIs wrapped (Finlay)
+    - Wrap gtk_widget_class_find_style_property (Finlay)
+    - gtk.gdk.CairoContext.rectangle bug fix (Gustavo)
+    - Update defs for atk 1.8 (Finlay)
+    - Misc. module cleanups (Dahlin)
+    - New pango APIs wrapped (Finlay)
+    - Fix refcount error in gtk.Clipboard (#343960, Gustavo, Finlay)
+    - Enable GDK X11-specific APIs available also with gtk+ 2.8 (Gustavo)
+    - Lazy loading of the gtk.keysyms module (Johan Dahlin)
+
+pygtk-2.9.2 15-june-2006
+    - Fix a codegen bug that prevent build of other extensions (344845, Gustavo)
+    - Builds with pycairo 1.1.6 (344957, Gustavo)
+    - gtk.TextBuffer rich text copy and serialization (Finlay)
+    - Correct Print Editor example (Gustavo)
+
+pygtk-2.9.1 13-june-2006
+    - Allow gtk.TreeSortable.set_default_sort_func callback to be None
+      (Johan, Patrick O'Brien)
+    - Add API to unset the g_log handlers (#323786, Johan)
+    - Allow the gtk module to be imported without DISPLAY (#316877, Johan)
+    - Code cleanup and fixes considering Coverity reports (Johan)
+    - Add codegen support for const-Object return type (#169204, Gustavo)
+    - Add codgen support for unblocking threads around method calls (Gustavo)
+    - Wrap gdk_event_handler_set (Johan)
+    - Codegen reverse wrapper bug fix (#340162, Yevgen Muntyan)
+    - Wrap GdkRegion (John Ehresman)
+    - Add codegen support for ignore-type statement in override (Johan)
+    - Add conditional support for gtk+ 2.10 API, especially printing
+      (Johan, Finlay, Gustavo)
+    - Complete the support for gtk.Container virtual methods (#341641, Gustavo)
+    - Fix misc. reference leaks (Finlay, Gustavo)
+    - Allow None parameter in pangocairo.CairoContext.set_font_options (Finlay)
+    - Complete the support for gtk.CellRenderer virtual methods (#339431, Gustavo)
+    - IconView.set_cursor method params 'cell' and 'start_editing'
+      made optional (#343039, Ross Burton, Finlay)
+    - Wrap a few more gdk_cairo_* methods (Finlay)
+    - Add a 'selection' field to gdk.OWNER_CHANGE events (Finlay)
+    - Allow None in gtk.Entry.set_inner_border() (Finlay)
+    - gtk.Clipboard rich text methods (Finlay)
+    - Add gtk.MessageDialog.set_image() (Finlay)
+    - Wrap gtk_link_button_set_uri_hook() (Finlay)
+    - Allow None in gtk.Widget.input_shape_combine_mask() (Finlay)
+    - Allow gtk.LinkButton() constructor to optionally receive a label (Finlay)
+    - Allow None in gtk.Label.set_mnemonic_widget() (Johan)
+    - Wrap a bunch of X11 specific gdk methods (Gustavo)
+    - Add gtk.SizeGroup.get_widgets() (Finlay)
+    - Wrap gtk_style_lookup_color() (Finlay)
+    - Wrap a bunch of gtk treeview grid lines methods (Finlay)
+    - Better Drag and drop API support (Finlay)
+    - Add -I option to codegen (defs search path) (Gustavo)
+
+pygtk-2.9.0 04-april-2006
+    - Remove gobject, pygobject is now a hard dependency
+    - Set encoding in pango instead of gtk (328031)
+    - Wrap gdk.Screen.get_rgba_colormap/get_rgbma_visual (328996,
+      Marco Cabizza)
+    - Remove private gtk wrappers (321476)
+    - Add a bunch of missing wrappers (316881, John Finlay)
+    - Add inout support in reverse wrappers (335964, Gustavo)
+    - Update h2defs to allow whitespace before parenthesis (317124)
+    - Make it possible to reimplement interfaces (334986, Gustavo)
+    - Allow log_handler to be called when python is not initialized
+      (334188, Gustavo)
+    - Support for const object args (wollny@cbs.mpg.de, Gustavo)
+    - Export pygtk tree model api (318021, Gustavo)
+    - Allow overrides to be in base classes (327715, Gustavo)
+    - Wrap a pango cairo font options acecssors (328108,
+      Rauli Ruohonen)
+    - Add GDK_PARENT_RELATIVE relative handling (320248, Johan,
+      Nikos Kouremenos)
+    - Improve pixbuf demo (327931, Ben Caradoc-Davies)
+    - Set default markup accel marker to \x00
+      (329658, Johan, Johan Svedberg)
+    - Set 1 as default argument to SpinButton.spin() (325452,
+      Sebastian Rittau)
+    - Wrap gdk.Drawable.gdk_draw_indexed_image (333431,
+      Johan, Hamish Moffatt)
+    - Mark rowreference.free() as deprecated (309811, Gustavo)
+    - Rename name of first keyword argument to pango.LayoutLine.index_to_x
+      (316581, Gustavo, John Finlay)
+    - Run reindent on all python code (325320, Johan)
+    - Improve generictreemodel example (311459, Steven Kennedy)
+    - Wrap gdk.Pixbuf.rotate_simple (314164, Karel Vervaeke)
+    - Use in argument in gtk.TreeView.cell_get_size (326357, John Ehresman)
+
+pygtk-2.8.5:  30-march-2006
+    - String list bug fix (Christopher Aillon)
+    - Improved examples (Johan)
+    - Proper refcounting in gdk.Window constructor (John Ehresman)
+    - Fix a bunch of reference leaks (Gustavo)
+    - __init__.py fixes for pydoc (Johan)
+    - gtk.Dialog.new_with_buttons leak (#332771, Gustavo)
+
+pygtk-2.8.4:  11-january-2006
+	- Re-include gobject wrappers if pygobject is not found (Gustavo, Johan)
+	- gtk.IconView should implement GtkCellLayout (Johan)
+	- Always install pygtk-2.0.pc
+
+pygtk-2.8.3:  09-january-2006
+	- Split out gobject wrappers into a separate module and
+          depend on pygobject 2.9.0 (Johan)
+        - Bug fixes (Bob Gibbs, Johan, Gustavo)
+	- Size group example (Johan)
+	- Plug mem leaks (Gustavo)
+	- Build cairo on win32 (Cedric) 
+
+pygtk-2.8.2:  09-october-2005
+	- GIOChannel thread fix (Johan, Ole Andre Vadla Ravnås)
+
+pygtk-2.8.1:  03-october-2005
+        - Bug fixes (Gustavo, Johan)
+        - Improve exceptions when registering properties (Gustavo)
+        - Extend warnings (John Ehresman)
+	- Raise exception when working on uninitialized objects (Johan)
+        - Plug libglade leak (Gustavo)
+        - Undeprecate a few gobject functions (Johan)
+        - UINT64 buf fixes (Gustavo, Johan)
+        - GCC 4.0 warnings (Johan)
+
+pygtk-2.8.0:  03-september-2005
+        - GObject metaclass bugfix (John Ehresman)
+        - Double free fix in type_register (Gustavo)
+        - Make it buildable srcdir != buildir (Johan)
+        - Improve GdkRectangle conversion (Tim Evans, Gustavo)
+        - Use automake 1.8 (Johan)
+
+pygtk-2.7.4:  24-august-2005
+	- Container.do_forall implementable in subclasses (Johan)
+	- Bug fixes (John Finlay, Christian Persch, Christopher Allion, 
+                 Johan, Gustavo)
+	- Build fixes (Stepan Kasal, John Ehresman, Johan)
+
+pygtk-2.7.3:  10-august-2005
+        - Build fixes (Johan)
+	- Code generator fixes (Gustavo)
+	- Bug fixes (Johan, Andy, Gustavo)
+
+pygtk-2.7.2:  02-august-2005
+	- Subclass/type registration bug fixes (Gustavo)
+	- Allow gobject to be initialized twice (Yevgen Muntyan)
+	- Deprecating warning bug fixes (Mark McLoughlin) 
+	- Bug fixes (Sebastien Bacher, Gustavo, Johan, Manish)
+
+pygtk-2.7.1:  21-july-2005
+	- Update API to Gtk+ 2.7.3 (Johan)
+	- Threading, Enum fixes (Johan
+	- Registration fixes (Gustavo)
+	- Make use of atomic ref counting in glib (Johan)
+
+pygtk-2.7.0:  10-july-2005
+	- GIOChannel wrapper (Gustavo, John Ehresman, Manish)
+	- GSource wrapper (Manish)
+	- Allow creation of python classes through gobject.new (Gustavo,
+          John Ehresman, Benjamin Otte)
+	- Improved GObject property support (Gustavo, Iñaki, Johan)
+	- Improved ParamSpec wrapping (Johan)
+	- Add gdkcairo and pangocairo wrapping, depends on pycairo (Gustavo)
+	- 2.8 API updates (Johan)
+	- Add GObject metaclass, making type_register unnecessary (Gustavo)
+	- C++ compilation fixes (Manish)
+	- Handle longs/ints better (Gustavo)
+	- Support new GType fundamentals (Edward Hervey, Johan)
+	- Improved GType wrapping (Johan)
+	- Support for specifying GType name (Johan)
+	- GtkContainer iterator support (Johan)
+	- Support for subclasses that implements scrolling (Gustavo, Johan)
+	- Bug fixes/Misc fixes (Steve Chaplin, Tim Evans, John Finlay, 
+          Cedric Gustin, Edward Hervey, Christian Kirbach, Tuure Laurinolli, 
+          Benjamin Otte, Manish Singh, Gian Mario Tagliaretti, 
+          Fernando San Martin Woerner)
+
+pygtk-2.6.2:  9-may-2005
+	- Allow None to be sent in to set_group radio widgets (Johan, Lorenzo)
+	- guint/gsize as longs (Gustavo)
+	- Check for exceptions in child_watch (Mark McLoughlin)
+	- Bug fixes (Johan, Manish Singh, John Finaly)
+    
+pygtk-2.6.1:  15-march-2005
+	- GtkListStore.insert optimization (Johan)
+	- GtkTreeStore/GtkListStore.reorder leak fix (Johan, Richard Hult)
+	- GParamSpec bug fix (Johan)
+	- Code generator improvements (Anders Carlsson, Johan, Doug Quale)
+	- GCC4 build fixes
+	
+pygtk-2.6.0:  07-march-2005
+	- win32 fixes (Cedric Gustin)
+	- remove unnecessary casting (Manish Singh)
+	- updated examples (Johan)
+
+pygtk-2.5.4:  23-february-2005
+	- Much improved GMainloop support (Mark McLoughlin)
+	- Install pygtk-demo (Gustavo)
+	- Deprecate gtk.TRUE/gtk.FALSE (Johan)
+	- win32 build fixes (Cedric Gustin)
+
+pygtk-2.5.3:  23-january-2005
+	- Revert some threading changes (Gustavo)
+	- Build improvements (Johan)
+	- Improve pixmap functions (John F)
+	- GObject type registration fixes (Gustavo)
+	- Code generator fixes (Johan, Gustavo)
+	- Plug mem leaks (Mark McLoughlin)
+	- Flag/Enum bug fixes (Gustavo)
+
+pygtk-2.5.2:  10-january-2005
+	- Improved deprecation messages (Johan)
+	- gtk.idle_add, gtk.timout_add, and others are now
+	  deprecated (Johan)
+	- Overriding GTK+ virtual methods (Gustavo)
+	- Interfaces now implementation (Gustavo)
+	- 2.6 merge (Johan, Gian Mario Tagliaretti)
+	- Bug fixes (Adam Hooper, John Finlay, Gustavo, Johan, Tim Evans)
+	- Build system improvens (Johan)
+	
+pygtk-2.5.1:   23-december-2004
+	- Remove API removed in Gtk+ 2.6.0 (Gustavo, Johan)
+	- Implement pango.LayoutIter (John)
+	- Build fixes (Johan, Marco Pensenti Gritti)
+	- Update examples (Alan Horkan)
+	- distutils/win32 fixes (Cedric Gustin)
+
+pygtk-2.5.0:   29-november-2004
+	- Port to Gtk+ 2.5.x (Johan, John)
+	- Code generator improvements (Gustavo)
+
+pygtk-2.4.1:   04-november-2004
+	- Bug fixes (Johan, Gustavo, John Finlay)
+	- Allow the headers to be parsable by a C++ compiler
+	- Updated examples (Johan, John)
+pygtk-2.4.0:   03-october-2004
+	- Updated examples (John Finlay)
+	- Tiny threading bug fix (John Ehresman)
+
+pygtk-2.3.97:  28-september-2004
+	- Threading fixes (Gustavo, Johan, John E)
+	- Other bug fixes (Gustavo, James, Johan, John, Ehresman,
+                           John Finaly, Owen Taylor and Xaiver Ordoquy)
+	- x86_64 build fixes (Jonathan Blandford)
+	- Updated examples (John Finlay)
+
+pygtk-2.3.96:  06-august-2004
+	- Threading fixes (Johan, Gustavo)
+	- Bug fixes (John, Johan, Gustavo)
+	- GEnum/GFlags wrapping improvements
+	- GdkAtom string wrapping (John)
+	- Better boolean support (since we now can require 2.3)
+
+pygtk-2.3.95:  02-august-2004
+	- Flags/Enum fixes (John, Johan)
+	- Bug Fixes (John, John E, Johan, Gustavo)
+	- Improved threading support (Johan)
+
+pygtk-2.3.94:  21-july-2004
+	- bug fixed (Gustavo, Johan, John, Lorenzo)
+	- small enum additions for gazpacho (Johan)
+	- rename GMainLoop, GMainContext back to MainLoop and MainContext
+ 
+pygtk-2.3.93:  19-july-2004
+	- GtkTreeView updates (John Finlay)
+	- New examples (Johan)
+	- GEnum/GFlags wrapping (Johan)
+	- New (using g_object_new) constructors (Gustavo)
+	- GParamSpec API, for GtkWidget and GtkContainer (Johan)
+	- Unichar/Unicode support (Lorenzo, John Ehresman)
+	- Widget subclassing (Johan, Gustavo, Lorenzo)
+	- GdkEvents changable (Johan)
+	- Warnings (Gustavo, Johan)
+	- Many bugfixes (John Finlay, John Ehresman, Johan, Lorenzo, Gustavo)
+	- Win32/FreeBSD/distutils build fixes (John, Johan)
+
+pygtk-2.3.92:  22-may-2004
+	- Deprecate old function (John Finlay)
+	- Add missing 2.4 api for pango, gdk and gtk (John Finlay):
+	  PangoAttrList, PangoFontset, PangoFontFamily, 
+          GdkWindow, GdkPixbuf, GdkPixbufLoader, GtkClipboard, 
+          GtkTreeView, GtkTreeModel, GtkToolbar
+	- Reference counting fixes (John)
+	- gobject type registration improvements (Gustavo)
+
+pygtk-2.3.91:  16-april-2004
+	- Continue to wrap 2.4 api: GtkActionGroup,
+          GtkColorButton, GtkCellLayout, GtkComboBox, GtkFileChooser,
+          GtkFontButton, GtkIconInfo, Gtk*ToolButton (John Finlay, Johan)
+	- ref GdkWindows on win32 (John Ehresman, Gustavo)
+	- Clean up defs (John)
+	- Deprecate 0.6.x compatibility functions (Johan)
+	- Convert GValueArray to list, not tuple (Gustavo)
+	- Add new demos (Joey Tsai)
+	- Create unknown types on the fly, with interfaces (Johan)
+	- Update spec (Jason Tackaberry, Thomas Vander Stichele)
+	- Support tp_new (Johan)
+
+pygtk-2.3.90:  30-march-2004
+	- Merge in changes for Gtk+ 2.4 (Johan, Xavier)
+	- GtkUIManager, GtkFileChooser, GtkTreeModelFilter,    
+          GtkActionGroup, GtkAction, GtkToolbar etc  
+	- Export GParamSpec in GObject and support style properties  
+	- Distutils win32 fixes (Cedric Gustin)  
+	- Fix mainloop related warnings (bug 136731, bug 136705)  
+	- Updated examples (Johan)  
+	- gdk.atom_intern (Gustavo)  
+	- Code generator fixes (Xavier)
+
+pygtk-2.2.0:  11-march-2004
+	- Added support for GTK+ 2.2 APIs, GdkDisplay, GdkScreen,
+          GdkClipboard and GtkWindow (James)
+	- Better and more flexible support for TreeModel and TreeView API
+          (Don Allingham, Benjamin Cama, John Ehresman, Johan,
+           jkluebs@luebsphoto.com)
+	- Better support for gtk.gdk.Pixbuf integration with 
+          Numerical arrays (Tim Evans)
+	- Better support for Pygtk generation tools (codegen, m4 macros, 
+          h2def, Makefile.am ...) (James, Jon Willeke, Xavier, Johan)
+	- Removed gtkgl bindings (James)
+	- Added gtk.gdk.Eventkey.hardware_code (Johan)
+	- Added gtk.binding_entry_remove and gtk.accel_group_connect (Gustavo)
+	- Don't allow reading non readable properties (James)
+	- And lots of bug fixes: gdk.event_get_axis (Seth Nickell), 
+          distutils (Alif Wahid), mem leaks, gtk.Menu.popup (Gustavo)
+
+pygtk-2.0.0:  1-September-2003
+	- Roll version number over to 2.0.
+	- Small fix to gtk.TextView.set_border_window_size() method.
+	- Miscelaneous bug fixes.
+
+pygtk-1.99.18:  24-August-2003
+	- Fix up a duplicate symbol bug in the atk module, that was
+	  causing build problems on MacOS X (hopefully the last such
+	  problem).
+	- add gtk.glade.set_custom_handler() API, that provides more
+	  info to the custom widget callback.  Deprecate
+	  set_custom_widget_callbacks().
+	- some other bug fixes.
+
+pygtk-1.99.17:  31-July-2003
+	- Threading support is compiled in by default now.  It is
+	  necessary to call gtk.threads_init() in order to make use of
+	  threading though.  There have been a number of fixes to the
+	  threading support too.
+	- Fix up some problems with multiple definitions of global
+	  variables in gobject module, that was causing problems on
+	  Mac OS X.
+	- Wrappers for many new APIs (John Finlay, Naofumi Yasufuku,
+	  Johan Dahlin and others).
+	- Improvements to the code generator to give better error
+	  messages.
+	- Some fixes to property APIs to work correctly on 64 bit
+	  systems, and to handle ATOM type properties.
+	- Fix copyright headers on source files.
+
+pygtk-1.99.16:  23-March-2003
+	- various new functions wrapped.
+	- More threding fixes (Jon Trowbridge)
+	- Reworking of the single instance per GObject code to work
+	  better with the Python cycle GC.
+	- more updates to the simplified Python tree model API.
+	- fix error handling in constructors for GtkTreeStore and
+	  GtkListStore.
+	- add some inline comments for the APIs for extending pygtk to
+	  handle other widget sets.
+
+pygtk-1.99.15:  08-February-2003
+	- distutils support
+	- Code generator improvements (Jeremy Katz)
+	- Threading fixes (Lots of people)
+	- API additions to GtkTextBuffer, GtkTextView and GtkFileSelection
+	- GMainLoop/GMainContext support, you can now run input_add, 
+	  timeout_add without importing gtk.
+	- libglade now support passing in an instance to signal_autoconnect
+	- pygtk.py import speedup.
+	- Many many bugs fixed.
+
+pygtk-1.99.14:  27-December-2002
+	- update to newer auto-tools (autoconf-2.57, automake-1.7.2,
+	  libtool-1.4.3).
+	- many bug fixes and additions of missing APIs.
+	- fix doc generation scripts to match the new style of gtk-doc
+	  documentation.
+	- make code generator return either Py_True or Py_False for
+	  boolean return functions.  This change is only noticable
+	  with Python 2.3 alphas.
+	- removal of wrappers for deprecated functions where the
+	  deprecated method shadowed the replacement.
+	- wrappers for idle_add, timeout_add, io_add_watch and
+	  source_remove to gobject module.  Compatibility names are
+	  provided in the gtk module.
+	- Many tree and text view wrapper updates from Johan Dahlin and
+          John Finlay.
+	- leak fixes.
+        - Updated examples, including demo for editable cells.
+        - Improved threading support.
+        - Api additions for GdkEvents, TreeSelection, GtkTooltips, libglade,
+          GtkContainer.
+        
+pygtk-1.99.13:  24-August-2002
+	- Support parallel install with pygtk >= 0.6.10
+	- fix initial reference handling for derived GObjects.  This
+	  also uncovered a few other reference leaks.
+	- Other reference leak fixes from Arjan.
+	- Support building out of the box on windows with mingw32 from
+	  Cedric Gustin.
+
+pygtk-1.99.12:  23-July-2002
+	- more win32 compat updates.
+	- simple tree model interfaces added.
+	- added generic cell renderer type.
+
+pygtk-1.99.11:  10-July-2002
+	- int64/uint64 arg handlers in code generator.
+	- some reference leak fixes.
+	- get signal handlers to participate in cyclic garbage
+	  collection (thanks to Arjan Molenaar).
+	- correctly reset LC_NUMERIC to "C" when initialising the gtk
+	  module.
+
+pygtk-1.99.10:  13-May-2002
+	- support new arg types in code generator.
+	- handle (caller-owns-return) in code generator.
+	- add gtk.compat module that provides similar naming to gtk
+	  1.2 modules.
+
+pygtk-1.99.9:  23-April-2002
+	- Some win32 compatibility fixes merged in from Hans.
+	- update defs file to match final gtk 2.0 APIs.
+	- added gtk.gl wrapper.
+	- refactored code generator, fixing a number of bugs in the
+	  process.
+
+pygtk-1.99.8:  18-March-2002
+	- Implement lots of stuff in Pango module.
+	- make class names include module name so that help() output
+	  looks nicer.
+	- lots of other functions added.
+
+pygtk-1.99.7:  31-January-2002
+	- add (broken) threading support.  Will need fixing one day.
+	- make safe for use with PyMalloc.
+	- split gobjectmodule.c into a number of files.
+
+pygtk-1.99.6:  24-December-2001
+	- add scripts for generating documentation for pygtk.
+	- add __gsignals__ and __gproperties__ sepcial class
+	  attributes for defining new signals and properties for an
+	  object.
+	- better support for GError.
+	- start of ATK wrapper (msw).
+
+pygtk-1.99.5:  26-November-2001
+	- lots of updates.
+
+pygtk-1.99.4:  29-October-2001
+	- fix up GObject last ref handling for derived types.
+	- other fixes.
+
+pygtk-1.99.3:  9-October-2001
+	- Rename the PyGtkTreeModel to PyGtkGenericTreeModel to avoid
+	  name conflicts.
+	- many method wrappers added.
+	- more reference fixes.
+	- adjust code generator so that it outputs #line directives.
+	- move defintions of types (as opposed to functions/methods)
+	  to separate files to improve compilation speed.
+
+pygtk-1.99.2:  29-September-2001
+	- switch from ExtensionClass to use Python 2.2's type/class
+	  unification.
+	- require Python 2.2a4
+
+pygtk-1.99.1:  20-September-2001
+	- always use the GType wrapper type to represent GTypes,
+	  rather than using ints.
+	- automatically populate modules with constants via
+	  introspection.
+	- Switch from gtk.GtkFoo naming to gtk.Foo.
+
+pygtk-1.99.0:  10-September-2001
+	- First cut tarball for 2.0 branch.  Lots and lots of changes
+	  (since branching in April 2000).
+	- Uses ExtensionClass, and implement GObject wrappers in C
+	  code, rather than the two stage wrapper like the 1.2 branch.
+
+
+---- GTK-1.2 branch ----
+
+pygtk-0.6.11:  23-August-2002
+	- Fix up libtool patch for older binutils'.
+	- a few bug fixes in some GtkWidget methods.
+
+pygtk-0.6.10:  22-August-2002
+	- Fix up segfaults when using with a Python compiled with
+	  pymalloc.
+	- various new wrapper functions added.
+	- Raise exception if gtk_init() fails.
+	- bug fixes.
+	- Support parallel install with PyGTK 2.0.
+
+pygtk-0.6.9:  3-Janyary-2002
+	- always check the return value of functions for NULL values.
+	  This fixes a number of problems which caused crashes on
+	  exit.
+	- add pygt_version and gtk_version variables.
+	- update to autoconf-2.52/automake-1.5
+	- many bug fixes (see ChangeLog).
+
+pygtk-0.6.8:  23-April-2001
+	- bug fixes to GtkNotebook, GtkCList.
+	- add some missing methods to GtkWidget
+	- a gdk-pixbuf wrapper module.
+	- install the code generator, so that other wrappers can use
+	  it as well.
+
+pygtk-0.6.7:  16-February-2001
+	- added --disable-thread configure argument to turn off thread
+	  support even when compiling with a threaded python.
+	- resets LC_NUMERIC back to "C" after calling gtk_set_locale,
+	  as this is the standard setting for python, no matter what
+	  the locale.
+	- various other bug fixes.
+
+pygtk-0.6.6:  7-April-2000
+	- switched over to using the CVS version of automake rather than
+	  my `pyautomake' patches, as CVS automake now has the python
+	  support integrated.  Libtool is now used to build the extensions,
+	  so if there are problems on your platform, it is a libtool
+	  problem :)
+	- typo fixes.
+	- new pointer_(un)grab and keyboard_(un)grab methods for GdkWindow.
+
+pygtk-0.6.5:  13-March-2000
+	- more reference leaks fixed.
+	- crashes when changing window properties with 16 or 32 bit data
+	  formats fixed.
+	- some libglade wrapper fixes.
+	- various other fixes.
+
+pygtk-0.6.4:  16-February-2000
+	- gnome-python now requires python >= 1.5.2, as it uses the 'N'
+	  format tag for PyArg_ParseTuple.
+	- Reference leak fixes.
+	- A few new features.
+
+pygtk-0.6.3:  30-September-1999
+	- if the new gnome-python is installed, the libglade module will load
+	  the gnome support.  Make sure you remember to import gnome.ui if the
+	  glade file contains any gnome widgets.
+	- New methods for GdkWindow objects -- lower, _raise (for stacking
+	  order manipulation) and input_get_pointer (for XInput stuff).
+	- A few other bugs have been fixed as well.  See ChangeLog for details.
+
+pygtk-0.6.2:  9-August-1999
+	- Threading should work correctly with multiple threads accessing
+	  GTK (assuming they use threads_enter/leave).  Thanks go to Matt
+	  Wilson and Paul Fisher for this code.
+	- A pygtk.h header file is now installed that should make it easier
+	  to write extensions to pygtk.
+	- There is now optional support for the gtkglarea widget and the
+	  libglade library now.
+	- There is support for gdkrgb functions for rendering rgb and greyscale
+	  image data to a drawable.
+	- Optional support for numpy arrays.  You can create a GdkImlibImage
+	  from a numpy array, and manipulate an image's data as an array.
+	  Also there is a gdk_draw_array wrapper that uses gdkrgb to render
+	  an array to a drawable.  The code for the imlib stuff is based on
+	  stuff submitted by Travis Oliphant.
+	- The GdkWindow type now has some methods for manipulating properties,
+	  and has an xid attribute for getting the X window ID of the window.
+	- idle_add and timeout_add can now pass extra parameters to the
+	  callback, like you can do for signals.  Also added a wrapper
+	  for signal handlers similar to gtk_signal_connect_object.
+
+pygtk-0.6.1:  22-May-1999
+	- Fixed a few bugs to do with the threading patches I applied in the
+	  last release.  Threading should now work correctly.
+
+pygtk-0.6.0:  25-April-1999
+	- updated for gtk+-1.2.1.
+	- You can now write multithreaded programs in python (if python was
+	  compiled with thread support enabled, of course).  This feature
+	  is thanks to Duncan Grisby <dgrisby@uk.research.att.com>.
+	  To use the multithreading, write your program as normal, but
+	  before calling any GTK routines from outside the GTK thread (ie.
+	  not from a signal handler or timeout/idle func), call threads_enter()
+	  before hand, and threads_leave() after.
+	- Various bug fixes.
+
+pygtk-0.5.11:  24-February-1999
+	- Updated for gtk+-1.1.16
+	- Changes to the style code, so that you can now write to the
+	  attributes.  There is also a copy() method, which can be used
+	  so you don't change the style on other objects.
+	- Some changes so some functions which are supposed to accept NULL
+	  arguments will accept None in place of a boxed/string/object
+	  argument.
+	- Added a file MAPPING that describes the mapping of GTK onto python.
+	- Various bug fixes.
+	- Pyglade XML parser made more robust.
+
+pygtk-0.5.10:  9-February-1999
+	- Updated for gtk+-1.1.14/15.
+	- Fixed up some selection problems.
+	- Added DnD example translated by Chi-Deok Hwang.
+	- Some ctree fixes.
+	- Some function renamings.
+	- more functionality in the pixmap creation routines (you can create
+	  a pixmap if you have a GdkColormap but no GdkWindow).
+	- added GdkWindow.depth attribute.
+
+pygtk-0.5.9:
+	- Updated for gtk+-1.1.9
+
+pygtk-0.5.8:  10-December-1998
+	- I made a mistake during building the last package.  I ran
+	  cvs co pygtk; aclocal; automake --add-missing; autoconf; configure
+	  followed by make dist.  Unfortunately, since there was no configure
+	  file when I ran automake, it didn't get added to the dist list.
+	- Updated the spec files to match new version.
+
+pygtk-0.5.7:  9-December-1998
+	- Updated for gtk+-1.1.6.  Probably not much will change between now
+	  and 1.2.
+	- Added GtkCTree, GtkLayout, GtkPlug and GtkSocket widgets.
+	- There has been a renaming of a number of commonly used functions.
+	  if you use gtk.py, the old names still work, but give a warning.
+	  To get a list of the name changes, see the file
+	  $(prefix)/include/gtk/gtkcompat.h
+	- signal connection now uses the gtk_signal_connect_full function,
+	  rather than relying on the default marshaller.
+        - The append, prepend and insert methods of the toolbar now return
+          the widget that was added, like the C equivalents do.
+
+pygtk-0.5.6:  27-November-1998
+	- Updated for gtk+-1.1.5.
+	- Renamed Gtkinter.py to gtk.py.  This follows the naming scheme of
+	  other modules more closely, and is easier for people who prefer to
+	  use "import ...".  It is also not a big change for people who
+	  use "from ... import *".  I have included a simple Gtkinter.py
+	  module for backward compatibility.
+	- Added a private function PyGtk_RegisterBoxed that can be used to add
+	  extra boxed types to the list of those registered in the callback
+	  marshals and the like.
+
+pygtk-0.5.5:  17-November-1998
+        - Fixed a small bug in GdkImlib that caused a syntax error (I should
+          have picked this up for the last release).
+        - Removed some function wrappers that are not used anywhere, in order
+          to get pygtk to compile cleanly on newer CVS GTK's.
+        - I forgot to include the wrappings for the new GtkCalendar widget in
+          the previous release.  It is in this one.
+
+pygtk-0.5.4:  15-November-1998
+        - updated for gtk+-1.1.3 (so you will need glib-1.1.4 as well).  This
+          release adds support for the new DnD functions, support for
+          selection (through the gtk_selection_* functions, which I have
+          mapped to GtkWidget.selection_*) and GdkAtoms, and support for
+          GdkCursors.
+        - To create a new cursor, use the cursor_new or cursor_new_from_pixmap
+          function, and then call the GdkWindow.set_cursor method to attach
+          it to a window.
+        - Added create_pixmap_from_xpm_d function that allows you to embed
+          XPM data into your program for easier distribution.
+        - Updated the GdkImlib module to the features found in imlib-1.8.
+        - Changed the build system, so SWIG is no longer needed.  Also now
+          using a modified version of automake to generate the makefiles.
+        - Updated the pyglade code to handle menus and the like.
+
+pygtk-0.5.3:  27-September-1998
+        - Updated for GTK+-1.1.2 (note that this version of gtk requires
+          glib-1.1.3).  This version adds the support for the tearoff menus
+          and keyboard navigation of menus (if you use item factory).
+        - This is the version of pygtk you will need for the pygnome wrapper
+          for gnome v0.30 (when I finish writing them).
+	- added events_pending function.  Now you can use code like:
+             while events_pending():
+                 mainiteration()
+          to be sure that a scrollbar has been updated.
+        - I have updated the examples/neil/*.py examples to use the
+          GtkItemFactory class.  This shows how to make keyboard navigable
+          menus.
+        - Fixed a typo in GtkWindow.set_focus
+        - Fixed signal handler wrapper, so that handlers that return GtkObject
+          classes get the return type converted back to the lower level
+          GtkObjects.  Also fixed _gtkbasemodule.c, so that return values from
+          signals get returned to GTK properly.  These fixes should allow
+          people to use the GnomeMDI wrappers in pygnome if you change
+          there signal definitions to use GTK_TYPE_OBJECT rather than
+          GTK_TYPE_POINTER (I will ask the author to make this change).
+
+pygtk-0.5.2:  31-August-1998
+        - fixed the ancestory for the GtkScrolledWindow class, fixed the
+          GtkPreview constructor.  Fixed some more spots in _gtkmodule.i
+          where I'd used int types instead of the correct enumeration.
+        - added the pyglade package.  This will allow you to put a bit of
+          code behind interfaces built with GLADE, which can be found at
+          http://www.comp.lancs.ac.uk/~damon/builder/index.html
+          In my current code, I have implemented most widgets on the
+          palette, although the .glade file reader is a bit fragile.  Note
+          that this package is not a code generator (yet).  It reads the
+          interface description and builds the interface at runtime.  This
+          way you can keep the interface separate from the implementation.
+          For an example of use, check the examples/glade directory.
+        - Added support for the GtkItemFactory.  Still no support for the
+          GtkCTree -- even if I did put in support for it, the signal
+          definitions define the GtkCTreeNode's as pointers, making it
+          almost useless.
+
+pygtk-0.5.1:  19-August-1998
+        - fix a small bug in configure script that prevented building.
+
+pygtk-0.5.0:  18-August-1998
+        - Updated for GTK+-1.1.1
+        - Replaced GtkAcceleratorTable with GtkAccelGroup.
+        - Made use of the GtkFlagInfo and GtkEnumInfo structures.  You can now
+          specify enum values by a string as well as by a number.  Flag values
+          can be given as strings, or as a tuple of strings or numbers that
+          are ORed together.
+        - Added GtkAccelLabel, GtkFontSelection, GtkFontSelectionDialog,
+          GtkPacker and GtkProgress widgets.  Also updated the methods on all
+          the other objects.  I haven't yet done GtkCTree or GtkItemFactory.
+        - Fixed the gtk_widget_size_request wrapper - it now returns the size
+          requisition as a (w,h) tuple.
+        - I have split gtkmodule into _gtkbasemodule and _gtkmodule.  The code
+          in _gtkbase is no longer generated.  I have gone through and removed
+          uneeded code put in by swig.  This reduced the size of that piece
+          of source by 25%.  Hopefuly this will speed up some of the core
+          functions a bit.  If you use Gtkinter, this change is invisible.
+          If you use gtkmodule directly, change:
+             from gtk import *
+          to
+             from _gtkbase import *
+             from _gtk import *
+             pygtk_init()
+          The pygtk_init function is part of the _gtk module, and is called
+          to tell it about all the types in _gtkbase.  (it should be called
+          by the module's init routine, but I can't find out how to make that
+          happen.
+        - Updated the Gtkinter.new command.  Now widget arguments don't get
+          the widget name prepended, so I have changed the function from
+          accepting the arguments as a dictionary to accepting them as
+          keyword arguments.  (eg you can do new(GtkWindow, title="title",
+          allow_shrink=FALSE)).  On a side note, the GTK_IS_*() functions
+          have been removed from gtkmodule and added in gtk_*_get_type()
+          functions.  You can get the functionality of the removed functions
+          with something like GTK_CHECK_TYPE(obj, gtk_*_get_type()).
+
+pygtk-0.4.5:  5-August-1998
+        - This may be the last gtk v1.0 release of pygtk.  If you have anymore
+          nagging bugs, tell me now, or they won't be fixed in a version that
+          can compile for gtk v1.0 (I will be moving to gtk v1.1)
+        - Fixed some small bugs which I got bug reports about, but forgot to
+          patch (in draw_polygon, GtkDrawingArea.draw_polygon and load_fontset)
+          Also added the font argument to draw_string,draw_text.  This was
+          what was causing those problems.
+        - Now gtk_set_locale is called when Gtkinter is loaded.  This will
+          make pygtk more useful for languages with non-latin character sets
+          (eg Japanese).
+        - Fixed up new_gc, so that if you don't pass it any arguments, it
+          doesn't cause your program to segfault.
+        - Made GtkObject.connect and GtkObject.connect_after var arg functions.
+          Any extra arguments passed will be added to the argument list for
+          the signal handler.
+        - Added some attributes to the GdkFont object.  You can now access
+          the ascent and descent attributes, and call the width and measure
+          methods, which both take a string as an argument.
+
+pygtk-0.4.4:  17-June-1998
+        - Updated for gtk+-1.0.4, although it will work with gtk+-1.0.2 (No
+          new features were added between these releases).
+        - Fixed the date on the last changelog entry :(
+        - Added the file description.py.  It contains a breif description
+          of some of the objects used in Gtkinter, such as GtkStyle's,
+          GdkColors, GdkGC's and so on.  It is structured as a python module,
+          but is not intended to be imported.  It can be used as a small
+          reference.
+        - Added variable GtkCList.selection, and method
+          GtkCList.get_selection_info.  These should help using clists, and
+          help trap double clicks in a clist, since you can now do something
+          like this:
+            row, col = clist.get_selection_info(event.x, event.y)
+          in a signal handler (maybe button_press).
+        - Changed the GdkWindow destroy function to call gdk_pixmap_unref, if
+          the window was a pixmap.  This gets rid of the annoying warning
+          when you close scribble.py.
+        - pointer types and unknown boxed types are now passed as Python
+          C objects in signal handlers.  This is so wrappers for add on
+          widgets that use pointer arguments can write code to convert
+          the pointers to a more usable format.
+        - Changed the behaviour of the PyObject -> GtkArg routines so that
+          that they use python's conversion routines.  Now you can pass a
+          class instance which has a __int__ method in place of an integer
+          in those routines (it implicitly uses int(o) on the instance).
+        - Added method GtkObject.emit, which acts like gtk_signal_emit.  Now
+          widget.show() and widget.emit('show') are equivalent (although the
+          first is faster). Now you should be able to use rulers properly.
+          The specification is GtkObject.emit(signal_name, arg1, ...).  It
+          returns whatever the signal handler was supposed to.  The rulers
+          example in the testgtk.py program has been fixed, and gives an
+          example of the GtkObject.emit method.
+        - Added test of statusbar in testgtk.py.  (The code was submited by
+          Andrew Kuchling <akuchlin@cnri.reston.va.us>)
+        - Fixed hude memory leak in GdkEvent initialisation -- when adding
+          items to a dictionary with PyDict_SetItemString, the third argument
+          is INCREF'd.  I was forgetting to DECREF it after finishing with
+          it.
+        - Added method GdkWindow.new_gc.  It takes keyword arguments with
+          names matching the fields of the structure GdkGCValues, defined
+          in gdk/gdktypes.h.  It creates a gc for that window with the
+          given attributes.  Also, the GdkGC type now has the same attributes
+          as the GdkGCValues structure, and they can be read and set.
+        - Added a wrapper for the GdkColormap type.  It can be accessed as a
+          sequence (eg len(cmap), a = cmap[42], print cmap[:10]).  The
+          sequence items are colours.  Also, the GtkStyle and GdkWindow types
+          now also have the attribute colormap, which can be used for accessing
+          the colormap.  Also, the GdkColor type now has the attributes red,
+          green, blue and pixel.
+          The colormap also has a single method -- GdkColormap.alloc.  It can
+          either be called with a string argument (a colour name), or three
+          integers (RGB components).  It does the same thing as the function
+          color_alloc (in fact, color_alloc is now implemented using it).
+
+pygtk-0.4.3:  7-May-1998
+        - Updated for gtk+-1.0.1.  This version of pygtk will not work with
+          earlier versions.  (You should upgrade anyway, since this version
+          plugs some security holes and memory leaks).
+        - Updated the GdkImlib module to take advntage of new features found
+          in Imlib 1.3.  You can now save images into just about any format.
+        - Added the types GdkWindow and GdkGC.  Also changed some of the
+          functions like gtk_widget_shape_combine_mask to take their correct
+          arguments.  This will not break any code written with Gtkinter,
+          as I have put in backward compatibility.  However, if you used any
+          of these functions in code that directly accessed the gtk module,
+          you may have to recode some of your work.
+          I have updated some of the testgtk.py examples.  You will notice
+          that the toolbar example loads quicker, since the test.xpm is only
+          read off disk once.
+        - Added the gdk_draw_* functions, and wrote wrappers for them as
+          methods of the GtkDrawingArea class.  See examples/simple/scribble.py
+          for an example of using pixmaps and the drawing area.
+
+pygtk-0.4.2:  22-April-1998
+        - Updated for gtk+-1.0.0.  Since there have been no API changes
+          between 0.99.10 and 1.0.0, it should work with that version as well.
+        - Updated the configure script.  It now uses the gtk-config script to
+          work out the cflags and libraries for GTK.  If gtk-config is not on
+          the path, you can pass configure an argument something like
+          --with-gtk-config=/subdir/gtk-config.
+        - You can now specify the path name for the python executable (if it
+          isn't on the path) with the --with-python=/subdir/python argument.
+        - There is now a 'make install' option.  It should work with both
+          python 1.4 and 1.5.x.  It defaults to installing scripts the
+          $(prefix)/lib/site-python, with $(prefix)/lib/python$(version) as
+          a backup, and shared modules in $(prefix)/lib/python$(version)
+          /site-packages with $(prefix)/lib/python$(version)/lib-dynload and 
+          $(prefix)/lib/python$(version)/sharedmodules as backup locations.
+          It also checks that the directory is in python's search path before
+          making the choice.
+          If you have installed previous versions of pygtk, it is probably a
+          good idea to remove those files before running 'make install', as
+          the locations chosen by this routine may be different from where
+          you installed previous versions.
+        - Changed the gtk_init function slightly, so it doesn't immediately
+          call the gtk_*get_type functions, instead deferring this till the
+          first call to gtk_object_new.  This shouldn't affect anyone's
+          programs, other than making loading slightly quicker.
+        - Also added support for return types for signals (this only breaks
+          compatibility if your handlers didn't return None or 0 or whatever).
+          You should now be able to do things like returning TRUE from a
+          delete_event signal handler to prevent a window being destroyed.
+	- Added some functions for GtkCurve's and GtkPreview's that were
+          previously missing.
+        - Fixed some of the typemap stuff.  GtkAspectFrame, GtkToolQuery and
+          GtkCList.get_row_data now work properly.  Also fixed a few similar
+          problems in GdkImlib.
+
+pygtk-0.4.1:  6-April-1998
+        - This archive is slightly smaller than the previous version, because
+          I accidently included some unneeded files.  (The package isn't
+          missing anything that is required).
+        - Updated for gtk+-0.99.9.  Note that the previous version of pygtk
+          works fine with 0.99.9, so this release is mainly new features.
+        - There is now a mailing list for pygtk.  To subscribe, send mail to
+          pygtk-request@daa.com.au, with the word subscribe in the body.
+          There is also a web site at http://www.daa.com.au/~james/pygtk/,
+          although it isn't very interesting yet.
+        - updated the examples/ide/gtkcons.py to take advantage of word
+          wrapping in the text widget.
+        - Added a function to export the Python types used in Gtkinter, so
+          other python bindings (such as the imlib one) can use them.
+          (It should be possible to do gnome bindings -- I will look at that
+          in a little while).
+	- Added support for gdk_imlib.  Note that this does not change
+          what libraries are required to build Gtkinter.  If you don't
+          have gdk_imlib, the configure script will notice, and decide not
+          to build support for it.  If you have gdk_imlib, and don't want to
+          build it, you can pass configure the argument --without-imlib.
+        - Added the directory examples/imlib, and a simple multi format
+          image viewer called examples/imlib/view.py.  This example requires
+          the imlib bindings to have been built.
+
+pygtk-0.4.0:  23-Mar-1998
+        - Updated for gtk+-0.99.8, so won't work with older versions (although
+          your old pygtk programs will still work).
+        - Added support quit handlers and input handlers.
+        - Fixed a long standing bug in idle/timeout/quit function reactivation.
+          Before, in order for an idle or timeout function to be reactivated,
+          it needed to call idle_add or timeout_add again. Now they just have
+          to return TRUE (like in C).  This simplifies these functions
+          substantially.  The old behaviour still works.
+          If you are using gtk+-0.99.7, you will find that timeout handlers
+          don't work.  This is caused by a bug in GTK, which was fixed in
+          gtk+-0.99.8.
+        - Found that GtkPixamp.__init__, GtkCList.set_pixtmap and GtkCList.
+          set_pixtext all kept references to the pixmaps when they shouldn't.
+          This is now fixed.
+        - Added the module GtkExtra, which contains some convenience routines
+          for writing pygtk programs.  It includes an implementation of the
+          menu factory (allows creation of arbitrary sized menus with about
+          four function calls), and single function call interfaces for
+          handling message boxes, file selection dialogs and input boxes.
+        - Added the module GDK.py, that contains relevant constants from GDK.
+          It is automatically imported by Gtkinter, so it is possible to do
+          things like widget.set_events(GDK.ALL_EVENTS_MASK)
+        - Added a crude integrated development environment (pyide.py) that
+          pulls together the debugger, profiler, console and editor examples
+          in the examples/ide directory.
+        - Added a function colour_alloc (or color_alloc) that can be used to
+          allocate new colours for use in the text widget and others.
+        - Added the drag and drop functions (finally).  Check the example in
+          testgtk.py for the details.
+        - Added GtkWidget.shape_combine_mask, which takes a pixmap as its first
+          argument, and uses its mask as the shape mask.
+	- Added the GtkCList.{set,get}_row_data functions.
+
+pygtk-0.3.0:  10-Mar-1998
+        - Updated for gtk+-0.99.4.  This means that it will not compile
+          properly with previous versions.  These incompatibilities are
+          justified since according to the authors of gtk, gtk+-0.99.4 is
+          very close to what 1.0.0 will look like.
+        - Joined the reference counting revolution :)  This doesn't affect
+          anyone's programs, since reference counting (like type casting) is
+          handled automatically by pygtk.
+        - Check out the examples/ide directory.  It contains a Gtkinter front
+          end to the python debugger and profiler and also a graphical
+          python console (which now works with different fonts and everything.
+        - Added more of the functions I left out from previous versions.  I
+          still haven't fiddled round with dnd yet.
+        - Fixed the gtk_object_get function (I had an '=' instead of a '==').
+          You can now use Gtkinter objects as dictionaries.  An example is
+               >>> win = GtkWindow(WINDOW_TOPLEVEL)
+               >>> # next line is equivalent to win['GtkWindow::title'] = 'a'
+               >>> win.set_title("a")
+               >>> win['GtkWindow::title']
+               'a'
+        - Added the object data facility.  You can use GtkObject.set_data,
+          get_data and remove_data to manipulate it.
+        - Added gtk_window_set_icon and gtk_window_set_icon_name.  They are
+          wrappers for the gdk counterparts.  The functions are also exposed
+          in Gtkinter as GtkWindow.set_icon[_name].  The set_icon function
+          takes a GtkPixmap as its argumnet, extracts the GdkPixmap and mask
+          from it and calls gtk_object_sink on the GtkPixmap, in case it never
+          gets packed in another widget.
+        - Similar wrappers are given for GtkCList.set_pixmap and
+          GtkCList.set_pixtext.  Once again, you pass a GtkPixmap instead of
+          a GdkPixmap/GdkBitmap pair.
+
+pygtk-0.2.0: 12-Feb-1998
+        - Fixed tooltips properly this time.  Now you need to keep a reference
+          to the GtkTooltips object for as long as you want to display those
+          tips.
+        - Added the example examples/testgtk/testgtk.py.  This is a
+          translation of the example with the same name that comes with the
+          gtk distribution.  The plus side of this is that I found and fixed
+          many bits of pygtk that were either broken or missing.  (eg.
+          getting the selection of a list, connecting signals for a toolbar)
+        - Added an example of using trees (examples/ide/browse.py).  This one
+          shows how you might set up a file manager where you only create
+          as much of the tree as you are using.
+        - Altered the signal handling behaviour so that the arguments to
+          a signal handler are converted to their Gtkinter equivalents.
+        - Pygtk should be complete enough for writing applications the size of
+          ones you might use guile-gtk for, and as far as I know is the most
+          complete out of the other python-gtk bindings I know of.
+
+pygtk-0.1.1:  4-Feb-1998
+        - I accidentally broke tooltips in the previous version in such a way
+          that you would get a seg fault when creating a GtkTooltips object.
+          This has been fixed.
+        - Added a new example called gtkcons.py.  This is a simple interactive
+          Python session in a GTK window.  Currently it has some bugs, the
+          most prominent being that the first character of output from a
+          command remains hidden until the next command is executed.  It
+          also demonstrates GtkHandleBox's.
+
+pygtk-0.1.0:  2-Feb-1998
+        - Changed the copyright to LGPL.  (There is no point in making it
+          more free, since this is the lisence on GTK itself).
+        - Integrated some changes sent in by Neil Schemenauer
+          <nascheme@acs.ucalgary.ca>.  (Mainly spelling mistakes in
+          Gtkinter.py, and a number of extra examples).  The new examples
+          are TAppli*.py and notebook.py.
+        - Updated package for gtk+-0.99.3.  (updates include addition of
+          GtkCList, GtkCombo, GtkHandleBox, GtkStatusbar and GtkToolbar).
+        - Updated the GTK.py, the constants module.
+        - Updated the GtkStyle and GdkEvent types.  You can now get the
+          different colours of a style, and you can access the relevant
+          information associated with a given type of GdkEvent.  This means
+          that you can now use signals that look at button clicks or key
+          strokes.
+        - Added support for GtkAcceleratorTable and GtkTooltips in
+          Gtkinter.py.  The types GdkColor, GdkEvent, GdkFont and GtkStyle
+          don't have wrappers, but are clean enough to be used without any.
+        - Added the GtkText.insert method.  There is also a
+          GtkText.insert_defaults that takes a single string argument.
+
+pygtk-0.0.2: 21-Jan-1998
+        - Added file Gtkinter.py.  This gives an object oriented
+          interface to gtk accessable from Python.  This is still not
+          quite complete.
+        - Added some example programs in the examples directory
+        - Decided to release the code -- I wonder if anyone will use it?
+
+pygtk-0.0.1: (never released)
+        - first release
+        - contains basic functionality of gtk through use of SWIG
Index: pkg/pygtk/branches/upstream/current/ChangeLog.pre-2-6
===================================================================
--- pkg/pygtk/branches/upstream/current/ChangeLog.pre-2-6	(revision 4)
+++ pkg/pygtk/branches/upstream/current/ChangeLog.pre-2-6	(revision 4)
@@ -0,0 +1,3474 @@
+2005-05-09  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Post release version bump
+
+=== PyGTK 2.6.2 ===
+2005-05-09  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/pygenum.c (pyg_enum_new): Complain if ret is NULL, 
+	Fixes #303524.
+
+	* gobject/pygflags.c (pyg_flags_new): Change exception format to
+	be consistent with the one in enum
+
+	* gtk/gtk.override: Allow None to be passed in to:
+	set_group for RadioAction.set_group(), RadioToolButton.set_group()
+	and RadioMenuItem.set_group(). Fixes #170514
+	
+	* tests/test_radiobutton.py: Refactor and add unittests for
+	RadioAction, RadioToolButton and RadioMenuItem. 
+
+2005-05-09  Mark McLoughlin  <mark@skynet.ie>
+
+	Fix for bug #303573 - "exceptions raised in a child watch
+	handler are silently swallowed"
+
+	* gobject/gobjectmodule.c:
+	(child_watch_func),
+	(_pyg_spawn_async_callback): if PyObject_CallFunction()
+	returns NULL, print a traceback of the exception.
+	
+	* tests/test_mainloop.py: add testcase.
+	
+	* tests/Makefile.am: add test_mainloop.py
+
+	Reviewed by Johan Dahlin <johan@gnome.org>
+
+2005-05-03  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix setter for
+	"window" attribute: don't unblock threads around g_bject_ref;
+	g_object_unref previous event.window.  Fixes #302622.
+
+	* tests/Makefile.am (tests): Add test_gdkevent.py.
+	
+	* tests/test_gdkevent.py: Add a test for gtk.gdk.Event.window setter.
+
+2005-04-12  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* tests/runtests.py (program): Fix indentation and a "name
+	'program' is not defined" exception.
+
+	* codegen/argtypes.py: Treat guint and gsize as python longs, with
+	appropriate parameter conversion formats and return conversion
+	functions.  Also treat gssize as long long on LLP64 architectures
+	 (thanks jamesh).  Correctly parse "long" parameters on LP64
+	architectures. Fixes #300012: "Handling of guint, gsize, gssize,
+	and glong in pygtk is broken".
+
+2005-03-27  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_set_alternative_button_order):
+	Really check in the code. Fixes #171771 (Manish Singh)
+
+2005-03-20  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_insert):
+	Regression, allow the second argument to be unspecified, fixes
+	#171027 (Ulrik Svensson)
+
+	* tests/test_liststore.py: Add 2 new tests
+
+2005-03-17  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkmodule.c (init_gtk): Regression, don't crash if sys.argv
+	isn't set.
+
+2005-03-16  Johan Dahlin  <jdahlin@async.com.br>
+
+	* tests/test_radiobutton.py (RadioButtonTest): New test.
+
+	* tests: Renamed *.py to test_*.py
+
+	* gtk/gtk.override: Allow argument to RadioButtion.set_radio_group 
+	to be empty, fixes #170514 (Lorenzo Gil Sanchez)
+
+2005-03-15  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Post release version bump
+
+=== PyGTK 2.6.1 ===
+2005-03-15  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/codegen.py: Check arguments if we have no arguments.
+	Fixes bug #170266 (Doug Quale)
+
+	* gtk/gdk.override:
+	* gtk/gtktreeview.override: gcc4 patches stolen from redhat
+
+	* NEWS: Updated
+	
+2005-03-14  Anders Carlsson  <andersca@imendio.com>
+
+	* codegen/reversewrapper.py:
+	Remove an extra * in the declaration and cast of GObject 
+	types.
+	
+2005-03-14  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/pygparamspec.c (pyg_param_spec_getattr): In case the
+	enum is not registered, set enum_class or flag_class to None
+
+2005-03-13  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_reorder): Ditto
+
+2005-03-13  Richard Hult  <richard@imendio.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_reorder): You
+	don't own a ref on the return value from PyList_GetItem so don't
+	decrease the ref count.
+
+2005-03-10  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtktreeview.override:
+	(_wrap_gtk_list_store_insert): Use
+	gtk_list_store_insert_with_valuesv, improves performance
+	when using a sorted list.
+
+	* configure.in: Post release version bump
+
+=== PyGTK 2.6.0 ===
+2005-03-07  Johan Dahlin  <jdahlin@async.com.br>
+
+	* README: Remove ftp.gtk.org url
+	
+	* NEWS: Updated.
+
+2005-03-04  Manish Singh  <yosh@gimp.org>
+
+	* configure.in: document micro_version as micro version.
+
+	* gtk/gtktreeview.override
+	* gtk/libglade.override: get rid of a couple unnecessary G_OBJECT()
+	casts.
+
+2005-02-23  Cedric Gustin  <cedric.gustin@swing.be>
+
+	* gobject/pygtype.c (add_property_docs): Use G_CONST_RETURN with a
+	gchar* return value.
+
+2005-02-23  Johan Dahlin  <johan@gnome.org>
+
+        * configure.in: post release version bump
+	
+	* examples: Don't use gtk.TRUE/gtk.FALSE anymore.
+
+=== PyGTK 2.5.4 ===
+2005-02-23  Johan Dahlin  <johan@gnome.org>
+
+	* README, NEWS: Update
+	
+2005-02-23  Cedric Gustin  <cedric.gustin@swing.be>
+
+	* setup.py: Move the install_template call for pygobject-2.0.pc.in
+	to the right place in the script. Also define PLATFORM_WIN32 on
+	win32. Fixes bug #150616.
+	* codegen/codegen.py: Do not write the 'pygtk class init' function
+	for objects whose type is explicitly ignored (like GtkPlug and
+	GtkSocket on win32). Otherwise, it generates glib-warnings related
+	to calls to g_object_set_qdata with a NULL 'node'.
+	* gobject/pygtype.c: Do not use g_string_append_printf with a NULL
+	argument, as it crashes on win32. Fixes bug #166546.
+	* gtk/gtk.override: Add GtkSocket__proxy_do_plug_added,
+	GtkSocket__proxy_do_plug_removed and GtkPlug__proxy_do_embedded to
+	the ignore-win32 list.
+
+2005-02-15  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/__init__.py: Deprecate gtk.TRUE and gtk.FALSE
+
+2005-02-17  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* examples/pygtk-demo/pygtk-demo.in: New, frontend script to
+	launch pygtk demo.
+
+	* examples/Makefile.am: Install the pygtk demo.
+
+	* examples/pygtk-demo/demos/appwindow.py
+	(ApplicationMainWindowDemo.activate_about)
+	(ApplicationMainWindowDemo.__create_action_group): Popup a simple
+	AboutDialog on Help->About.
+
+2005-02-15  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Fix logic when displaying modules not built,
+	Thanks to Abel Daniel for pointing out.
+	* gtk/gtk.defs: Undeprecate gtk.icon_size_get_name and
+	gtk.icon_size_lookup and remove broken methods.
+
+2005-02-13  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.defs: Reorder all the (define-virtual...) declarations,
+	putting them right after the method declarations of the respective
+	objects.
+
+2005-02-10  Mark McLoughlin  <mark@skynet.ie>
+
+	* gobject/pygmainloop.c: (pyg_restore_current_main_loop):
+	don't pass a NULL value to PyThread_set_key_value() - causes
+	an assertion failure with python 2.4.
+
+2005-02-09  Mark McLoughlin  <mark@skynet.ie>
+
+	Fix for bug #154779 - Python signal handlers don't
+	get executed while you're sitting in the main loop.
+
+	* gobject/pygmainloop.c:
+	(pyg_save_current_main_loop),
+	(pyg_restore_current_main_loop),
+	(pyg_get_current_main_loop): functions for keeping
+	track of the currently running main loop. A version
+	using TLS and another using a global variable, depending
+	on whether DISABLE_THREADING is defined
+	(pyg_signal_watch_prepare), (pyg_signal_watch_check),
+	(pyg_signal_watch_dispatch), (pyg_signal_watch_new):
+	a GSource which runs the python signal handlers whenever
+	the mainloop is interrupted by signal delivery.
+	(pyg_main_loop_new), (pyg_main_loop_dealloc): add and
+	remove the source.
+	(_wrap_g_main_loop_run): push/pop the currently running
+	main loop.
+	
+	* gobject/pygobject-private.h: add a pointer for the
+	source to PyGMainLoop.
+
+	* gobject/Makefile.am: add -DPLATFORM_WIN32 to cflags
+	if building on Windows.
+	
+2005-01-10  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: post release version bump
+
+=== PyGTK 2.5.3 ===
+2005-01-22  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtkmodule.c (init_gtk): Do some type checking on sys.argv
+	before using it.  Fixes #163209.
+
+	* gtk/gdk.override: Override slots tp_getattro and tp_setattro of
+	GdkGC instead of tp_setattr and tp_getattr.  Fixes #159468.
+
+	* codegen/codegen.py: Allow override of tp_getattro and
+	tp_setattro (non-deprecated variants of tp_getattr and
+	tp_setattr).
+
+	* gobject/pygflags.c (pyg_flags_new): Check that __gtype__ is
+	PyGTypeWrapper_Type, not PyGEnum_Type.
+	(pyg_flags_add): Set a custom __gtype__ for the new flags class.
+	(pyg_flags_new): Remove "value out of range" check, it makes no
+	sense in flags.
+	(pyg_flags_new): Check for NULL return from PyDict_GetItem and set
+	exception.
+
+	* gobject/pygenum.c (pyg_enum_add): Set a custom __gtype__ for the
+	new enum class.
+	(pyg_enum_new): Check that __gtype__ is PyGTypeWrapper_Type, not
+	PyGEnum_Type.
+
+	* gobject/pygflags.c (pyg_flags_add): Idem.
+
+	* gobject/pygenum.c (pyg_enum_add): Unset the flag
+	Py_TPFLAGS_BASETYPE in newly created enum type.  Set tp_new, which
+	somehow was not being inherited.
+
+	Fixes #154372.
+
+2005-01-22  Mark McLoughlin  <mark@skynet.ie>
+
+	* gobject/gobjectmodule.c (pyg_type_register): Fix reference leak
+	to the module string; Appends the serial number to the type name,
+	even if the module name can't be looked up.  Fixes #164441.
+
+2005-01-18  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/reversewrapper.py (IntParam.convert_c2py): Don't bother
+	checking if PyInt_FromLong fails.
+	(DoubleParam.convert_c2py): Don't bother checking if
+	PyFloat_FromDouble fails.
+	(DoubleReturn.write_conversion): Check return value type.
+	(IntReturn.write_conversion): idem.
+	(StringReturn.write_conversion): idem.
+	(VoidReturn.write_conversion): idem.
+
+	* gtk/gtkmodule.c (init_gtk): On Python >= 2.4, don't call
+	setlocale(LC_NUMERIC, "C"), as it breaks the locale module.  Fixes
+	#164451.
+
+2005-01-16  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/gobjectmodule.c (pyg_type_register): Use tp_base field
+	of each base type to compare with PyGInterface_Type, instead of
+	PyObject_IsSubclass, because we don't want a class defined as
+	class Foo(GObject, SomeInterface) to be itself considered an
+	interface when in turn it is subclassed.
+	(pyg_type_register): Make "Interface type %s has no python
+	implementation support" a warning instead of exception.  This
+	really isn't a fatal error and some programs seem to be using
+	interfaces in weird ways.
+
+	* codegen/reversewrapper.py (ReverseWrapper.generate): Rename
+	variable PyGILState_STATE state to __py_state to avoid possible
+	name collision with function parameters.
+
+2005-01-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.override (_wrap_gdk_pixmap_colormap_create_from_xpm) 
+	(_wrap_gdk_pixmap_create_from_xpm_d) 
+	(_wrap_gdk_pixmap_colormap_create_from_xpm_d): Allow first arg
+	to be a GdkDrawable. #159282
+
+2005-01-13  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/Makefile.am: Allow it to be built using automake 1.8. Fixes
+	bug 163932
+	
+	* codegen/codegen.py: Only declare the object when it's needed.
+	Fixes some more compiler warnings.
+	
+2005-01-10  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/codegen.py (Wrapper.write_virtuals): Don't raise
+	exception if a do_xxx method is defined and the corresponding
+	virtual is not supported, since we may have a signal with the same
+	name and the user may be trying to override it.
+	Fixes #163606: override size_allocate doesn't work.
+
+	* gobject/pygobject.h, gobject/pygobject-private.h: Revert change
+	from 2005-01-09 by me to define pyg_threads_enabled as
+	PyEval_ThreadsInitialized() on Python 2.4 and define
+	pyg_begin|end_allow_threads as Py_BEGIN|END_ALLOW_THREADS.  Fixes
+	#163612: segmentation fault on pygtk-demo.
+
+2005-01-10  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: post release version bump
+	* docs/random/release-checklist:
+	Update
+
+=== PyGTK 2.5.2 ===
+2005-01-10  Johan Dahlin  <johan@gnome.org>
+
+	* autogen.sh: Check for automake-1.9 aswell, fixes 162396 
+	(Raphael Kubo da Costa)
+
+2005-01-10  Johan Dahlin  <johan@gnome.org>
+
+	* .cvsignore:
+	* Makefile.am:
+	* configure.in:
+	* gtk/Makefile.am:
+	* pygtk-2.0.pc.in:
+	* setup.py:
+	* tests/common.py:
+	* tests/testhelpermodule.c: Make the build of
+	atk, pango and gtk conditional. Fixes bug #74144.
+
+2005-01-10  Johan Dahlin  <johan@gnome.org>
+
+	* tests/Makefile.am:
+	* tests/common.py:
+	* tests/runtests.py:
+	* tests/test_thread.py: Make testsuite work and do things
+	the way they were supposed to be done from the beginning.
+
+2005-01-10  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override
+	(_wrap_GtkCellLayout__proxy_do_set_cell_data_func): Implement
+	proxy function for virtual 'set_cell_data_func' of interface
+	GtkCellLayout.
+
+2005-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/pygtype.c (pyg_value_from_pyobject): Handle conversion
+	of python sequence to G_TYPE_VALUE_ARRAY GValue.
+	(pyg_param_gvalue_from_pyobject): idem.
+	Patch by jylefort@brutele.be; Fixes #160452.
+
+	* gtk/gdk.override (_wrap_gdk_pixmap_create_from_xpm):
+	Accept GdkDrawable instead of GdkWindow as first argument. Fixes
+	#159282.
+
+2005-01-09  Tim Evans  <gjc@gnome.org>
+
+	* gtk/gtk.defs (gtk_get_current_event): Add (caller-owns-return #t).
+
+	* gtk/gtk.override (_wrap_gtk_get_current_event_state): Impl.
+
+	Reviewed by Gustavo Carneiro.  Fixes #159397.
+
+2005-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/pygtype.c (pyg_value_from_pyobject): Be consistent about
+	not raising an exception on error return.
+	Patch by jylefort@brutele.be, fixes #160595.
+
+	* tests/Makefile.am (tests): Add test_subprocess.py.
+
+	* tests/test_subprocess.py: Unit test for gobject.spawn_async and
+	gobject.child_watch_add.
+
+	* gobject/gobjectmodule.c (pyg_spawn_async): Add wrapper for
+	g_spawn_async_with_pipes.
+	(pyg_child_watch_add): Add wrapper for g_child_watch_add_full.
+
+	* gobject/pygobject.h, gobject/pygobject-private.h: Define
+	pyg_threads_enabled as PyEval_ThreadsInitialized() on Python 2.4,
+	so that it is no longer required to call gobject.threads_init on
+	that platform.  Also define pyg_begin|end_allow_threads as
+	Py_BEGIN|END_ALLOW_THREADS, since these functions are rarely
+	invoked, thus represent a minimal overhead.
+
+	* gobject/gobjectmodule.c (pyg_type_register): Return the type
+	being registered, to make gobject.type_register usable as Python
+	2.4 @decorator.
+
+	* codegen/codegen.py (Wrapper.write_constructor): Move writing of
+	pygobject_no_constuctor to the new methods
+	write_default_constructor (when no constructor is declared in the
+	.defs) and write_noconstructor (when a constructor is declared but
+	could not be generated).
+	(GObjectWrapper.write_default_constructor): Override to return
+	'0'.  This makes the constructor for GObjects become
+	GObject.__init__ by default, unless there is a constructor
+	function in the .defs and it could not be generated for some
+	reason.
+
+	* gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_new):
+	Deprecate GtkGenericCellRenderer, since all virtual methods of
+	GtkCellRenderer are now supported.
+
+	* gtk/gtk.override (_wrap_GtkCellRenderer__proxy_do_get_size):
+	Override, implementation copied from PyGtkGenericCellRenderer,
+	with minor adjustments/fixes.
+
+2005-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/gobjectmodule.c (pyg_type_register): Look for
+	GInterface's among tb_bases and register implementation support
+	for them.
+	(pyg_register_interface_info): Add.  Registers a GInterfaceInfo*
+	containing python proxy implementation with a GInterface GType.
+
+	* gobject/pygobject.h (pyg_register_interface_info): Add.
+
+	* gtk/gtk-types.defs (Editable): Add (vtable "GtkEditableClass"),
+	because the GtkEditable vtable structure name is GtkEditableClass
+	instead of GtkEditableIface.
+
+	* codegen/definitions.py (InterfaceDef.__init__): Add/parse vtable
+	attribute, to contain the C structure name of the virtual table of
+	an interface.  If not given, the vtable name defaults to (c_name +
+	"Iface").  Add attribute interface_info, to hold the
+	GInterfaceInfo variable for the interface.
+
+	* codegen/reversewrapper.py (GEnumReturn.write_conversion): Add
+	missing code=None parameter.
+	(GFlagsReturn.write_conversion): idem.
+
+	* codegen/codegen.py: Add global iproxies_coverage to track
+	coverage statistics of interface proxies.
+	(Wrapper.write_methods): Split out writing virtual method
+	accessors to a separate method (write_virtual_accessors).
+	(GInterfaceWrapper.write_virtual_accessors): Override to disable
+	writing virtual accessors for interfaces.
+	(GInterfaceWrapper.write_virtuals): Override to generate interface
+	virtuals, interface_init function, and interface_info structure.
+	(write_registers): Call pyg_register_interface_info for interfaces
+	with some implementation support.
+
+	* gtk/gtk.defs: Add (define-virtual ...) declarations for all
+	interface virtual methods in gtk.
+
+	Fixes #154974: Interface implementation support.
+
+2005-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/reversewrapper.py (GBoxedParam.convert_c2py): When the C
+	type begins with const, force python wrapper to create a copy of
+	the boxed value, and typecast to avoid const warning.
+
+	* codegen/codegen.py (Wrapper.write_virtuals): In the generated
+	class_init function, don't declare the variable 'klass' if it is
+	not needed.
+
+2005-01-08  Adam Hooper  <adamh@cvs.gnome.org>
+
+	* tests/test_actiongroup.py:
+
+	Add test script for bug #162874.
+
+2005-01-08  Adam Hooper   <adamh@cvs.gnome.org>
+
+	reviewed by: Johan Dahlin <johan@gnome.org>
+
+	* gtk/gtk.override: Py_DECREF action in 
+	gtk_action_group_add_*actions. This should disconnect all the
+	groups from the callbacks when destroyed. Fixes bug 162874
+
+2005-01-08  Johan Dahlin  <johan@gnome.org>
+
+	* Makefile.am: Add pygtk_postinstall.py
+	* docs/random/missing-symbols: Updated
+	* gtk/__init__.py: Deprecate gtk.idle_add and friends.
+	* gtk/gtk.defs:	Merge in 2.6 api, for GtkLabel functions, 
+	thanks to Gian Mario Tagliaretti, fixes bug #163296
+	* tests/test_thread.py: Don't use gtk.idle_add
+
+2005-01-08  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/reversewrapper.py (GFlagsReturn, GFlagsParam): Add type
+	handlers for GFlags in reverse wrappers.
+	(GtkTreePathParam): Add type handler for GtkTreePath* param.
+
+2005-01-08  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override: Declare PyGdkDevice_Type, now needed for some
+	virtual method.
+
+	* gtk/gtk.defs: Add a bunch of virtual method declarations for all
+	non-deprecated gtk widgets.
+
+	* gobject/pygobject.h: Add pyg_register_class_init to the API
+	vtable and as macro, and PyGClassInitFunc typedef.
+
+	* gobject/gobjectmodule.c (initgobject): Create
+	pygobject_class_init_key, a GQuark that indentifiers the
+	class_init data for a GType class.
+	(pyg_register_class_init): Add, registers a class intialization
+	function of type "int (*PyGClassInitFunc) (gpointer gclass,
+	PyTypeObject *pyclass);"
+	(pyg_run_class_init): Add, runs a stack of class initialization
+	functions for a newly registered GObject class.
+	(pyg_type_register): Call pyg_run_class_init right after the type
+	is registered.
+	Add pyg_register_class_init to pygobject_api_functions.
+
+	* codegen/scanvirtuals.py: An utility script to scan for virtual
+	methods in header files.  At the moment it is not very intelligent
+	and doesn't distinguish between virtual methods and interface
+	definitions.
+
+	* codegen/defsparser.py (DefsParser.__init__): Initialize
+	attribute 'virtuals', to hold list of object's virtual methods.
+	(DefsParser.define_virtual): Adds a new virtual method.
+	(DefsParser.find_virtuals): Returns list of virtual methods of an
+	object.
+
+	* codegen/definitions.py (ObjectDef.__init__): Add a
+	class_init_func member variable.  Rename class MethodDef to
+	MethodDefBase, subclass MethodDefBase as MethodDef, move code that
+	checks for presence of 'c_name' from MethodDefBase into MethodDef.
+	(MethodDefBase.write_defs): Rename to _write_defs, and don't write
+	the initial "(define-method ...".
+	(MethodDef.write_defs): Write the "(define-method ..." here, then
+	call _write_defs to write the remaining.
+	(VirtualDef): New class to information of an object's virtual
+	method.  It inherits from MethodBaseDef.
+
+	* codegen/codegen.py: Add class Coverage, to track and display
+	coverage statistics.  Add globals functions_coverage,
+	methods_coverage, vproxies_coverage, and vaccessors_coverage.
+	(Wrapper.virtual_accessor_tmpl): Add template for virtual method
+	"accessor", which is a classmethod that calls a GObject virtual
+	method for GType corresponding to the class of the method.  This
+	is used in virtual method implementations for chaining to parent
+	classes.
+	(Wrapper.write_class): Call self.write_virtuals() in the end, to
+	write virtual method proxies.
+	(Wrapper.write_function_wrapper): Don't overwrite
+	subsdict['cname'] if it already has a value, since we need to pass
+	a different function name when generating virtual method
+	accessors.
+	(Wrapper.write_methods): Update coverage statistics in
+	methods_coverage.
+	(Wrapper.write_methods): Generate virtual metho accessor
+	functions, as classmethods.
+	(Wrapper.write_virtuals): Generate virtual method proxies using
+	the reverse wrapper generator.  Also generates a class_init
+	function to register the virtual proxies with the object class,
+	but only for those virtuals that appear to be actually implemented
+	in python code to avoid calling into python code for nothing.
+	(Wrapper.write_functions): Update coverage statistics in
+	functions_coverage.
+	(write_registers): Generate code to call pyg_register_class_init
+	if the object has a class init function.
+	(main): Print all coverage statistics at the end of code generation.
+
+	* codegen/argtypes.py (ArgMatcher.register_reverse)
+	(ArgMatcher.register_reverse_ret, ArgMatcher.get_reverse)
+	(ArgMatcher.get_reverse_ret): New APIs to register and lookup
+	reverse wrappers type handlers.
+
+	* codegen/Makefile.am (codegen_PYTHON): Add reversewrapper.py.
+
+	* codegen/reversewrapper.py: New code to generate 'reverse
+	wrappers', i.e. wrappers that are called from C, call into Python,
+	and then return the python return value back to C.
+
+	Fixes #145314: Overriding GTK+ virtual methods.
+
+2004-12-26  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix garbled code
+	and allow message_type to be set. Fixes #162292.
+	(Raphael Kubo da Costa)
+
+2004-12-23  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.defs (render_to_drawable, render_to_drawable_alpha): Add
+	drprecation warnings. Fixes #162097 (Steve Chaplin)
+
+	* gtk/gtk.override (_wrap_gtk_dialog_set_alternative_button_order):
+	Implement
+
+2004-12-23  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/__init__.py: Improve deprecation warnings, to display correct
+	lines (stacklevel should 2, not 1 which is default)
+
+2004-12-23  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Post release version bump
+
+=== PyGtk 2.5.1 ===
+2004-12-23  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: 
+	* README: Updated
+
+2004-12-02  Cedric Gustin <cedric.gustin@swing.be>
+
+	Reviewed by: Johan Dahlin <johan@gnome.org>
+	Fixes #150616
+	
+ 	* dsextras.py: Added InstallData class. Changed template options
+ 	to ${prefix}/include|lib|bin|share. Added get_m4_define function
+ 	to parse pygtk version strings in configure.in.
+ 
+ 	* setup.py: Added pygtk_postinstall bdist_wininst
+ 	option. distutils now uses InstallData as install_data
+ 	class. pygtk-2.0.pc and pygtk-codegen-2.0 are installed as data
+ 	instead of lib/extensions. This fixes a bdist_wininst installer on
+ 	win32.
+ 
+ 	* pygtk_postinstall.py: Initial release.
+ 
+2004-12-23  Johan Dahlin  <johan@gnome.org>
+
+	* docs/random/release-checklist: New document
+
+	* docs/random/missing-symbols: New document
+
+	* examples/atk/atk-demo.py:
+	* examples/ide/browse.py:
+	* examples/ide/gtkcons.py:
+	* examples/neil/notebook.py:
+	* examples/pango/utf8-demo.py:
+	* examples/pygtk-demo/demos/dnd.py:
+	* examples/pygtk-demo/demos/editable_cells.py:
+	* examples/pygtk-demo/demos/list_store.py:
+	* examples/simple/dnd.py:
+	* examples/simple/scribble.py:
+
+	Use stock items and other fixes for examples. 
+	Fixes #156402 (Alan Horkan)
+		
+2004-12-23  Johan Dahlin  <johan@gnome.org>
+
+	* autogen.sh: set srcdir to dirname $0, fixes out of source tree
+	builds. Fixes #158360 (Marco Pesenti Gritti)
+
+2004-12-22  Johan Dahlin  <johan@gnome.org>
+
+	* PKG-INFO.in: Update
+
+	* configure.in: Require glib/gtk+ 2.6, pango, atk 1.8, export
+	PYGTK_[MAJOR,MINOR_MICRO]_VERSION
+	
+	* gtk/gtk.defs: Make it build again by removing removed functions
+
+2004-12-12  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/argtypes.py (arg): Add 'GTime' argtype matcher, which is
+	defined as gint32 by glib, thus handled as a normal python int.
+
+2004-12-10  John Ehresman  <jpe@wingide.com>
+
+	* gobject/pygobject.h: Change PY_HEXVERSION to PY_VERSION_HEX
+
+2004-12-04  John Finlay  <finlay@moeraki.com>
+
+	* pango-types.defs (LayoutIter): Add.
+
+	* pango.defs (pango_layout_iter_get_type): Add.
+
+	* pango.override (_wrap_pango_layout_iter_get_line_yrange) 
+	(_wrap_pango_layout_iter_get_layout_extents) 
+	(_wrap_pango_layout_iter_get_run_extents) 
+	(_wrap_pango_layout_iter_get_line_extents) 
+	(_wrap_pango_layout_iter_get_cluster_extents) 
+	(_wrap_pango_layout_iter_get_char_extents): Implement.
+
+2004-12-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.defs: Remove gtk_file_chooser_button_[gs]et_active wrappers.
+	(set_cell_data): Remove, also removed from gtk+.
+
+2004-11-29  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Post release version bump
+
+=== PyGtk 2.5.0 ===
+2004-11-29  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+2004-11-23  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygobject.c (pygobject_register_sinkfunc): Make sure
+	type is a type and sinkfunc isn't NULL.
+
+2004-11-16  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_about_dialog_set_url_hook) 
+	(_wrap_gtk_about_dialog_set_email_hook) 
+	(_wrap_gtk_target_list_add_uri_targets) 
+	(_wrap_gtk_target_list_add_image_targets) 
+	(_wrap_gtk_target_list_add_text_targets): Implement.
+
+	* gtk/gtk.defs (gtk_target_list_add_text_targets)
+	(gtk_target_list_add_image_targets)
+	(gtk_target_list_add_uri_targets): Define as functions.
+
+2004-11-15  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.override (_wrap_gdk_display_store_clipboard): Implement.
+
+	* gtk/gdk.defs (drag_drop_succeeded): Define as method of
+	GdkDragContext.
+
+	* gobject/pygflags.c (pyg_flags_repr): Print long int value if enum
+	string not found. Fixes #158417. (modifed patch from Tim Evans)
+
+	* gtk/gtk.defs (set_icon_name): Allow name to be NULL
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_set_row_separator_func): Implement.
+	(gtk_tree_view_get_row_separator_func): Ignore.
+
+	* gtk/gdk.override Complete changes to return strings instead of
+	atoms except for intern_atom.
+
+2004-11-14  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_selection_data_targets_include_image): Add def.
+
+	* configure.in Require GTK+ 2.5.5.
+
+	* gtk/gtk.override (_wrap_gtk_message_dialog_new): Fix bug.
+	(_wrap_gtk_message_dialog_format_secondary_text) 
+	(_wrap_gtk_message_dialog_format_secondary_markup): Implement.
+
+	* gtk/gtk.defs (gtk_menu_tool_button_set_arrow_tooltip):
+	Allow tip args to be NULL.
+
+	* gtk/gtk.override (_wrap_gtk_menu_tool_button_new): Implement.
+	(gtk_menu_tool_button_new_from_stock): Ignore
+
+	* gtk/gtkwidget.override
+	(_wrap_gtk_menu_get_for_attach_widget): Implement as method of Widget
+	* gtk/gtk.defs (gtk_menu_get_for_attach_widget): Define as method
+	of Widget.
+
+	* pango-types.defs (EllipsizeMode): Add.
+
+2004-11-14  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/definitions.py (FunctionDef.write_defs): Write
+	caller-owns-return.
+	(MethodDef.write_defs): idem.
+	(MethodDef.merge): Merge flags 'caller_owns_return' and
+	'vargargs'; if parameter parmerge is false, return right after
+	copying old parameter list, to effectively avoid merging.
+	(FunctionDef.merge): idem.
+
+	* codegen/h2def.py (split_prefix_pat): Allow prefix to begin with
+	more than one capital letter.  Fixes splitting of GConfXxx names.
+
+2004-11-14  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_image_get_icon_name): Implement.
+
+	* gtk/gtk.defs (gtk_image_new_from_icon_name): Change function
+	name to gtk.image_new_from_icon_name.
+
+2004-11-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_icon_view_selected_foreach) 
+	(_wrap_gtk_icon_view_get_selected_items): Implement.
+
+	* gtk/gtk.defs (set_model): Set arg optional default NULL.
+
+	* gtk/gtk.override (_wrap_gtk_icon_theme_get_icon_sizes): Implement.
+	(_wrap_gtk_icon_view_new): Implement.
+	(gtk_file_chooser_button_new_with_dialog): Ignore.
+	(_wrap_gtk_file_chooser_button_new) Fix bug and add variant.
+
+2004-11-12  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_button_new): Implement
+	with optional backend arg.
+	(gtk_file_chooser_button_new_with_backend): Ignore.
+
+	* gobject/gobjectmodule.c (pyg_signal_list_ids) 
+	(pyg_signal_lookup, pyg_signal_name, pyg_signal_query): Add signal
+	introspection functions
+
+2004-11-10  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_set_can_store): Implement.
+	(_wrap_gtk_combo_box_set_row_separator_func): Implement
+	(gtk_combo_box_get_row_separator_func): Ignore.
+
+2004-11-09  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_cell_view_set_value) 
+	(_wrap_gtk_cell_view_set_values): Implement.
+	(_wrap_gtk_cell_view_get_cell_renderers): Implement.
+	(_wrap_gtk_cell_view_get_size_of_row): Implement.
+
+	* gtk/gtk-types.defs (CellView): Implements GtkCellLayout
+
+	* gtk/gtk.defs Add functions for CellRendererCombo and
+	CellRendererProgress
+
+	* gtk/gtk-types.defs Add CellRendererCombo and CellRendererProgress
+
+	* gtk/gdk.defs (alternative_dialog_button_order): Add as method of
+	GdkScreen
+
+	* gtk/gtk.defs (alternative_dialog_button_order): Remove.
+
+2004-11-08  John Finlay  <finlay@moeraki.com>
+
+	* configure.in Require less onerous GTK+ 2.5.4 build dependencies
+
+	* gtk/gtk.defs (set_logo_icon_name, set_logo) 
+	(set_translator_credits, set_website_label, set_website) 
+	(set_license, set_comments, set_copyright, set_version):
+	Allow arg to be None.
+
+2004-11-07  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_about_dialog_set_name) Allow name to be None
+	to use default app name.
+
+	* gobject/gobjectmodule.c (_pyg_strv_from_gvalue) Avoid segfault
+	when argv is NULL.
+
+	* gtk/gtk.override (_wrap__gtk_drag_source_set_target_list)
+	(_wrap_gtk_drag_source_get_target_list) Implement. Fixes #157554.
+
+	* gtk/gtk.defs (drag_source_set_target_list)
+	(drag_source_get_target_list) Add. Fixes #157554.
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr) Add missing return.
+	Fixes #157571 with slightly modified patch from rubensr.
+
+2004-11-07  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.defs (drag_source_add_text_targets) 
+	(drag_dest_add_uri_targets, drag_dest_add_image_targets) 
+	(drag_dest_add_text_targets): Make methods of them, fixes #157554
+
+	* gtk/gtk.override (_wrap_gtk_selection_data_get_uris) 
+	(_wrap_gtk_selection_data_set_uris): Impl.
+
+2004-11-07  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/definitions.py (FunctionDef.write_defs): write (varargs
+	#t) when appropriate.
+	(MethodDef.write_defs): idem.
+	(FunctionDef.merge): Refactor/fix and add 'parmerge' argument.
+
+	* codegen/defsparser.py (DefsParser.merge): Add parameter
+	parmerge, to inidicate if we want parameter lists merging or not.
+
+	* codegen/mergedefs.py: Parse command line options with optparse;
+	accept option -p to indicate we want to update parameter lists of
+	existing methods/functions; by default parameter lists are not merged.
+
+	* codegen/h2def.py (proto_pat): Accept \s* between ( and start of
+	argument list.  Fixes parsing of
+	libgnomeui-2.0/libgnomeui/gnome-scores.h, and others.
+
+2004-11-06  Hans Breuer  <hans@breuer.org>
+
+	* config.h.win32 makefile.msc gobject/makefile.msc
+	gtk/makefile.msc : updated - pygtk is working fine
+	with msvc (but requires -DDISABLE_THREADING), Thanks!
+	
+2004-11-06  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_about_dialog_get_artists) 
+	(_wrap_gtk_about_dialog_set_artists) 
+	(_wrap_gtk_about_dialog_get_documenters) 
+	(_wrap_gtk_about_dialog_set_documenters) 
+	(_wrap_gtk_about_dialog_get_authors) 
+	(_wrap_gtk_about_dialog_set_authors): Impl.
+
+2004-11-06  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in:
+	* gtk/gdk.defs:
+	* gtk/gtk-types.defs:
+	* gtk/gtk.defs:
+
+	Bump version to 2.5.0 and merge in gdk/gtk+ changes from cvs head.
+
+	New gtk objects:
+
+	GtkAboutDialog, GtkFileChooserButton, GtkIconView, GtkCellView,
+	GtkMenuToolButton
+
+	New gtk functions:
+	
+	gtk_about_dialog_get_artists
+	gtk_about_dialog_get_authors
+	gtk_about_dialog_get_comments
+	gtk_about_dialog_get_copyright
+	gtk_about_dialog_get_documenters
+	gtk_about_dialog_get_license
+	gtk_about_dialog_get_logo
+	gtk_about_dialog_get_name
+	gtk_about_dialog_get_translator_credits
+	gtk_about_dialog_get_version
+	gtk_about_dialog_get_website
+	gtk_about_dialog_get_website_label
+	gtk_about_dialog_new
+	gtk_about_dialog_set_artists
+	gtk_about_dialog_set_authors
+	gtk_about_dialog_set_comments
+	gtk_about_dialog_set_copyright
+	gtk_about_dialog_set_documenters
+	gtk_about_dialog_set_email_hook
+	gtk_about_dialog_set_license
+	gtk_about_dialog_set_logo
+	gtk_about_dialog_set_name
+	gtk_about_dialog_set_translator_credits
+	gtk_about_dialog_set_url_hook
+	gtk_about_dialog_set_version
+	gtk_about_dialog_set_website
+	gtk_about_dialog_set_website_label
+	gtk_accelerator_get_label
+	gtk_action_group_translate_string
+	gtk_action_set_sensitive
+	gtk_action_set_visible
+	gtk_alternative_dialog_button_order
+	gtk_cell_renderer_combo_new
+	gtk_cell_renderer_progress_new
+	gtk_cell_view_get_cell_renderers
+	gtk_cell_view_get_size_of_row
+	gtk_cell_view_new
+	gtk_cell_view_new_with_markup
+	gtk_cell_view_new_with_pixbuf
+	gtk_cell_view_new_with_text
+	gtk_cell_view_set_background_color
+	gtk_cell_view_set_displayed_row
+	gtk_cell_view_set_model
+	gtk_cell_view_set_value
+	gtk_cell_view_set_values
+	gtk_clipboard_set_can_store
+	gtk_clipboard_store
+	gtk_clipboard_wait_is_target_available
+	gtk_combo_box_get_active_text
+	gtk_combo_box_get_column_span_column
+	gtk_combo_box_get_focus_on_click
+	gtk_combo_box_get_popup_accessible
+	gtk_combo_box_get_row_separator_func
+	gtk_combo_box_get_row_span_column
+	gtk_combo_box_get_wrap_width
+	gtk_combo_box_set_add_tearoffs
+	gtk_combo_box_set_focus_on_click
+	gtk_combo_box_set_row_separator_func
+	gtk_dialog_set_alternative_button_order
+	gtk_drag_dest_add_image_targets
+	gtk_drag_dest_add_text_targets
+	gtk_drag_dest_add_uri_targets
+	gtk_drag_source_add_text_targets
+	gtk_entry_completion_get_inline_completion
+	gtk_entry_completion_get_popup_completion
+	gtk_entry_completion_get_text_column
+	gtk_entry_completion_insert_prefix
+	gtk_entry_completion_set_inline_completion
+	gtk_entry_completion_set_popup_completion
+	gtk_file_chooser_button_get_active
+	gtk_file_chooser_button_get_title
+	gtk_file_chooser_button_get_width_chars
+	gtk_file_chooser_button_new
+	gtk_file_chooser_button_new_with_backend
+	gtk_file_chooser_button_new_with_dialog
+	gtk_file_chooser_button_set_active
+	gtk_file_chooser_button_set_title
+	gtk_file_chooser_button_set_width_chars
+	gtk_file_chooser_get_show_hidden
+	gtk_file_chooser_set_show_hidden
+	gtk_icon_theme_get_icon_sizes
+	gtk_icon_view_get_markup_column
+	gtk_icon_view_get_model
+	gtk_icon_view_get_orientation
+	gtk_icon_view_get_path_at_pos
+	gtk_icon_view_get_pixbuf_column
+	gtk_icon_view_get_selected_items
+	gtk_icon_view_get_selection_mode
+	gtk_icon_view_get_text_column
+	gtk_icon_view_item_activated
+	gtk_icon_view_new
+	gtk_icon_view_new_with_model
+	gtk_icon_view_path_is_selected
+	gtk_icon_view_selected_foreach
+	gtk_icon_view_select_all
+	gtk_icon_view_select_path
+	gtk_icon_view_set_markup_column
+	gtk_icon_view_set_model
+	gtk_icon_view_set_orientation
+	gtk_icon_view_set_pixbuf_column
+	gtk_icon_view_set_selection_mode
+	gtk_icon_view_set_text_column
+	gtk_icon_view_unselect_all
+	gtk_icon_view_unselect_path
+	gtk_image_get_icon_name
+	gtk_image_get_pixel_size
+	gtk_image_new_from_icon_name
+	gtk_image_set_from_icon_name
+	gtk_image_set_pixel_size
+	gtk_label_get_ellipsize
+	gtk_label_get_width_chars
+	gtk_label_set_ellipsize
+	gtk_label_set_width_chars
+	gtk_menu_get_for_attach_widget
+	gtk_menu_tool_button_get_menu
+	gtk_menu_tool_button_new
+	gtk_menu_tool_button_new_from_stock
+	gtk_menu_tool_button_set_menu
+	gtk_message_dialog_format_secondary_markup
+	gtk_message_dialog_format_secondary_text
+	gtk_selection_data_get_pixbuf
+	gtk_selection_data_get_uris
+	gtk_selection_data_set_pixbuf
+	gtk_selection_data_set_uris
+	gtk_show_about_dialog
+	gtk_target_list_add_image_targets
+	gtk_target_list_add_text_targets
+	gtk_target_list_add_uri_targets
+	gtk_text_buffer_backspace
+	gtk_tool_item_rebuild_menu
+	gtk_tree_view_get_fixed_height_mode
+	gtk_tree_view_get_hover_expand
+	gtk_tree_view_get_hover_selection
+	gtk_tree_view_get_row_separator_func
+	gtk_tree_view_set_fixed_height_mode
+	gtk_tree_view_set_hover_expand
+	gtk_tree_view_set_hover_selection
+	gtk_tree_view_set_row_separator_func
+	gtk_window_get_focus_on_map
+	gtk_window_get_icon_name
+	gtk_window_set_default_icon_name
+	gtk_window_set_focus_on_map
+	gtk_window_set_icon_name
+
+	New gdk functions:
+	
+	gdk_display_request_selection_notification
+	gdk_display_store_clipboard
+	gdk_display_supports_clipboard_persistence
+	gdk_display_supports_selection_notification
+	gdk_drag_drop_succeeded
+	gdk_window_configure_finished
+	gdk_window_enable_synchronized_configure
+	gdk_window_set_focus_on_map
+
+	
+2004-11-04  Johan Dahlin  <johan@gnome.org>
+	
+        * configure.in: post release version bump
+	
+=== PyGtk 2.4.0 ===
+2004-11-04  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_add_buttons): Use
+	PyTuple_GetSlice and PyArg_ParseTuple here, so we can get the same
+	behavior as in add_button. Reported by Maciej Katafiasz, fixes #156707
+
+	* tests/test_dialog.py: Add test for it
+
+	* examples/gtk/filechooser.py: Fix typo
+
+	* examples/gtk/uimanager.py: Simplify
+
+	* tests/Makefile.am:
+	* tests/gtype.py:
+	* tests/test-thread.c:
+	* tests/test-thread.h:
+	* tests/test-unknown.c:
+	* tests/test-unknown.h:
+	* tests/test_unknown.py:
+	* tests/testhelpermodule.c:
+
+	Add tests for dynamic/unknown objects and interfaces.
+	
+2004-10-28  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_combo_box_set_model)
+	(gtk_entry_completion_set_model) Allow model to be None and to
+	default to None similar to gtk_tree_view_set_model.
+	Fixes #155247 (Olivier Aubert).
+
+2004-10-22  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_alignment_new): Change all
+	gtk.Alignment constructor parameter default values back to 0, as
+	it was before pygtk 2.4.
+
+2004-10-21  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_adjustment_new): Change all
+	gtk.Adjustment constructor parameter default values back to 0, as
+	it was before pygtk 2.4.
+
+2004-10-13  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gobject/pygobject.h: s/typename/typename_/, because typename is
+	a C++ keyword.
+	Add G_BEGIN_DECLS / G_END_DECLS.
+	Fixes #155304: pygobject.h cannot be included in C++ programs.
+
+2004-10-05  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/libglade.override (pyglade_xml_lookup_type): Fix silly silly
+	bug. When using typedict for a glade.XML object, AttributeErrors
+	set when calling PyMapping_GetItemString on a dictionary isn't
+	reset.
+	
+	I wonder why nobody tried this before? Sigh. At least it's my
+	fault, so I have no one else to blame, even though I'm trying hard
+
+2004-10-03  John Finlay  <finlay@moeraki.com>
+
+	* examples/pygtk-demo/demos/dnd.py Fix popup dest code and
+	use gobject timeout functions.
+
+2004-10-03  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Post release version bump
+
+=== PyGtk 2.4.0 ===
+2004-10-03  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+2004-10-01  John Finlay  <finlay@moeraki.com>
+
+	* examples/pygtk-demo/* Replace the pygtk-demo with the new
+	version written by Maik Hertha. Fixes #138823.
+
+2004-09-27  John Ehresman <jpe@wingide.com>
+
+	* gobject/gobjectmodule.c (pyg_enable_threads): Allow gtk_main to
+	be invoked from a thread created by the threading module by
+	requiring the GIL be held when pyg_enable_threads is invoked.
+	
+=== PyGtk 2.3.97 ===
+2004-09-28  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+	* gobject/gobjectmodule.c:
+	* gobject/pygobject-private.h:
+	* gobject/pygobject.h:
+	* tests/test_thread.py:
+	* tests/testhelpermodule.c:
+
+	Apply slighly modified fix from bug 149845
+	This is make threading usable for both users of the threading
+	module and users that requires interaction with threads from
+	other extension modules.
+
+2004-09-28  Johan Dahlin  <johan@gnome.org>
+
+	* tests/testhelpermodule.c: 
+	* tests/test_thread.py: Add thread stuff, that emits stuff from
+	another thread and does some enum magic.
+
+2004-09-27  John Ehresman <jpe@wingide.com>
+
+	* gobject/gobjectmodule.c: New functions exposed through
+	_PyGObject_Functions to work around bugs in the PyGILState
+	api's
+	* gobject/pygobject.h: idem
+	* gobject/pygobject-private.h: idem
+	* gtk/gtk.override (_wrap_gtk_main): add pyg_enable_threads()
+	call to ensure thread state for thread invoking this function
+	is remembered.  Only call pyg_enable_threads() here if threads
+	were previously enabled
+	
+2004-09-27  John Ehresman <jpe@wingide.com>
+
+	* tests/common.py: catch ImportError if glade is not found
+	and set glade to None
+
+2004-09-27  Johan Dahlin  <johan@gnome.org>
+
+	* tests/testhelper.c: Small c module to help testing
+
+	* codegen/codegen.py: Revert parts of
+	Gustavos changes, so the size of interfaces are correct.
+
+	* tests/test_subtype.py: tests for this, use testhelper here
+	aswell
+
+2004-09-26  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gobject/pygobject-private.h, gobject/pygobject.h: Make
+	PyGClosure structure semi-public, for gnome-python.
+
+2004-09-25  Johan Dahlin  <johan@gnome.org>
+
+	* tests/test_signal.py: Move some tests from gtype and rename from
+	signal.py 
+
+2004-09-25  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* tests/gtype.py (GTypeTest.testGObjectInvalidSignalOverride): New
+	test with test case in #153718.
+
+	* gobject/gobjectmodule.c (pyg_type_register):
+	PyDict_GetItemString returnes a borrowed reference, therefore
+	remove Py_DECREF(gsignals) and Py_DECREF(gproperties) everywhere.
+
+	Fixes bug 153718: exception in overriden gsignals causes ref count
+	problems.
+
+2004-09-24  James Henstridge  <james@jamesh.id.au>
+
+	* gtk/gdk.override (_wrap_gdk_color_parse): initialise the
+	GdkColor struct to zeroes, so we don't get a random value in the
+	"pixel" field after parsing the colour string.
+
+2004-09-22  John Ehresman <jpe@wingide.com>
+
+	* gtk/gdk.override: (_wrap_gdk_color_new): pass int variables
+	to ParseTupleAndKeywords and then assign to GdkColor fields
+
+2004-09-17  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygflags.c: Filter out 0 values
+
+	* Makefile.am: 
+	* docs/Makefile.am: Revert documentation changes
+
+2004-08-28  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_bin_tp_init): override, chain to parent type.
+	(_wrap_gtk_item_tp_init): idem.
+	(_wrap_gtk_box_tp_init): idem.
+	(_wrap_gtk_button_box_tp_init): idem.
+	(_wrap_gtk_separator_tp_init): idem.
+	(_wrap_gtk_separator_tp_init): idem.
+	Partially fixes #150698.
+
+2004-08-27  Xavier Ordoquy  <xordoquy@linovia.com>
+
+	* gtk/gtk.override: raise a TypeError if an action callback
+	isn't callable.
+
+2004-08-24  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.defs: Clarify the DeprecationWarning messages in
+	gtk.Progress methods.
+
+2004-08-22  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* examples/gtk/widget.py (PyGtkWidget.__init__): Call
+	gtk.Widget.__init__ instead of __gobject_init__.
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_new): Override, chain
+	to parent type.  Fixes bug #150698.
+
+Sun Aug 22 09:47:12 2004  Owen Taylor  <otaylor@redhat.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_reorder): Don't
+	access private 'length' field of GtkTreeStore, rather use
+	gtk_tree_model_iter_n_children().
+
+2004-08-21  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_font_button_new) Fix property name.
+
+2004-08-19  John Finlay  <finlay@moeraki.com>
+
+	* examples/simple/dnd.py
+	* examples/simple.scribble.py Update.
+
+	* examples/ide/pyide.py
+	* examples/ide/browse.py
+	* examples/ide/edit.py
+	* examples/ide/gtkcons.py
+	* examples/ide/gtkdb.py
+	* examples/ide/gtkprof.py
+	Update ide example program files.
+	* examples/ide/dialogs.py Add helper dialogs.
+
+2004-08-16  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* examples/pygtk-demo/demos/entrycompletion.py: Add
+	GtkEntryCompletion example, by Fernando San Martín Woerner.
+
+	* examples/Makefile.am (EXTRA_DIST): Add fsmw's entrycompletion.py
+	example.
+
+	* codegen/codegen.py (GObjectWrapper.get_initial_class_substdict)
+	(GInterfaceWrapper.get_initial_class_substdict)
+	(GBoxedWrapper.get_initial_class_substdict)
+	(GPointerWrapper.get_initial_class_substdict): Refactor substdict
+	code: move most common items to parent class, and just override a
+	few in subclasses.  Set default value for slot tp_flags.
+
+	* gobject/pygobject.c (pygobject_register_class): Remove hardcoded
+	( and unnecessary ) initialization of slots tp_dealloc,
+	tp_traverse, tp_clear, tp_flags, tp_weaklistoffset, and
+	tp_dictoffset.  They will naturally inherit from parent type if unset.
+
+	* codegen/codegen.py
+	(GObjectWrapper.write_property_based_constructor): honor flag
+	caller-owns-return.
+	(Wrapper): Allow override of tp_traverse, tp_clear, tp_dealloc, tp_flags.
+	(Wrapper.write_class): Allow slots listed by
+	get_initial_*_substdict to be overridden.
+
+2004-08-14  John Finlay  <finlay@moeraki.com>
+
+	* gobject/pygenum.c (pyg_enum_repr) Match enum values to avoid
+	segfaults when enum minimum isn't 0 and values aren't a continuous
+	sequence.
+
+Wed Aug 11 11:43:07 2004  Jonathan Blandford  <jrb@redhat.com>
+
+	* Makefile.am:
+	* gtk/Makefile.am: use $(pyexecdir) instead of $(pythondir)
+	as the module as a whole should be installed in the same place,
+	#149849
+
+2004-08-10  Johan Dahlin  <johan@gnome.org>
+
+	* Makefile.am (dist-nodoc): New target
+
+	* docs/ref: Adding Johns reference manual
+
+	* docs/: (incomplete) buildsystem for documentation and removing
+	old documentation
+
+2004-08-08  John Finlay  <finlay@moeraki.com>
+
+	* gobject/pygflags.c (pyg_flags_add) Return NULL when no stub.
+
+2004-08-06  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in (ACLOCAL): 
+
+	* setup.py (MICRO_VERSION): Post release version bump
+	
+	
+=== PyGtk 2.3.96 ===
+2004-08-06  Johan Dahlin  <johan@gnome.org>
+	* NEWS: Update.
+
+	* gobject/pygflags.c (pyg_flags_from_gtype): Don't comment out the
+	fallback, it break the test. (Wow, the testsuite caught another bug!)
+
+	* tests/enum.py: Additional tests.
+
+	* gobject/pygenum.c (pyg_enum_repr): Don't use g_enum_get_value,
+	use enum_class->values[n].value_name instead. Also check if the
+	value is NULL or not. This makes gtk.icon_size_register work a
+	little bit better.
+
+	* codegen/codegen.py (Wrapper.write_methods): Use methflags
+	argument for defines instead of discarding it
+
+2004-08-04  John Finlay  <finlay@moeraki.com>
+
+	* codegen/argtypes.py Return string instead of Atom.
+
+	* gtk/gtk.override (_wrap_gtk_selection_data_get_targets)
+	(_wrap_gtk_drag_dest_find_target)
+	(_wrap_gtk_drag_dest_get_target_list)
+	(_wrap_gtk_clipboard_wait_for_targets)
+	(clipboard_request_targets_cb)
+	Return string(s) instead of Atom(s).
+
+	* gtk/gtkmodule.c (init_gtk) Add string instead of Atom using
+	add_atom.
+	
+2004-08-04  Johan Dahlin  <johan@gnome.org>
+
+	* tests/enum.py (EnumTest.testOutofBounds): New test.
+
+	* gobject/pygflags.c (pyg_flags_from_gtype): 
+	* gobject/pygenum.c (pyg_enum_from_gtype): Don't segfault on
+	unknown values.
+
+2004-08-04  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_stock_lookup)
+	(_wrap_gtk_accelerator_parse) (gtk_accel_map_lookup_entry)
+	Use flags instead of enum.
+
+	gtk/gdk.override (_wrap_gdk_event_tp_getattr)
+	Return flags instead of ints for event members.
+	(_wrap_gdk_device_get_state) (_wrap_gdk_window_get_pointer)
+	(_wrap_gdk_display_get_pointer) (_wrap_gdk_event_get_state)
+	(_wrap_gdk_keymap_translate_keyboard_state)
+	Return flags instead of ints
+
+2004-08-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* everywhere: s/PyGILState_Ensure/pyg_gil_state_ensure;
+	s/PyGILState_Relase/pyg_gil_state_release;
+	s/Py_BEGIN_ALLOW_THREADS/pyg_begin_allow_threads;
+	s/Py_END_ALLOW_THREADS/pyg_end_allow_threads;
+
+	* gobject/pygobject-private.h, gobject/pygobject.h: Add new macros
+	pyg_threads_enabled, pyg_gil_state_ensure, pyg_gil_state_release,
+	pyg_begin_allow_threads,
+	pyg_end_allow_threads. pyg_threads_enabled indicates whether
+	threads are currently enabled.  The others just mimick the
+	equivalent python functions, except that they do nothing when
+	threads are not enabled.
+
+	* gobject/pygobject.h: Add boolean flag to pygobject API structure
+	indicating whether threading is activated; also add enable_threads
+	api entry point.
+
+	* gobject/gobjectmodule.c (pyg_enable_threads): New pygobject API
+	function to activate pygtk thread awareness.
+	(pyg_threads_init): gobject.threads_init(), calls pyg_enable_threads.
+
+2004-08-04  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_accel_map_lookup_entry):
+	GdkModifierType is flags not an enum.
+
+	* gobject/pygenum.c (pyg_enum_from_gtype): Don't crash if its not
+	an enum
+
+	* gobject/pygflags.c (pyg_flags_from_gtype): Don't crash if its
+	not flags
+
+2004-08-03  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gobject/pygobject.c (pygobject_emit): Remove unused variable _save
+
+	* gtk/gtkmodule.c (_pygtk_log_func): Aquire GIL.
+
+2004-08-03  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygenum.c (pyg_enum_from_gtype): Create a new GType on
+	the fly if there isn't one for the GType.
+	(pyg_enum_add): Allow module to be NULL.
+
+	* codegen/argtypes.py:
+	* gobject/gobjectmodule.c: (pyg_source_remove):
+	* gobject/pygmaincontext.c: (_wrap_g_main_context_iteration),
+	(_wrap_g_main_context_pending):
+	* gobject/pygmainloop.c: (_wrap_g_main_loop_is_running):
+	* gobject/pygobject.c: (pygobject_handler_is_connected):
+	* gobject/pygparamspec.c: (pyg_param_spec_getattr):
+	* gobject/pygtype.c: (pyg_value_as_pyobject):
+	* gtk/gdk.override:
+	* gtk/gtk.override:
+	* gtk/gtktextview.override:
+	* gtk/gtkwidget.override:
+	* pango.override: Add better support for boolean type now when 
+        we can require 2.3. Fixes bug 149121
+
+2004-08-03  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/pygtktreemodel.c: Clean up most functions here to have only
+	one return path.
+
+	* gobject/pygobject.c (pygobject_emit): Protect g_value_unset by
+	UNBLOCK/BLOCK_THREADS since it might call pygobject_free which
+	will result in a deadlock.
+
+	* gobject/gobjectmodule.c (pyg_thread_init): New function, move
+	thread initalization stuff in here.
+
+	* All over the place: Kill pyg_block/unblock_threads and use
+	PyGILState and Py_BEGIN/END_ALLOW_THREADS.
+
+	unblock [code] block calls are replaced by Py_BEGIN/END and
+	block [code] unblock calls are replaced by PyGILState.
+
+2004-08-03  Xavier Ordoquy  <xordoquy@linovia.com>
+
+	* autogen.sh: Takes ACLOCAL_FLAGS into account.
+	Fixes #149115 (Mariano Suárez-Alvarez)
+
+2004-08-02  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_expander_new) (gtk_expander_new_with_mnemonic)
+	label can be None - make label optional
+	(gtk_expander_set_label) (gtk_expander_set_label_widget)
+	label and label_widget can be None
+
+2004-08-02  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Post release version bump
+
+	* setup.py (MICRO_VERSION): 
+
+=== PyGtk 2.3.95 ===
+2004-08-02  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+	* gobject/gobjectmodule.c (initgobject): Call
+	PyEval_InitThreads. Perhaps its something that always should be
+	called.
+
+	* README (Author): Add a requirements section
+
+	* configure.in: Require Python 2.3
+
+	* setup.py (version): Ditto
+
+	* gobject/pygtype.c, gobject/pygobject.h: Remove 2.2 compat.
+
+	* All over the place: Add support for PyGILState.
+	
+2004-07-30  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_adjustment_new) Impl.
+	Rearrange arg_names and prop_names so value is last.
+	Fixes #148860 (Steve Chaplin).
+
+2004-07-29  John Ehresman <jpe@wingide.com>
+
+	* setup.py: Remove --enable-threading from argv before calling
+	distutils
+	
+2004-07-29  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_action_get_proxies)
+	slist should not be freed. Fixes 148801. (Abel Daniel)
+
+2004-07-29  John Ehresman <jpe@wingide.com>
+
+	* setup.py: Add --disable-numeric option to disable numeric support
+	even when the runtime check finds it
+
+2004-04-01  Scott Tai <scottt958@yahoo.com.tw>
+
+	Reviewed by: Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override: Remove ignore for win32, the functions are now
+	implemented on win32 fixes bug 138804
+
+2004-06-14  Benjamin Otte  <in7y118@public.uni-hamburg.de>
+
+	Reviewed by: Johan Dahlin  <johan@gnome.org>:
+	
+	* codegen/h2def.py (write_func): only remove the first occurence of
+	the object name, we don't want to mess up the function name, 
+	fixes bug 144363
+
+2004-07-29  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_insert_before)
+	(_wrap_gtk_list_store_insert_after) Allow sibling to be None.
+	Fixes #148751 (Steve Chaplin)
+
+	* gtk/pygtktreemodel.c Fix reference leaks. Fixes#148748. Thanks
+	to Tim Evans.
+
+2004-07-29  Johan Dahlin  <johan@gnome.org>
+
+	* tests/gtype.py (GTypeTest.checkType): Use
+	gobject.type_name,type_from_name for testing instead of GtkListStore.
+
+2004-07-28  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_view_get_cursor)
+	(_wrap_gtk_tree_sortable_get_sort_column_id)
+	(_wrap_gtk_tree_view_get_drag_dest_row)
+	(_wrap_gtk_tree_view_get_dest_row_at_pos)
+	Fix reference leaks.
+
+	* gtk/gtk.override (_wrap_gtk_box_query_child_packing)
+	(_wrap_gtk_notebook_query_tab_label_packing)
+	(_wrap_gtk_tooltips__get_active_tips_data)
+	(_wrap_gtk_tooltips__get_tips_data_list)
+	(_wrap_gtk_image_get_pixmap) (_wrap_gtk_image_get_image)
+	(_wrap_gtk_image_get_stock) (_wrap_gtk_image_get_icon_set)
+	(_wrap_gtk_scrolled_window_get_policy)
+	(_wrap_gtk_tooltips_data_get) (_wrap_gtk_accel_map_lookup_entry)
+	Fix reference leaks.
+
+	* pango.override (pypango_attr_iterator_get_font)
+	Fix reference leaks.
+
+2004-07-28  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygenum.c (pyg_enum_compare): 
+	* gobject/pygflags.c (pyg_flags_compare): Reverse operator, it was
+	wrong before, spotted by Abel Daniel
+
+	* tests/enum.py (FlagsTest.testComparision) 
+	(FlagsTest.testComparision): New tests
+
+	* gobject/pygtype.c (pyg_type_from_object): If we're on python
+	2.3, also check for PyBool_Type. Fixes #148684 (Steve Chaplin)
+
+	* tests/gtype.py (GTypeTest.testBoolType): New test
+
+2004-07-27  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-types.c (pygdk_atom_compare) Remove.
+	(pygdk_atom_richcompare) Implement with comparison to strings.
+	(PyGdkAtom_Type) Set tp_compare to 0 and tp_richcompare to
+	pygdk_atom_richcompare.
+	Allow an Atom to be compared with a string. Fixes #148564.
+
+2004-07-26  Johan Dahlin  <johan@gnome.org>
+
+	* acinclude.m4: Remove, replaced with:
+	
+	* m4/jhflags.m4: New file, includes compiler macros
+
+	* m4/python.m4: New file, includes python macros
+
+	* autogen.sh: Copy over autogen.sh from gnome-common.h
+	
+	* gtk/__init__.py: Readd _gobject, but warn if it's used
+
+2004-07-25  John Finlay  <finlay@moeraki.com>
+
+	* gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_value)
+	Skip pyg_value_from_pyobject() if return value is Py_None.
+	Fixes #148230.
+
+2004-07-23  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (clipboard_request_text_cb) Fix bug when no text.
+	(clipboard_request_targets_cb) Fix bug when no targets.
+
+2004-07-23  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_list_item_new): Add deprecation warning.
+
+	* codegen/codegen.py (write_property_based_constructor): Honor the
+	"deprecated" option.
+
+2004-07-23  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons)
+	(_wrap_gtk_message_dialog_new) 
+	Use pyg_flags_get_value().
+
+	* gtk/gtk-types.defs (TextSearchFlags) Fix typo.
+
+	* gtk/gtktextview.override (_wrap_gtk_text_iter_forward_search)
+	(_wrap_gtk_text_iter_backward_search)
+	Use pyg_flags_get_value.
+	
+	* gtk/gtk-extrafuncs.defs (flags) (set_flags) (unset_flags)
+	Use GtkWidgetFlags as args and return value.
+
+2004-07-22  Johan Dahlin  <johan@gnome.org>
+
+	* setup.py (MICRO_VERSION): 
+	* configure.in: Post release version bump
+
+=== PyGtk 2.3.94 ===
+2004-07-22  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+2004-07-21  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygflags.c (pyg_flags_get_first_value_name) 
+	(pyg_flags_get_first_value_nick): Add, so Lorenzo can introspect
+	flags properly too
+	(pyg_flags_get_value_names, pyg_flags_get_value_nicks): Make this
+	a little bit more useful. All values can still be fetch
+	through __flags_values__
+
+	* tests/enum.py: Improve and extend to test most enum/flags operations
+
+2004-07-20  John Finlay  <finlay@moeraki.com>
+
+	* codegen/codegen.py (write_enums) Fix bug causing segfault when
+	loading pango module.
+
+2004-07-20  Lorenzo Gil Sanchez  <lgs@sicem.biz>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): fixed a
+	compilation error: 'window' variable should be 'parent'
+
+2004-07-20  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Simplify,
+	fix name in exceptions and remove warning.
+
+	* gobject/pygenum.c (pyg_enum_from_gtype): Fall back to int for
+	unregistered enums.
+
+	* gobject/pygflags.c (pyg_flags_from_gtype): Ditto
+
+	* gobject/gobjectmodule.c (initgobject): Rename back to MainLoop, MainContext
+
+2004-07-19  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/libglade.override (_wrap_glade_xml_new): Allow pydict to be unset.
+
+2004-07-19  Johan Dahlin  <johan@gnome.org>
+
+	* setup.py (MICRO_VERSION): 
+	* configure.in: Post release version bump
+
+=== PyGtk 2.3.93 ===
+2004-07-19  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): Return
+	1/0, instead of flagvalue/0 to avoid GObject complains.
+	(_wrap_gtk_dialog_run): Simplify
+
+	* gtk/libglade.override: Subclass GladeXML so we can wrap
+	lookup_type. Add a new optional argument to GladeXML.__init__ that
+	is a mapping object that will be used to translate types. Thanks
+	to Gustavo for helping out. This should make kiko somewhat
+	happy. Fixes bug 140071
+
+	* tests/enum.py (EnumTest.testWindowGetState): Fix, a window is
+	really WITHDRAWN if it's not SHOWN and not ICONIFIED...
+
+	* tests/common.py: Add .. and ../gobject when distcheck isn't ran
+
+	* gobject/pygenum.c: Use a dict instead of a tuple for
+	__enum_values__, so we can handle negative enum values (eg: GDK_NOTHING)
+
+	* gobject/pyflags.c: Ditto for __flag_values__
+
+	* gobject/pygparamspec.c (pyg_param_spec_getattr): reference count fixing
+
+	* gobject/Makefile.am: 
+	* setup.py:
+	* makefile.msc: Update, why do I even bother to update 3 different
+	build systems?
+
+	* gobject/: Split out GParamSpec, GMainLoop, GMainContext and
+	GPointer to separate files. Also remove *.h files and go back to
+	the old scheme (everything in pygobject.h)
+
+	* description.py: Remove, out of date since 0.6.x!
+
+	* tests/Makefile.am, tests/common.py: Make distcheck pass
+
+2004-07-18  John Ehresman <jpe@wingide.com>
+
+	* gobject/pygflags.c, gobject/pygenum.c, gobject/gobjectmodule.c
+	(initgobject): Remove references to &PyInt_Type from static type
+	struct initialization and manually set it before PyType_Ready calls
+	
+	* makefile.msc, gtk/makefile.msc, gobject/makefile.msc: VC++ makefile
+	changes for new directory layout
+
+2004-07-18  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_action_group_add_radio_actions) 
+	(_wrap_gtk_action_group_add_toggle_actions) 
+	(_wrap_gtk_action_group_add_actions): Add optional user_data argument.
+
+	* gobject/pygflags.c (pyg_flags_get_value_nicks) 
+	(pyg_flags_get_value_names): New getters
+
+	* gobject/pygenum.c (pyg_enum_get_value_nick) 
+	(pyg_enum_get_value_name): New getters
+
+	* gobject/gobjectmodule.c (pyg_param_spec_getattr): add enum_class
+	and flags_class properties.
+
+2004-07-18  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.defs (gtk_combo_new): Add deprectation warning.
+	(gtk_item_factory_new): idem.
+	(gtk_list_item_new): idem.
+	(gtk_list_item_new_with_label): idem.
+	(gtk_option_menu_new): idem.
+
+	* gtk/gtkclist.override (_wrap_gtk_clist_new_with_titles): Give
+	deprecation warning.
+
+	* gtk/gtkctree.override (_wrap_gtk_ctree_new_with_titles): Give
+	deprecation warning.
+
+	* gtk/gtk.defs (plug_new_for_display): Deprecate, since the
+	regular gtk.Plug constructor can accept a GdkDisplay now.
+
+	* gtk/gtk.override (_wrap_gtk_plug_new): Override constructor,
+	convert to g_object_new based; Add optional parameter 'display',
+	available since Gtk 2.2.
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_view_column_new):
+	Convert constructor to property based.
+
+	* gtk/gtk.defs (gtk_vscrollbar_new): Convert constructor to
+	property based.
+	(gtk_tree_view_new_with_model): idem.
+	(gtk_text_view_new_with_buffer): idem.
+
+	* gtk/gtk.override (_wrap_gtk_pixmap_new): Override
+	_wrap_gtk_pixmap_new, construct with g_object_new.
+
+2004-07-17  Johan Dahlin  <johan@gnome.org>
+
+	* tests/enum.py: add, forgot it in last commit
+
+	* gobject/: Move gobject source files in here.
+
+2004-07-17  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): Don't pass
+	'parent' property if no parent is given or is None.
+
+2004-07-17  Johan Dahlin  <johan@gnome.org>
+
+	* codegen/codegen.py: 
+	* codegen/argtypes.py: Update for enums
+
+	* pygtype.c (pyg_value_as_pyobject): Use new enum/flag functions
+
+	* pygenum.[ch]: Handle GFlag
+
+	* pygflags.[ch]: Handle GFlag
+
+	* atk-types.defs: Fix gtype-id for all enums
+
+	* gobjectmodule.c (initgobject): Clean up and add convinience macros
+
+	* tests/enum.py: New file
+
+	* tests/common.py: New file, also stole from gst-python
+
+2004-07-17  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_table_new): Override to allow rows
+	and columns default to 1, unlike the underlying gtk/C API which
+	defaults to 0.
+
+2004-07-15  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_menu_item_new): Use AccelLabel instead
+	of Label and dup MenuItem creation process.
+	(_wrap_gtk_check_menu_item_new): idem
+	(_wrap_gtk_radio_menu_item_new): idem.
+	(_wrap_gtk_button_new): Set "use_underline" to TRUE when stock item
+	(_wrap_gtk_check_button_new): Add optional argument
+	'use_underline', defaulting to TRUE.
+	(_wrap_gtk_radio_button_new): idem.
+	(_wrap_gtk_toggle_button_new): idem.
+	(_wrap_gtk_message_dialog_new) Fix erroneous error message.
+	#147421
+
+2004-07-15  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_menu_item_new): add optional argument
+	'use_underline', defaulting to True.
+	(_wrap_gtk_radio_check_menu_item_new): idem.
+	(_wrap_gtk_radio_menu_item_new): idem.
+	(_wrap_gtk_button_new): idem.
+	Fixes #147421.
+
+2004-07-13  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_button_new): Construct with
+	g_object_new.
+	(_wrap_gtk_toggle_button_new): idem.
+	(_wrap_gtk_check_button_new): idem.
+	(_wrap_gtk_radio_button_new): idem.
+	(_wrap_gtk_menu_item_new): idem.
+	(_wrap_gtk_check_menu_item_new): idem.
+	(_wrap_gtk_radio_menu_item_new): idem.
+	(_wrap_gtk_check_menu_item_new): idem.
+	(_wrap_gtk_progress_bar_new_with_adjustment): idem.
+	(_wrap_gtk_file_chooser_new): idem.
+	(_wrap_gtk_color_button_new): idem.
+	(_wrap_gtk_combo_box_new): idem.
+	(_wrap_gtk_combo_box_entry_new): idem.
+	(_wrap_gtk_file_chooser_widget_new): idem.
+	(_wrap_gtk_font_button_new): idem.
+	(_wrap_gtk_radio_tool_button_new): idem.
+	(_wrap_gtk_toggle_tool__button_new): idem.
+	(_wrap_gtk_tool_button_new): idem.
+	(_wrap_gtk_entry_new): idem.
+	(_wrap_gtk_dialog_new_with_buttons): idem.
+
+	(_wrap_gtk_image_menu_item_new): Raise exception if attempted to
+	subclass this object without calling __gobject_init__.
+	(_wrap_gtk_message_dialog_new): idem.
+
+2004-07-12  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkwindow.override (set_geometry_hints) Fix arg format string.
+	Fixes #147458. Thanks to Theo Reed.
+
+2004-07-10  Johan Dahlin  <johan@gnome.org>
+
+	* tests/runtests.py: New script to run all tests in one take
+
+	* tests/Makefile.am: autotoolify
+
+	* tests/signal.py: New simple test taken from
+	examples/gobject/signal.py
+
+2004-07-08  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.defs: Change to most constructors to property based.
+
+	* codegen/codegen.py (GObjectWrapper.write_property_based_constructor):
+	Handle propname != argname cases.
+
+	* codegen/definitions.py (FunctionDef.__init__): Parse (argname
+	"xxx") inside properties list, to support argname != propname.
+	(Property.__init__): Accept new argname parameter.
+
+2004-07-07  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/definitions.py (FunctionDef.write_defs): Handle new
+	properties syntax.
+
+	* gtk/gdk.override (_wrap_gdk_colormap_alloc_color): Raise
+	ValueError instead of TypeError if unable to parse colour
+	specification.
+	(_wrap_gdk_color_parse): idem.  Fixes #144862.
+
+2004-07-04  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_model_rows_reordered)
+	Allow None, () or "" for top level path.
+
+2004-07-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.defs (gtk_hbox_new): Change constructor to property based.
+
+	* gobjectmodule.c (pyg_parse_constructor_args): Helper function
+	invoked from the generated constructors.
+
+	* codegen/codegen.py (Wrapper.write_constructor): Delegate to
+	self.write_property_based_constructor() when appropriate.
+	(GObjectWrapper.write_property_based_constructor): New constructor
+	generator, that writes constructors that use g_object_newv and
+	pass constructor arguments as properties.
+
+	* codegen/definitions.py (Parameter): New Parameter class, to hold
+	the items in (parameter ...).  Emulates tuple for compatibility,
+	but is more extensible.
+	(Property): New property class, to hold (property ...) items.
+	(FunctionDef.__init__): Parse (property ...), for new property
+	based constructors.
+
+2004-07-04  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_new) Fix typo.
+	(_wrap_gtk_tree_model_rows_reordered) Allow None for path and iter
+	to allow reordering top level rows. Fixes #143834.
+	John Ehresman's patch with mods.
+
+2004-07-04  John Ehresman  <jpe@wingide.com>
+
+	* tests directory: unit tests
+
+2004-07-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_new): Use
+	g_object_newv to create instance, thus allowing subclassing
+	without __gobject_init__.
+
+	* gtk/gtkmodule.c (init_gtk): Register new warning category,
+	GtkWarning.  Register a log handler for Gtk warnings that issues a
+	python warning using GtkWarning category.
+
+2004-07-04  John Ehresman  <jpe@wingide.com>
+
+	* codegen/argtypes.py (GUniCharArg): Use the converter function
+	pyg_pyobj_to_unichar_conv to parse gunichar parameters, instead of
+	templated code.
+
+	* pygtype.c (pyg_pyobj_to_unichar_conv): impl.
+
+	* pygobject.h, gobjectmodule.c: Add pyg_pyobj_to_unichar_conv to list of
+	exported functions.
+
+2004-07-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gdk.override (_wrap_gdk_colormap_query_color): Implement
+	gdk.Colormap.query_color.
+
+	* gtk/gdk.defs (query_color): Add gdk.Colormap.query_color.
+
+	* gtk/gtktreeview.override (pygtk_set_search_equal_func_marshal):
+	Column is integer, not PyGObject! :-/
+
+2004-07-03  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs
+	* gtk/gtk-extrafuncs.defs I goofed in placing the GenericTreeModel
+	methods. Now they should be in the right place.
+
+	* gtk/gtktreeview.override Ignore gtk_tree_view_get_search_equal_func.
+
+	* gtk/pygtktreemodel.c
+	* gtk/pygtktreemodel.h
+	* gtk/gtk.defs
+	Add stamp to GenericTreeModel to use in detecting valid TreeIters.
+	Add invalidate_iters() method to allow custom tree models to
+	manage TreeIters when not persistent.
+	Add iter_is_valid() method to allow apps to determine if a TreeIter
+	for a custom tree model is valid.
+
+2004-07-03  Ross Burton  <ross@burtonini.com>
+
+	* gtk/gdk.defs:	Add gdk_pixbuf_new_subpixbuf.
+
+2004-07-03  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_new): Construct
+	object with g_object_newv, then call
+	gtk_list_store_set_column_types().  Fixes #123037.
+	(_wrap_gtk_tree_view_set_search_equal_func): Impl. Most code is
+	copy-paste from
+	_wrap_gtk_tree_view_set_column_drag_function. Fixes #145342.
+	(_wrap_gtk_tree_selection_get_selected_rows): Initialize model to
+	NULL, to avoid crash when the tree is empty.
+
+2004-06-29  Lorenzo Gil Sanchez  <lgs@cvs.gnome.org>
+
+	* setup.py: changed the version to 2.3.93 so we can build it on Windows
+	with correct version information.
+
+2004-06-28  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gdk.override (_wrap_gdk_window_set_user_data): Fixup and do
+	some real testing of last changes, to make this really safe using
+	a pair of mutual weak references between the widget and its
+	window.  Fixes #145091.
+
+2004-06-27  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/definitions.py
+	(Definition.guess_return_value_ownership): new method (name to
+	guess default value for caller_owns_return.
+	(MethodDef.__init__): Call guess_return_value_ownership here.
+	(FunctionDef.__init__): And here as well.
+	(get_valid_scheme_definitions): new function to filter out invalid
+	elements in a definition.
+	(ObjectDef.__init__): Use get_valid_scheme_definitions here.
+	(InterfaceDef.__init__): and here
+	(EnumDef.__init__): here too
+	(BoxedDef.__init__): and here
+	(PointerDef.__init__): here as well
+	(MethodDef.__init__): idem
+	(FunctionDef.__init__): idem
+	Paches by Scott Tsai, with a bit of refactoring by me.
+
+	* gtk/gdk.override (_wrap_gdk_color_parse): Raise TypeError when
+	color cannot be parsed.  Fixes #144862.
+
+	* gtk/gtk.override (_wrap_gtk_adjustment__set_value): Use
+	pygtk_util_pyobject_as_double to convert the value.
+	(_wrap_gtk_adjustment__set_lower): idem
+	(_wrap_gtk_adjustment__set_upper): idem
+	(_wrap_gtk_adjustment__set_step_increment): idem
+	(_wrap_gtk_adjustment__set_page_increment): idem
+	(_wrap_gtk_adjustment__set_page_size): idem
+	(pygtk_util_pyobject_as_double): New utility function to convert
+	any numeric object to C double.
+
+	* gtk/gdk.override (_wrap_gdk_window_set_user_data): Raise
+	TypeError instead of value error when user data is not of
+	gtk.Widget type.
+	(_wrap_gdk_window_set_user_data): Add weak reference to the widget
+	for increased safety, just in case the widget is ever destroyed
+	before the window, however unlikely that may be...
+
+2004-06-26  Lorenzo Gil Sanchez  <lgs@cvs.gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_window_set_user_data): only allow
+	GtkWidgets to be the user data
+	(_wrap_gdk_display_list_devices): only get GtkWidgets to be simetric
+	with _wrap_gdk_window_set_user_data
+
+	* gtk/gtk.defs : modified the parameters of some GtkNotebook methods
+	so they can accept NULL arguments
+
+	* gtk/gtk.override: removed the _wrap_gtk_notebook_insert_page and
+	_wrap_gtk_notebook_set_tab_label since they are not needed anymore with
+	the changes to gtk/gtk.defs
+	
+2004-06-20  Scott Tsai  <scottt958@yahoo.com.tw>
+
+	* codegen/argtypes.py (ObjectArg.write_return): Check for NULL
+	GObject before unreffing.  Fixes Bug 137086 (gtk.gdk.window_lookup
+	assertion).  (reviewed by Gustavo Carneiro)
+
+2004-06-20  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtkmodule.c (init_gtk): Just like GtkWindow, register custom
+	sink function for GtkInvisible type.
+
+	* codegen/codegen.py
+	(GObjectWrapper.get_initial_constructor_substdict): Removed
+	special treatment of GtkInvisible, no longer needed.
+
+	* gtk/gtkmodule.c (sink_gtkinvisible): Copy-paste from sink_gtkwindow.
+
+	* pygobject.c (pygobject_new_with_interfaces): Add hack to
+	workaround python tp_(get|set)attr slot inheritance bug. Fixes
+	pygtk bug #144135 (gtk.gdk.GC attributes not working).
+
+2004-06-18  Lorenzo Gil Sanchez  <lgs@cvs.gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_window_get_user_data): finally I got it
+	working with Gustavo's help
+
+	* gtk/gdk.override (_wrap_gdk_window_get_user_data): make it compile
+	again
+	
+	* gtk/gdk.defs (get_user_data): added so we can implement
+	_wrap_gdk_window_get_user_data
+
+	* gtk/gdk.override (_wrap_gdk_window_get_user_data): implemented so
+	we can retrieve the GtkWidget of a GdkWindow. By the way, is it 
+	possible to know if a gpointer is a PyObject?
+
+	* gtk/gtk.override (_wrap_gtk_notebook_insert_page): allow to insert
+	pages without a tab_label widget (i.e None) so a default one is created
+	by GTK+.
+	(_wrap_gtk_notebook_set_tab_label): allow to set a None tab_label
+	widget so a default one is created by GTK+
+
+2004-06-14  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_set_with_data)
+	(_wrap_gtk_drag_dest_set) (_wrap_gtk_drag_dest_find_target)
+	(_wrap_gtk_drag_dest_set_target_list) (_wrap_gtk_drag_source_set)
+	(_wrap_gtk_drag_begin) (_wrap_gtk_selection_add_targets)
+	Avoid segfault if first item in a py_targets tuple is None by
+	forcing first item to be a string.
+	(_wrap_gtk_drag_dest_get_target_list) target_list should not
+	be unreffed.
+
+2004-06-14  Lorenzo Gil Sanchez  <lgs@cvs.gnome.org>
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_hide_on_delete): added dummy
+	args so you can do win.connect ('delete-event', win.hide_on_delete)
+
+2004-06-13  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtkmodule.c (sink_gtkobject, init_gtk): Add custom sink
+	function, that increments reference count of newly created
+	GtkWindow's.  Solution provided by James Henstridge, code by Jon
+	Trowbridge.  Fixes "Bug 122569: gtk.Window derived class segfaults."
+
+	* codegen/codegen.py
+	(GObjectWrapper.get_initial_constructor_substdict): Special
+	treatment for GtkWindow no longer necessary due to the custom sink
+	function.
+
+2004-06-12  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_accel_groups_from_object): For Kiko.
+
+2004-06-11  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (pygdk_filter_func_marshal): Return a
+	GdkEventType and not a PyObject. Fixes bug 143420 (Tim Evans).
+
+2004-06-09  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_action_group_add_radio_actions)
+	Fix bug preventing callback being connected. Fixes #144022. Thanks
+	to Steve Chaplin.
+
+2004-06-09  Lorenzo Gil Sanchez <lgs@cvs.gnome.org>
+
+	* examples/gtk/widget.py (PyGtkWidget.do_size_request): change the
+	allocation parameter to requisition so we have a more clear example.
+
+2004-06-07  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* examples/gtk/widget.py: Don't manually send configure events.
+	Instead, override size-request, taking the exact size of the text
+	and border width into consideration.
+
+2004-06-06  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr): Add
+	GDK_PROPERTY_NOTIFY attributes.
+
+2004-06-04  Johan Dahlin  <johan@gnome.org>
+
+	* gobjectmodule.c (pyg_param_spec_getattr): Add support for
+	paramspec.default_value for GParamSpec types that support it
+	
+2004-06-04  Lorenzo Gil Sanchez  <lgst@cvs.gnome.org>
+
+	* gobjectmodule.c (initgobject): added gobject.TYPE_UNICHAR
+
+2004-06-04  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_class_install_style_property): Impl
+
+	* gtk/gtkcontainer.override
+	(_wrap_gtk_container_class_list_child_properties): Rename first
+	kwlist argument to klass (from widget), class should be a
+	GObjectClass and not a GtkWidgetClass
+	(_wrap_gtk_container_class_install_child_property): Impl.
+
+	* gtk/gtk.defs: Change a couple of methods to functions and set
+	correct class
+
+	* pygobject.h: Add pyg_param_spec_from_object
+
+	* gobjectmodule.c (create_property): Don't install the property
+	here, return it instead. And don't require a GObjectClass as argument
+	(pyg_param_spec_from_object): New function
+	(add_properties): Update to new create_property
+	(pygobject_api_functions): Export pyg_param_spec_from_object
+
+	* gtk/gtkcontainer.override
+	(_wrap_gtk_container_class_list_child_properties): Implement for Lorenzo.
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix up *_CHECK calls
+
+	* examples/gtk/widget.py: Add a new example of subclassing a GtkWidget.
+
+	* Makefile.am (EXTRA_DIST): Add widget.py
+
+	* pygobject.c (pygobject_new): guard object_ref call
+
+	* examples/gtk/uimanager.py: Some more polishing, it'll never be finished!
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget__set_allocation): Impl.
+	(_wrap_gtk_widget__set_window): Impl.
+
+	* gtk/gtkclist.override (_wrap_gtk_clist_new_with_titles): put
+	all clist overrides here.
+
+	* gtk/gtk.override (_wrap_gtk_paint_polygon): Move gtk_widgets_*
+	ignore definitions to gtkwidget.override and clist_* to
+	gtkclist.override
+	(_wrap_gtk_action_group_add_actions): guard ref call
+	(_wrap_gtk_action_group_add_toggle_actions): ditto
+	(_wrap_gtk_action_group_add_radio_actions): ditto
+
+	* gtk/gtk-types.c (_pygtk_style_helper_new): guard ref call.
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr): Impl. 
+	(I'll have nightmares about this code)
+	(_wrap_gdk_window_new): Clean up a little bit: Proper use of enums
+	and set a boolean to b instead of i. Block unref calls for thread
+	safety issues.
+	(_wrap_gdk_window_set_user_data): Impl. This is also a hairy
+	implementation: If it's a GtkWidget, get the GObject, otherwise
+	put the real pyobject in there. Maybe we should just always put
+	the widget in there.
+	(_wrap_gdk_window_add_filter): Thread safety.
+
+2004-05-30  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_reorder) Fix
+	bug I inserted in check for GtkTreeIter.
+
+2004-05-29  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_set_column_drag_function) Add. Fixes #127504.
+
+2004-05-28  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkcontainer.override (_wrap_gtk_container_child_set)
+	(_wrap_gtk_container_child_get)
+	(_wrap_gtk_container_add_with_properties) Check that at least
+	one arg is passed to method to avoid segfault.
+
+	* gtk/gtk.override (_wrap_gtk_entry_new)
+	* gtk/gtk.defs (gtk_entry_new) (gtk_entry_new_with_max_length)
+	Apply patch from Scott Tsai. Fixes #139190.
+
+2004-05-28  Johan Dahlin <johan@gnome.org>
+	
+	* examples/gtk/uimanager.py: Add a toolbar and fix shortcuts.
+
+2004-05-27  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override
+	Ignore: gtk_tree_view_column_pack_start
+	gtk_tree_view_column_pack_end
+	gtk_tree_view_column_clear
+	gtk_tree_view_column_set_attributes - these are now covered by the
+	GtkCellLayout interface. Couldn't do the same for
+	gtk_tree_view_column_add_attribute and 
+	gtk_tree_view_column_clear_attributes due to backward compatibility.
+
+2004-05-25  John Finlay  <finlay@moeraki.com>
+
+	* examples/gtk/filechooser.py Fix bug #140946.
+
+2004-05-24  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_column_set_cell_data_func) Change this override
+	to override gtk_cell_layout_set_cell_data_func - covers all objects
+	that implement GtkCellLayout in	GTK+ 2.4 including GtkTreeViewColumn..
+	Ignore gtk_tree_view_column_set_cell_data_func.
+
+2004-05-24  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_keymap_translate_keyboard_state):
+	Remove double ;, fixes compilation with gcc 2.95.3 on FreeBSD.
+
+2004-05-22  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Don't lie about the release date.
+
+	* configure.in: post release version bump
+
+=== PyGtk 2.3.92 ===
+2004-05-22  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+2004-05-21  Johan Dahlin  <johan@gnome.org>
+
+	* gobjectmodule.c (initgobject): Add gobject.pygtk_version
+	(_wrap_g_main_context_iteration): block/unblock
+	(_wrap_g_main_loop_run): ditto
+
+2004-05-21  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-types.c (_pygtk_tree_model_remove_row) Add function to
+	help in row removal from sort and filter models using del
+	(_pygtk_tree_model_set_row) Add support for TreeModelSort and
+	TreeModelFilter setting row values.
+
+	* gtk/pygtk-private.h (_pygtk_tree_model_remove_row) Add declaration.
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_model_tp_setitem) Use
+	_pygtk_tree_model_remove_row() helper function.
+	(_wrap_gtk_tree_model_filter_set_modify_func) Add.
+	Add support to TreeModelSort and TreeModelFilter for Python mapping,
+	number and iter protocols.
+
+2004-05-20  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_tree_view_column_pack_start)
+	(gtk_tree_view_column_pack_end) Allow expand param to default to TRUE.
+
+2004-05-18  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_remove) Remove
+	this override - generated code is good.
+
+	* pygobject.c (pygobject_new_with_interfaces) Add new type to the
+	module dict as is done for built-in types.
+
+	* codegen/argtypes.py Fix bug in non-null default parselist
+	of ObjectArg. Add default handling for AtomArg.
+
+	* gtk/gtk.defs (gtk_clipboard_get_for_display)
+	(gtk_clipboard_get) Allow args to use default values.
+
+2004-05-16  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_selection_select_range)
+	Raise TypeError if selection mode is not gtk.SELECTION_MULTIPLE
+
+2004-05-15  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_selection_select_all)
+	Raise TypeError if selection mode is not gtk.SELECTION_MULTIPLE
+
+2004-05-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_selection_data_set_text) Default the text len
+	param to -1.
+
+2004-05-11  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_column_set_cell_data_func) Allow func to
+	be None to unset the function.
+
+2004-05-10  John Finlay  <finlay@moeraki.com>
+
+	* pygobject.c (pygobject_new) Bump refcount of types created by
+	pygobject_new_with_interfaces. Fixes #141042
+
+	* gtk/gtk.defs (gtk_notebook_append_page)
+	(gtk_notebook_append_page_menu) (gtk_notebook_prepend_page)
+	(gtk_notebook_prepend_page_menu) (gtk_notebook_insert_page)
+	(gtk_notebook_insert_page_menu) These return gint in GTK+ 2.4.
+
+2004-05-07  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_model_get) Add.
+
+2004-05-03  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktextview.override (_wrap_gtk_text_iter_forward_find_char)
+	(_wrap_gtk_text_iter_backward_find_char) Add.
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_reorder) Add.
+	(_wrap_gtk_list_store_reorder) Throw exception if indices out of
+	range.
+
+	* gtk/gtk.override (gtk_accel_group_connect)
+	(gtk_accel_group_disconnect) (gtk_clipboard_set_with_owner)
+	(gtk_clist_set_compare_func) (gtk_color_selection_set_color)
+	(gtk_color_selection_get_color) (gtk_ctree_set_drag_compare_func)
+	Ignore these methods - either deprecated or not needed.
+	(_wrap_gtk_menu_item_toggle_size_request) Add.
+
+2004-05-03  Johan Dahlin  <johan@gnome.org>
+
+	* codegen/codegen.py (Wrapper): Add support for tp_as_buffer.
+
+2004-04-25  John Finlay  <finlay@moeraki.com>
+
+	* pango.defs (pango_language_from_string) Rework as a constructor
+	for pango.Language.
+	(pango_language_matches) Rework this as a method for pango.Language.
+	(pango_language_to_string) Add this as a method.
+
+	* pango.override (_wrap_pango_language_from_string1)
+	(_wrap_pango_language_matches1) Add these to support deprecated
+	pango_language functions.
+
+2004-04-24  John Finlay  <finlay@moeraki.com>
+
+	* pango.override (_wrap_pango_attr_list_filter) Add.
+	(pypango_attr_iterator_get_attrs) Fix memory leak.
+
+	* pango.defs (pango_font_face_list_sizes) Add definition.
+
+	* pango.override (_wrap_pango_font_face_list_sizes) Add.
+
+	* pango.defs (pango_font_family_is_monospace) Add definition.
+
+	* pango.override (_wrap_pango_font_family_is_monospace)
+	Add two defines to avoid compilation warnings for this function.
+
+	* pango.defs (pango_fontset_foreach) Add definition.
+
+	* pango.override (_wrap_pango_fontset_foreach) Add.
+
+	* pango-types.defs (PangoFontsetSimple) Add class.
+
+	* pang_defs (pango_fontset_simple_new)
+	(pango_fontset_simple_append) (pango_fontset_simple_size)
+	Add methods for PangoFontsetSimple.
+
+2004-04-23  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.defs (gdk_window_set_accept_focus) (gdk_window_get_group)
+	Add definitions.
+
+	* pango.defs (pango_attr_fallback_new) Add definition for AttrFallback.
+
+	* pango.override (_wrap_pango_attr_fallback_new) Add.
+	(pypango_attr_tp_getattr) Add get attribute processing for
+	AttrFallback.
+
+	* pango.defs (pango_attr_iterator_get_attrs) Add definition.
+
+	* pango.override (pypango_attr_iterator_get_attrs) Add method.
+
+2004-04-22  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_get_file_info) Add.
+
+	* gtk/gdk.defs (gtk_pixbuf_get_file_info) Add definition.
+
+	* gtk/gdk.defs (gdk_pixbuf_loader_set_size)
+	(gdk_pixbuf_loader_get_format)
+	(gdk_pixbuf_loader_new_with_mime_type) Add definitions.
+	(gdk_pixbuf_loader_new) Add deprecation warning
+
+	* gtk/gdk.override (gdk_pixbuf_loader_get_format) Add.
+
+	* gtk/gdk.override (gdk_query_depths) (gdk_query_visual_types)
+	Add these functions.
+
+	* gtk/gdk.override (gdk_window_at_pointer) Add.
+
+	* gtk/gdk.override (gdk_window_at_pointer) Should return None if
+	not on known window.
+
+2004-04-20  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.defs (gtk_colormap_get_screen) Add.
+
+	* gtk/gdk.override (_wrap_gdk_cursor_new) Add 2 more ways of creating
+	a cursor corresponding to gdk_cursor_new_from_pixbuf and
+	gdk_cursor_new_for_display.
+
+	* gtk/gdk.override (_wrap_gdk_display_get_maximal_cursor_size) Add.
+
+	* gtk/gdk.defs (gdk_display_pointer_ungrab)
+	(gdk_display_keyboard_ungrab) Let time_ param default to
+	GDK_CURRENT_TIME.
+
+	* gtk/gdk.defs (gdk_drawable_draw_pixbuf) Add default value of -1 for
+	the width and height params.
+	gc param can be NULL.
+
+	* gtk/gdk.override (_wrap_gdk_event_get_state) Add.
+
+	* gtk/gdk.override (_wrap_gdk_keyval_convert_case)
+	(_wrap_gdk_keymap_get_entries_for_keyval)
+	(_wrap_gdk_keymap_get_entries_for_keycode)
+	(_wrap_gdk_keymap_lookup_key)
+	(_wrap_gdk_keymap_translate_keyboard_state) Add.
+
+2004-04-19  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_column_cell_get_position) Add.
+
+	* gtk/gtk.defs (gtk_ui_manager_add_ui) Allow param action to be NULL.
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_style_get_property)
+	(_wrap_gtk_widget_class_list_style_properties)  Add keyword arg
+	processing.
+
+	* gtk/gtk.override (_wrap_gtk_widget_list_mnemonic_labels) Add.
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_getattr) Add "group" attribute
+	for GDK_KEY_PRESS and GDK_KEY_RELEASE event objects. Fix member list
+	build value bug.
+
+2004-04-18  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_model_filter_set_visible_func) Add.
+	(_wrap_gtk_tree_model_filter_convert_child_iter_to_iter) Return the
+	iter instead of passing it in. Throw exceptions on errors.
+	(_wrap_gtk_tree_model_filter_convert_iter_to_child_iter) Return the
+	child iter instead of passing it in.
+
+	* gtk/gtktreeview.override (gtk_tree_row_reference_new_proxy)
+	(gtk_tree_row_reference_inserted)
+	(gtk_tree_row_reference_deleted)
+	(gtk_tree_row_reference_reordered) Ignore these.
+
+	* gtk/gtk.defs (gtk_tree_store_move_after)
+	(gtk_tree_store_move_before) Allow position param to be NULL.
+
+	* gtk/gtk.defs (gtk_tree_view_move_column_after) Allow base_column
+	to be NULL.
+
+2004-04-18  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gobjectmodule.c (pyg_type_register): Make sure we have a unique
+	GType name by appending -v<serial> to the name.  Allows
+	registering multiple python classes with the same name in the same
+	module.
+
+2004-04-17  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs Add GtkToolItem constructor and method definitions.
+
+	* gtk/gtk.defs (gtk_tool_item_set_proxy_menu_item) Allow menu_item
+	to be NULL.
+	(gtk_tool_item_set_tooltip) Allow parameters tip_text and tip_private
+	to be NULL. Default these to NULL.
+
+	* gtk/gtk.defs Make gtk_tooltips_get_info_from_tip_window a method
+	of GtkWindow.
+
+	* gtk/gtk.override (_wrap_gtk_tooltips_get_info_from_tip_window) Add.
+
+	* codegen/argtypes.py (GtkTreePath) Remove extra older null assignment
+	- the one assuming a tree path is a tuple.
+
+	* gtk/gtk.defs (gtk_tree_model_filter_new) Allow root param to
+	default to NULL.
+
+2004-04-16  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override Expanded gtk_draw_* since it excluded new
+	gtk_draw_insertion_cursor function.
+
+	* gtk/gtk.override Add definition of PyGdkDrawable_Type
+
+	* gtk/gtk.defs (gtk_draw_insertion_cursor) area can be NULL.
+	(gtk_text_buffer_paste_clipboard) override_location can be NULL.
+
+	* gtk/gtktextview.override (_wrap_gtk_text_tag_table_foreach) Add.
+
+	* gtk/gtk.override (_wrap_gtk_toggle_tool_button_new) Allow an
+	optional stock_id parameter.
+	(gtk_toggle_tool_button_new_from_stock) Ignore.
+
+	* gtk/gtk.defs (gtk_toolbar_insert) (gtk_toolbar_get_item_index)
+	(gtk_toolbar_get_n_items) (gtk_toolbar_get_nth_item)
+	(gtk_toolbar_get_drop_index) (gtk_toolbar_set_drop_highlight_item)
+	(gtk_toolbar_set_show_arrow) (gtk_toolbar_get_show_arrow)
+	(gtk_toolbar_get_relief_style) Add new toolbar methods from GTK+ 2.4
+	
+	(gtk_toolbar_append_item) (gtk_toolbar_prepend_item)
+	(gtk_toolbar_insert_item) (gtk_toolbar_insert_stock)
+	(gtk_toolbar_append_space) (gtk_toolbar_prepend_space)
+	(gtk_toolbar_insert_space) (gtk_toolbar_remove_space)
+	(gtk_toolbar_append_element) (gtk_toolbar_prepend_element)
+	(gtk_toolbar_insert_element) (gtk_toolbar_append_widget)
+	(gtk_toolbar_prepend_widget) (gtk_toolbar_insert_widget)
+	(gtk_toolbar_set_icon_size) (gtk_toolbar_unset_icon_size)
+	Add deprecations for these old toolbar methods.
+
+	* gtk/gtk.override (_wrap_gtk_toolbar_append_item)
+	(_wrap_gtk_toolbar_prepend_item) (_wrap_gtk_toolbar_insert_item)
+	(_wrap_gtk_toolbar_insert_stock) (_wrap_gtk_toolbar_append_element)
+	(_wrap_gtk_toolbar_prepend_element) (_wrap_gtk_toolbar_insert_element)
+	Add deprecation warnings.
+
+	* gtk/gtk.defs (gtk_toolbar_set_drop_highlight_item) Allow
+	tool_item parameter to be NULL
+
+	* gtk/gtk.defs Add GtkToolButton constructor and method definitions.
+
+	* gtk/gtk.override (_wrap_gtk_tool_button_new) Allow specifying
+	stock_id or icon_widget - label combination.
+
+2004-04-16  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Post release version bump
+
+=== PyGtk 2.3.91 ===
+2004-04-16  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Update
+
+2004-04-15  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* pygboxed.c (PyGBoxed_Type, PyGPointer_Type): idem.
+
+	* pygobject.c (PyGObject_Type): idem.
+
+	* gobjectmodule.c (PyGInterface_Type): Typecast tp_free slot to
+	'freefunc' to avoid compiler warning.
+
+	* pygobject.h: Conditionally make an alias for function type
+	'destructor' called 'freefunc', for backward compatibility with
+	those poor souls still stuck with Python 2.2.
+
+	* codegen/codegen.py (Wrapper): change typecast of tp_free slot
+	from destructor to freefunc, for compatibility with Python 2.3.
+
+2004-04-15  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs Add defs for GtkRadioAction
+
+	* gtk/gtk.override (_wrap_gtk_radio_action_set_group)
+	(_wrap_gtk_radio_action_get_group) Add.
+
+	* gtk/gtk.defs Add defs for GtkRadioToolButton
+
+	* gtk/gtk.override (_wrap_gtk_radio_tool_button_new)
+	(_wrap_gtk_radio_tool_button_set_group)
+	(_wrap_gtk_radio_tool_button_get_group) Add.
+
+	* gtk/gtk.override (_wrap_gtk_scale_get_layout_offsets) Add.
+
+	* gtk/gtk.defs (gtk_selection_owner_set_for_display) Allow widget
+	param to be NULL.
+
+2004-04-14  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_icon_size_lookup_for_settings) Add.
+
+	* gtk/gtk.override (_wrap_gtk_icon_theme_get_search_path)
+	(_wrap_gtk_icon_theme_set_search_path) Add.
+
+	* gtk/gtk.override (_wrap_gtk_icon_theme_list_icons) Add.
+
+	* gtk/gtk-types.defs (IconInfo) Add GtkIconInfo boxed type.
+
+	* gtk/gtk.defs (gtk_icon_info_copy) Add (caller-owns-return #t)
+
+	* gtk/gtk.override (_wrap_gtk_icon_info_get_embedded_rect) Add.
+	(_wrap_gtk_icon_info_get_attach_points) Add.
+
+	* gtk/gtk.defs (gtk_list_store_move_sfter) Allow position to be NULL
+	(gtk_list_store_move_before) Allow position to be NULL
+
+	* gtk/gtk.defs (gtk_menu_set_screen) Allow screen to be NULL.
+
+2004-04-13  Johan Dahlin  <johan@gnome.org>
+
+	* gobjectmodule.c (pyg_register_interface): Move quark_to_string
+	to initgobject
+
+	* codegen/codegen.py: Add support for tp_new
+
+2004-04-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_wait_for_targets) Add.
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_request_contents)
+	(_wrap_gtk_clipboard_request_text)
+	(_wrap_gtk_clipboard_request_targets) Add.
+
+	* gtk/gtk.defs More gtk_ function cleanup.
+
+2004-04-12  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_action_group_add_radio_actions) Fix
+	bugs in connecting callback to first radio action.
+
+2004-04-12  Johan Dahlin  <johan@gnome.org>
+
+	* pygtk.spec.in: Update, with help of Jason Tackaberry and Thomas
+	Vander Stichele
+
+2004-04-11  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: Add 2.3.90 stuff here, forgot to do it!
+
+	* AUTHORS: Update, add the current active developers here
+
+	* pygobject.c (pygobject_new_with_interfaces): New function.
+	(pygobject_lookup_class): Modify so we're not traversing parents
+	for unknown types but instead creating new types when they're not
+	registered. We're also using pygobject_new_with_interfaces so
+	interfaces gets attached correctly. Partial fix for bug 129032
+
+	* gobjectmodule.c: Add quark and attach the PyTypeObject for
+	GInterfaces. 
+
+	* pygobject-private.h: Make PyGInterface_Type and
+	pyginterface_type_key public	
+
+2004-04-10  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_action_group_add_toggle_actions) Make
+	method more like C API - add is_active processing.
+	(_wrap_gtk_action_group_add_radio_actions) Make method more like C API
+	- remove per item callback processing, add value and on_change
+	parameters and processing.
+	Add Runtime exceptions.
+
+	* gtk/gtk.defs (gtk_clipboard_set_text) Allow len param to default to
+	-1 - calculates text length.
+
+2004-04-10  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/__init__.py: Move GtkDeprecatedWarning ...
+	Remove global module import and do it in the class _Deprecated and
+	delete _Deprecated when done.
+	(_Deprecated.__repr__): Add.
+
+	* gtk/gtkmodule.c: ... here, and rename it to DeprecatedWarning
+
+2004-04-10  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* configure.in: Bump version up to 2.3.91.
+
+	* examples/pygtk-demo/demos/images.py: Add 'Images' demo ported to
+	python by Joey Tsai (see bug #100873).
+
+	* Makefile.am (EXTRA_DIST): Add floppybuddy.gif and alphatest.png,
+	copied from gtk+, for pygtk-demo.
+
+2004-04-09  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (gtk_action_group_add_action_with_accel) The accelerator
+	can be NULL to force stock accel usage.
+
+2004-04-09  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* pygtype.c (pyg_value_as_pyobject): Convert GValueArray to python
+	list, not tuple, as per comment in bug 129966.
+
+	* gobjectmodule.c (initgobject, _pyg_strv_from_gvalue)
+	(_pyg_strv_to_gvalue): Register GValue<->PyObject conversion
+	functions for boxed type G_TYPE_STRV.  Code is taken from
+	gnome-python (bonobomodule.c), except that conversion to python
+	object creates python list instead of tuple, as per comment in bug
+	129966.
+
+2004-04-09  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/__init__.py: Add deprecation warnings for all deprecated functions.
+
+2004-04-08  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_file_filter_filter) Add.
+	(_wrap_gtk_file_filter_add_custom) Add.
+
+	* gtk/gtk.override (_wrap_gtk_font_button_new) Add to allow optional
+	fontname parameter.
+
+	* gtk/gtk.override (_wrap_gtk_action_get_proxies) Add.
+
+2004-04-07  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_widget_new) Add to allow
+	action and backend as optional parameters similar to 
+	_wrap_gtk_file_chooser_dialog_new.
+
+2004-04-07  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_color_button_get_color): Remove
+	unused variable.
+
+	* configure.in: Nicer error messages (pytk-2-2 branch instead of gnome-gtk-1-2)
+
+	* codegen/codegen.py (Wrapper.write_methods): Use the methods name
+	(instead of the "c" name) so we get a nicer output.
+
+2004-04-06  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_get_filenames)
+	(_wrap_gtk_file_chooser_get_uris)
+	(_wrap_gtk_file_chooser_list_filters)
+	(_wrap_gtk_file_chooser_list_shortcut_folder_uris)
+	(_wrap_gtk_file_chooser_list_shortcut_folders) Add.
+
+	* gtk/gdk.defs (gdk_pixbuf_new_from_file_at_size) Add.
+
+2004-04-05  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.defs (gtk_entry_new_with_max_length): Remove deprecation flag
+
+2004-04-05  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_combo_box_entry_new) Allow a TreeModel 
+	and text column to be optionally specified when creating a
+	ComboBoxEntry. Allow model parameter to be None.
+	(_wrap_gtk_combo_box_new) Allow model parameter to be None.
+
+	* gtk/gtk.override (_wrap_gtk_entry_completion_set_match_func) Add.
+
+2004-04-04  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs Removed gtk_ from various define-function definitions
+	so that the function naming is consistent i.e. gtk.function instead
+	of gtk.gtk_function: gtk_accel_map_add_entry,
+	gtk_binding_parse_binding, gtk_combo_box_new_text,
+	gtk_combo_box_entry_new_text, gtk_file_system_error_quark,
+	gtk_file_paths_sort, gtk_file_paths_copy, gtk_file_paths_free,
+	gtk_icon_theme_error_quark, gtk_icon_theme_get_default,
+	gtk_icon_theme_get_for_screen, gtk_icon_theme_add_builtin_icon,
+	gtk_preview_get_info, gtk_tooltips_data_get,
+	gtk_tree_path_new_from_string, gtk_tree_path_new_from_indices and
+	gtk_tree_path_new_first.
+
+	* gtk/gtk.override (_wrap_gtk_tooltips_data_get1) Add deprecation
+	warning for gtk.gtk_tooltips_data_get().
+
+	* gtk/gtk.defs (gtk_cell_layout_pack_start)
+	(gtk_cell_layout_pack_end) Allow the expand param to default to TRUE.
+
+2004-04-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gdk.override (_wrap_gdk_window_new): If compiling for win32
+	platform, add a g_object_ref for the newly created GdkWindow.
+	Thanks John Ehresman.  Fixes #122755.
+
+	* gtk/Makefile.am (_gtk_la_CFLAGS): Add -DPLATFORM_WIN32 depending
+	on PLATFORM_WIN32 AM conditional.
+
+2004-04-04  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.defs (icon_set_new): Is not a constructor, patch from
+	Scott Tsai, fixes bug 138576
+
+2004-04-03  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_color_button_new) Implement with
+	gtk_color_button_new_with_color() to allow optionally specifying
+	a GdkColor.
+
+	* gtk/gtk.override (_wrap_gtk_color_button_get_color) Return a
+	GdkColor instead of passing in a GdkColor to be filled in.
+
+	* gtk/gtk-types.defs Added CellLayout interface and references to it
+	for ComboBox, ComboBoxEntry, TreeViewColumn and EntryCompletion.
+
+	* gtk/gtk.override (_wrap_gtk_combo_box_new) Allow a TreeModel to be
+	optionally specified when creating a ComboBox.
+	(_wrap_gtk_combo_box_get_active_iter) Return a TreeIter pointing at the
+	active item or None if no active item.
+
+	* gtk/gtk.override (_wrap_gtk_cell_layout_set_attributes) Added.
+
+2004-04-02  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* acconfig.h: This file is deprecated in newer automake.  Removed.
+
+2004-04-02  Johan Dahlin  <johan@gnome.org>
+
+	* pygtk-2.0.pc.in (pyexecdir): Add
+
+	* gtk/gtktreeview.override: Update ignore
+
+	* gtk/gtk.override (_wrap_gtk_action_group_list_actions) 
+	(_wrap_gtk_action_group_add_toogle_actions) 
+	(_wrap_gtk_action_group_add_radio_actions): Impl. 
+	Update ignore
+
+2004-04-01  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_accel_group_connect_by_path) Add.
+	(_wrap_gtk_file_chooser_dialog_new) Fix small bug.
+
+2004-03-31  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_alignment_get_padding) Add.
+	
+=== PyGtk 2.3.90 ===
+
+2004-03-30  Johan Dahlin  <johan@gnome.org>
+
+	* examples/gtk/filechooser.py (response): Updated, call dialog.destroy()
+
+	* examples/gtk/uimanager.py: New example
+
+	* gtk/gtk.override (_wrap_gtk_ui_manager_add_ui_from_string):
+	Override, get rid of second argument.
+
+	* gtk/gtk.defs (gtk_ui_manager_new): is Constructor of
+	GtkUIManager, not GtkUiManager.
+
+	* gtk/gtk.override (_wrap_gtk_action_group_add_actions): Impl
+
+2004-03-28  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* gtk/gtk-types.defs: Fixes #138476 . Added the Layout class 
+	(Patch from scottt)
+
+2004-03-29  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Add
+	backend as fifth argument
+	(_wrap_gtk_progress_bar_new_with_adjustment): Fix constructor, it
+	should return an int, not a PyObject.
+
+	* gtk/gtk.defs: Remove GtkText, GtkTree and GtkTreeItem.
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_set): Impl.
+
+	* gtk/gtk.override (_wrap_gtk_button_get_alignment): Impl.
+	(_wrap_gtk_ui_manager_get_toplevels): Impl.
+
+2004-03-28  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Impl,
+	based on gtk_dialog_new
+
+	* Makefile.am: Add example to EXTRA_DIST
+
+	* examples/gtk/filechooser.py (filter): New example
+
+2004-03-28  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* gtk/gtk.defs: Updated to match gtk 2.4 API.
+
+2004-03-28  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk-types.defs (TreeModelFilter): implements
+	GtkTreeModel and GtkTreeDragSource
+	(FileFilter): Add
+	(FileChooserDialog): implements GtkFileChooser
+	(FileChooser): Add.
+
+	* gtk/gdk.defs, gtk/gdk.defs: Merge in some changes from 2.4.
+
+	* gtk/gtk-types.defs: Gtk+ 2.4 API and remove GtkTextLayout (which
+	was accidentally added)
+
+	* configure.in: Require glib 2.4, gtk+ 2.4 and libglade 2.3.6.
+
+	* codegen/h2def.py: Add a new option to be able to separate
+	output of objects and functions
+
+	* gtk/gtk-types.defs: Sort and remove ifdef HAVE_GTK24 for 
+	GtkTextSearchFlags
+
+	* gtk/gtk.override: Remove unneedded ignore statement
+
+	* gtk/pygtkcellrenderer.h: Cleanup 
+
+	* gtk/pygtktreemodel.h: Ditto
+
+	* gtk/gtktreeview.override: Add a prototype for
+	pygtk_cell_data_func_marshal
+
+2004-03-27  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.defs (widget_list_style_properties): This is a function,
+	not a method.
+
+	* pygobject-private.h, pygobject.h, gobjectmodule.c: 
+	Make PyGParamSpec_Type and pyg_param_spec_new part of the public API.
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_style_get_property) 
+	(_wrap_gtk_widget_class_list_style_properties): Impl. Fixes
+	bug 138104
+
+	* setup.py: Removed installation of libglade and libxml2 DLLs on
+	win32 (these are now part of the dropline installer).
+	patch by Cedric Gustin, fixed bug 136731
+
+	* gtk/gtk.override (_wrap_gtk_main_quit): Override, this does
+	two things differently from the old (auto generated) version,
+	first it checks if gtk_main_level() is non zero and raises a
+	RuntimeError if it's not. It also allows arguments and completely
+	ignores them, this is closer to the old 0.6.x behavior and
+	suitable for usage like this: obj.connect(signal, gtk.main_quit),
+	fixes bug 136705
+
+	* gtk/gtkmodule.c (python_do_pending_calls): Check gtk_main_level
+	before calling gtk_main_quit, since it might be called outside of
+	a mainloop (eg, gtk.main_iteration). Avoids warnings on the console
+	as found in example in bug 138163
+
+2004-03-25  Johan Dahlin  <johan@gnome.org>
+
+	* examples/glade/autoconnect.py: New small example
+
+2004-03-22  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* gtk/gtk.defs: Removed the _gtk_* functions as the are private
+	and not exported in the module.
+
+2004-03-22  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* codegen/h2def.py: Added the interface detection (interface -*Iface-
+	inheriting from GTypeInterface)
+
+2004-03-20  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtkmodule.c (init_gtk): Define constants for the predefined
+	atoms listed in <gdk/gdkselection.h>.  Fixes #137091 ("constants"
+	for selection atoms).
+
+	* gtk/gdk.override (_wrap_gdk_atom_intern): Override; return
+	Py_None if gdk_atom_intern returns GDK_NONE.  Fixes #137093
+	"gtk.gdk.atom_intern always creates an atom".
+	(headers): Add protype for have_numpy() to avoid later
+	implicit declaration warning.
+
+2004-03-18  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* codegen/h2def.py: Added the interface detection (class
+	inheriting from GTypeInterface)
+
+2004-03-18  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* gtk/gtk.defs: Cosmetic changes to match h2def output exactly
+	in order to ease further merges.
+
+2004-03-12  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_accel_group_connect_group): 
+
+2004-03-12  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	Fixes #136811 (h2def ignores some functions)
+	* codegen/h2def.py: skips the extern "C"
+
+=== PyGTK 2.2.0 ===
+
+2004-03-11  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Bump version
+
+	* setup.py (MINOR_VERSION): Bump version
+
+	* NEWS: Update
+
+2004-03-09  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* codegen/code-coverage.py: utility to scan the unmatched symbols
+	from the binded libraries. Written by James Henstridge (see bug
+	#71465)
+
+2004-03-09  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	Fixes #136597 (gtkgl still referenced in build files)
+	* gtk/.cvsignore:
+	* gtk/makefile.msc:
+	Removed references to gtkgl.
+
+2004-03-09  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (pygdk_filter_func_marshal): Impl.
+	(_wrap_gdk_window_add_filter): Impl.
+
+2004-03-08  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* configure.in: Remove leftover definition of gtkgl_required_version.
+
+	* gobjectmodule.c (pyg_enum_add_constants): Delegate to
+	pyg_flags_add_constants if the GType is really a flags type
+	instead of enum.
+	(pyg_flags_add_constants): Delegate to pyg_enum_add_constants if
+	the GType is really a enum type instead of flags.  Based on John
+	Ehresman's patch.  Fixes (better) #136204 (GtkTextSearchFlags warning).
+
+2004-03-07  Hagen Moebius  <hagen.moebius@starschiffchen.de>
+ 
+         * codegen/docextract.py: avoid the non-uniform behavior of gtk-doc
+         to have an imaginary "returns" parameter. it is converted into the
+         <return>-tag.
+
+2004-03-07  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* examples/pygtk-demo/gtk-logo-rgb.gif,
+	* Makefile.am (EXTRA_DIST): Add gtk-logo-rgb.gif, because of stock
+	icon registration example.
+
+	* examples/pygtk-demo/demos/appwindow.py: Fix stock icon
+	registration.
+
+2004-03-06  John Ehresman  <jpe@wingide.com>
+
+	* gtk/gtktreeview.override (map_expanded_rows_cb)
+	(_wrap_gtk_tree_view_map_expanded_rows): Wrapper for
+	GtkTreeView.map_expanded_rows.  Fixes #136309.  Review and minor
+	enhancement by Gustavo Carneiro.
+
+	* gtk/pygtktreemodel.c (pygtk_generic_tree_model_iface_init)
+	(pygtk_generic_tree_model_unref_node)
+	(pygtk_generic_tree_model_ref_node): Add support for optional
+	TreeModel ref_node & unref_node callbacks.  Fixes #136312.
+	Reviewed by Gustavo Carneiro.
+
+	* gtk/gtktreeview.override (pygtk_cell_data_func_marshal): Fix
+	reference problem on cunote->data.  Fixes #136306
+	( pygtk_cell_data_func_marshal ref counting in 2.2.0rc1 ).
+	Reviewed by Gustavo Caneiro.
+
+2004-03-06  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/makefile.msc: use PYGTK_CODEGEN_DEFINES here too.
+
+	* gtk/gtk-types.defs: Make TextSearchFlags an enum or flags type,
+	conditional on HAVE_GTK24 being defined.  Fixes #136204.
+
+	* gtk/Makefile.am (.defs.c): Pass $(PYGTK_CODEGEN_DEFINES) to code
+	generator, for conditional compiling of GTK+ 2.4 features.
+
+	* configure.in: Check for gtk+ >= 2.3.4 and, if found, define
+	PYGTK_CODEGEN_DEFINES="-DHAVE_GTK24".
+
+	* codegen/defsparser.py (DefsParser.ifndef): Implement (ifndef
+	...)
+	(DefsParser.ifdef): args no longer includes the function name
+	(ifdef) as first element of list, so needed to offset indices to
+	make it work again.
+	(DefsParser.ifndef): idem.
+
+2004-03-05  Johan Dahlin  <johan@gnome.org>
+
+	* codegen/codegen.py (Wrapper.write_constructor): Cleaning up
+	write_source and starting to refactor Wrapper a little bit, to
+	avoid so much code duplication
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_fill): This should fix both 
+	bug 136205 and bug 136205. We're now allowing both long and int
+	and converts them properly.
+	
+2004-03-04  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_get_pixels_array): New function
+	(_wrap_gdk_pixbuf_get_pixels_array): Deprecate, in favor of
+	.get_pixels_array(), based on Patch by Tim Evans, fixes bug 90255
+
+	* pygobject.c (pygobject_chain_from_overridden): 
+	* pygtype.c (pyg_signal_class_closure_marshal): Fixes for bug
+	132704, Patch by John Ehresman.
+
+	* gtk/gdk.override (have_numpy): New function, to initialize/check numpy
+	(_wrap_gdk_pixbuf__get_pixel_array): Use it here
+	(_wrap_gdk_pixbuf_new_from_array): and here
+	Patch by Tim Evans, fixed bug 122786
+
+2004-03-03  Graham Carlyle  <gcarlyle@cmedltd.com>
+
+	* gobjectmodule.c (pyobject_free): block/unblock threads around
+	Py_DECREF, because we may not hold the interpreter lock at this
+	point.  Fixes #135963 (gc of gtk.ListStore aborts intrepeter after
+	gtk.threads_init() called).  Reviewed by Gustavo Carneiro.
+
+2004-03-02  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_getattr): Add
+	GdkEventKey.hardware_code. Fixes bug 129032, patch by Laur Ivan.
+
+2004-03-01  Johan Dahlin  <johan@gnome.org>
+
+	* codegen/codegen.py (Wrapper.write_methods): Check for defined
+	methods in the override file.
+	(Wrapper.write_functions): Ditto for functions
+
+	* codegen/override.py (Overrides.__parse_override): Clean up a
+	little and add some docstrings. Also add a new keyword, define
+	(Overrides.get_functions, Overrides.get_defines_for) 
+	(Overrides.function, Overrides.define): New methods.
+
+2004-02-28  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_accel_group_connect): Add wrapper
+	for gtk_accel_group_connect.
+
+2004-02-24  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtkmodule.c, gtk/pygtk.h: Make pygdk_rectangle_from_pyobject
+	a public API function.  Fixes #135279.
+
+2004-02-24  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_stock_list_ids): Plug a leak.
+
+	* pygobject.c (pygobject_chain_from_overridden): signa->signal
+
+2004-02-23  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gdk.defs (GdkDrawable.get_image): Add caller-owns-return, as
+	suggested by John D. Hunter.  Fixes #133681.
+
+	* gtk/gtk.override (_wrap_gtk_menu_popup): accept large long
+	integers for the 'time' argument.
+
+2004-02-23  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* Makefile.am:
+	* gtk/Makefile.am: applied patch from Naofumi Yasufuku. Fixes
+	bug 121339 (dsextras.py installation directory).
+
+2004-02-22  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_new_from_array)
+	(_wrap_gdk_pixbuf_new_from_array): apply Tim Evans' patch to
+	create pixbuf from data (string) or from a Numeric Python array.
+
+2004-02-22  Xavier Ordoquy  <xordoquy@wanadoo.fr>
+
+	* codegen/h2def.py: don't expect a whitespace after the type name
+	Fixes bug #128988, patch from Jon Willeke.
+
+2004-02-19  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtktreeview.override (pygtk_cell_data_func_marshal): Fix
+	multiple python object reference leaks.
+
+2004-02-14  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* gtk/gtk.override (_wrap_gtk_binding_entry_remove): impl.
+
+	* gtk/gtk.defs (binding_entry_remove): remove gtk_ prefix from
+	function name.
+
+2004-02-10  Seth Nickell  <seth@gnome.org>
+
+	Reviewed by: random luser <kiko@async.com.br>
+
+	* gtk/gdk.override:
+
+	Change type of argument in signature for gdk.event_get_axis
+	from "d" to "i" so that get_axis works
+
+2004-01-14  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/pygtktreemodel.c (pygtk_generic_tree_model_iter_n_children):
+	Allow iter to be set to NULL, based on patch by Don Allingham
+	Fixes bug 125172
+
+2003-12-24  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* pygtype.c (pyg_value_as_pyobject): Add special handling for
+	GValueArray, converting it to a tuple while calling
+	pyg_value_as_pyobject recursively for each inner value.
+
+2003-12-23  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtktreeview.override
+	(pygtk_tree_selection_get_selected_rows): implement (fixes bug
+	#111489).
+
+	* codegen/h2def.py (clean_func): apply patch from Jon Willeke
+	<willeke@users.sourceforge.net> to strip out eg. G_BEGIN_DECLS,
+	which was tripping up some of the following regexps (fixes bug
+	#129414).
+
+	* pygobject.c (pygobject_get_property): explicitly check if the
+	property is readable first, and raise an exception otherwise
+	(pygobject_set_property): check if property is readable (fixes bug
+	#121544).
+
+2003-12-22  James Henstridge  <james@daa.com.au>
+
+	* setup.py: distutils fixes from Alif Wahid
+	<awah005@users.sourceforge.net> (bug #123014).
+
+	* gtk/gdk.override (ignore-win32): ignore gdk_font_get_display.
+
+	* gtk/gtk.override (ignore): ignore plug construct functions.
+	(ignore-win32): ignore gtk_plug_new_for_display.
+
+	* gtk/gdk.defs (pixmap_foreign_new_for_display): caller owns return.
+	(pixmap_foreign_new): same here (bug #129754).
+	(window_foreign_new): same here.
+	(window_foreign_new_for_display): same here.
+
+2003-12-20  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* codegen/codegen.py (Wrapper.get_initial_constructor_substdict):
+	now receives the constructor FunctionDef as argument.
+	(Wrapper.write_constructor): Pass the constructor
+	get_initial_constructor_substdict.
+	(GObjectWrapper.get_initial_constructor_substdict): Receive/pass
+	constructor argument. If constructor's caller_owns_return flag is
+	set to #f, add an extra g_object_ref(self->obj).
+	(GBoxedWrapper.get_initial_constructor_sub): Receive/pass extra
+	constructor argument.
+	(GPointerWrapper.get_initial_constructor_substdict): idem.
+
+2003-12-17  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk-types.defs (TextSearchFlags): GtkTextSearchFlags is a
+	flags value, rather than an enum.
+
+2003-12-16  James Henstridge  <james@daa.com.au>
+
+	* configure.in (CFLAGS): add -fno-strict-aliasing to CFLAGS if the
+	compiler supports it.  The Python API breaks some of the strict
+	aliasing rules.
+
+	* acinclude.m4 (JH_ADD_CFLAG): new macro to check whether the
+	compiler supports a particular cflag.
+
+	* codegen/codegen.py
+	(GInterface.get_initial_class_substdict): GInterface wrappers
+	should be sizeof(PyObject), since they are mixins.
+
+2003-12-19  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.defs (fill): Change to guint32. Patch by
+	hyriand@thegraveyard.org. Fixes 121611.
+
+	* gtk/pygtkcellrenderer.c
+	(pygtk_generic_cell_renderer_start_editing): Allow return values
+	that are NULL. Patch by Tim Evans, fixes #122786
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_model_iter_children):
+	Allow parent to be None. Patch by Benjamin CAMA, fixes #124593
+
+	* gtk/gtk.defs: Allow all GdkColor arguments for
+	gtk_widget_modify_* to be null. Patch by jkluebs@luebsphoto.com,
+	fixes #127178
+	(GtkTreeView.expand_row): Set return value to gboolean. Patch by
+	Doug Quale, fixes #126406
+
+2003-12-18  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.defs (set_tip): Allow null for tip_text. Patch by John
+	Ehresman, fixes #128623.
+
+	* gtk/pygtktreemodel.c: handle None iterator values. Patch by John
+	Ehresman, fixes #126479.
+
+2003-12-09  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtktreeview.override (_wrap_gtk_list_store_reorder): Impl.
+
+2003-12-05  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtktreeview.override (pygtk_tree_selection_foreach_marshal):
+	Increase the ref count on Py_None (#128448, Vsevolod Fedorov)
+
+	* gtk/gtk-types.c (pygtk_tree_model_row_get_parent): Swap parent
+	and child argument. (#123605, patch by Steve Chaplin)
+
+2003-10-23  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.override (_wrap_gtk_item_factory_create_items): Use
+	GdkPixbuf objects instead of raw strings, Thanks to Rob Melby for
+	the patch, #123456
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_size_request): pass
+	back the values instead of pointers to them. Thanks to Rob Melby
+	for the patch, #125272
+
+2003-09-17  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_set_with_data): wrap
+	function.
+
+2003-09-16  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_window_set_geometry_hints): add wrapper.
+	(gdk_window_peek_children): ignore.
+	(_wrap_gdk_window_set_icon_list): add wrapper.
+	(_wrap_gdk_screen_get_setting): add wrapper (this one spews lots
+	of warnings though.  Not sure how to fix properly).
+
+2003-09-15  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override (_wrap_gdk_display_get_window_at_pointer): add
+	wrapper.
+	(_wrap_gdk_drag_find_window_for_screen): add wrapper.
+
+	* gtk/gtkgl*: remove files.
+
+	* gtk/Makefile.am: remove gtkgl binding.
+
+	* configure.in (build_gtkgl): remove gtkgl bindings.
+
+2003-09-04  James Henstridge  <james@daa.com.au>
+
+	* gtk/gtk.override (headers): add defs for GdkDisplay and GdkScreen
+
+	* gtk/gtk.defs, gtk/gtk-types.defs: update for 2.2 APIs.  Covers
+	bug #113224, #113908, #117929 and #121031.
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_get_formats): implement
+	function.  Returns a list of dictionaries (bug #118253).
+
+2003-09-03  James Henstridge  <james@daa.com.au>
+
+	* gtk/gdk.override: add some overrides for GdkDisplay and GdkScreen.
+
+	* gtk/Makefile.am (gtk_overrides): gtk.c doesn't depend on
+	gdk.override.
+
+	* gtk/gdk.override: hack so that GDK_DISPLAY() is the cast macro.
+
+	* gtk/gdk.defs, gtk/gdk-types.defs: incorporate new 2.2 APIs.
+
+	* configure.in: set version number to 2.1.0 so that it differs
+	from the 2.0 branch.
+
+2003-09-02  James Henstridge  <james@daa.com.au>
+
+	* ChangeLog.pre-2-0: rename old change log.
+
Index: pkg/pygtk/branches/upstream/current/pygtk_postinstall.py
===================================================================
--- pkg/pygtk/branches/upstream/current/pygtk_postinstall.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/pygtk_postinstall.py	(revision 4)
@@ -0,0 +1,108 @@
+
+"""pygtk is now installed on your machine.
+
+Local configuration files were successfully updated."""
+
+import os, os.path, re, sys
+import distutils.sysconfig
+import distutils.file_util
+import distutils.errors
+
+PYGOBJECT_XSL_DIR = os.path.join('share', 'pygobject','xsl')
+PYGOBJECT_HTML_DIR = os.path.join('share', 'gtk-doc', 'html', 'pygobject')
+HTML_DIR = os.path.join('share', 'gtk-doc', 'html', 'pygtk')
+
+prefix_pattern=re.compile("^prefix=.*")
+exec_pattern=re.compile("^exec\s.*")
+codegendir_pattern=re.compile("^codegendir=.*")
+
+def replace_prefix(s):
+    if prefix_pattern.match(s):
+        s='prefix='+sys.prefix.replace("\\","/")+'\n'
+    if exec_pattern.match(s):
+        s=('exec '+sys.prefix+'\\python.exe '+
+           '$codegendir/codegen.py \"$@\"\n').replace("\\","/")
+    if codegendir_pattern.match(s):
+        s=('codegendir='
+           +distutils.sysconfig.get_python_lib().replace("\\","/")+
+           '/gtk-2.0/codegen' + '\n')
+    return s
+
+def copy_pygobject_css():
+    # Copy style.css from pygobject docs to pygtk docs
+    try:
+        distutils.file_util.copy_file(
+            os.path.normpath(os.path.join(sys.prefix, PYGOBJECT_HTML_DIR,
+                                          'style.css')),
+            os.path.normpath(os.path.join(sys.prefix,HTML_DIR)))
+    except distutils.errors.DistutilsFileError:
+        # probably pygobject has not been installed yet
+        pass
+        
+    
+
+def html_fixxref():
+    sys.path.insert(0, os.path.normpath(os.path.join(sys.prefix,
+                                                     PYGOBJECT_XSL_DIR)))
+    try:
+        import fixxref
+        fixxref.scan_index_dir(fixxref.DOCDIR)
+        fixxref.fix_xrefs(os.path.normpath(os.path.join(sys.prefix,
+                                                        HTML_DIR)))
+    except ImportError, e:
+        pass
+
+# TODO : Check that shortcuts are created system-wide when the user
+# has admin rights (hint: see pywin32 postinstall)
+def create_shortcuts():
+    progs_folder= get_special_folder_path("CSIDL_COMMON_PROGRAMS")
+    site_packages_dir = os.path.join(sys.prefix , 'lib','site-packages')
+   
+    pygtk_shortcuts = os.path.join(progs_folder, 'PyGTK')
+    if not os.path.isdir(pygtk_shortcuts):
+        os.mkdir(pygtk_shortcuts)
+       
+    pygtk_doc_link=os.path.join(pygtk_shortcuts,
+                                    'PyGTK Documentation.lnk')
+    if os.path.isfile(pygtk_doc_link):   
+        os.remove(pygtk_doc_link)
+    
+    create_shortcut(os.path.join(sys.prefix,'share','gtk-doc','html',
+                                 'pygtk','index.html'),
+                    'PyGTK Documentation', pygtk_doc_link)
+   
+    homepage_link = os.path.join(pygtk_shortcuts,
+                                 "PyGTK Home.lnk")
+    if os.path.isfile(homepage_link):   
+        os.remove(homepage_link)
+    create_shortcut("http://www.pygtk.org",'PyGTK Homepage', homepage_link)
+
+def remove_shortcuts():
+    pygtk_shortcuts = os.path.join(
+        get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK')
+    os.remove(os.path.join(pygtk_shortcuts,'PyGTK Documentation.lnk'))
+    os.remove(os.path.join(pygtk_shortcuts,'PyGTK Home.lnk'))
+    try:
+        os.rmdir(pygtk_shortcuts)
+    except OSError, e:
+        # Directory is not empty, so leave it like that !
+        pass
+
+if len(sys.argv) == 2:
+    if sys.argv[1] == "-install":
+        filenames=['lib/pkgconfig/pygtk-2.0.pc','bin/pygtk-codegen-2.0']
+        for filename in filenames: 
+            pkgconfig_file = os.path.normpath(
+                os.path.join(sys.prefix,filename))
+
+            lines=open(pkgconfig_file).readlines()
+            open(pkgconfig_file, 'w').writelines(map(replace_prefix,lines))
+        copy_pygobject_css()
+        html_fixxref()
+        # TODO: Add an installer option for shortcut creation 
+        # create_shortcuts()
+        print __doc__
+    elif sys.argv[1] == "-remove":
+        # remove_shortcuts()
+        os.remove(os.path.normpath(
+            os.path.join(sys.prefix,HTML_DIR,'style.css')))
Index: pkg/pygtk/branches/upstream/current/configure.in
===================================================================
--- pkg/pygtk/branches/upstream/current/configure.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/configure.in	(revision 4)
@@ -0,0 +1,322 @@
+-*- mode: m4 -*-
+AC_PREREQ(2.52)
+
+dnl the pygtk version number
+m4_define(pygtk_major_version, 2)
+m4_define(pygtk_minor_version, 10)
+m4_define(pygtk_micro_version, 4)
+m4_define(pygtk_version, pygtk_major_version.pygtk_minor_version.pygtk_micro_version)
+
+dnl versions of packages we require ...
+m4_define(glib_required_version,       2.8.0)
+m4_define(pango_required_version,      1.10.0)
+m4_define(atk_required_version,        1.8.0)
+m4_define(gtk_required_version,        2.8.0)
+m4_define(libglade_required_version,   2.5.0)
+m4_define(gtkunixprint_required_version,  2.9.0)
+m4_define(pycairo_required_version,    1.0.2) dnl or 1.1.7
+m4_define(pygobject_required_version,  2.12.1)
+
+AC_INIT(pygtk, pygtk_version,
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=pygtk])
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .")
+
+AC_DEFINE(PYGTK_MAJOR_VERSION, pygtk_major_version, [PyGtk major version])
+AC_SUBST(PYGTK_MAJOR_VERSION, pygtk_major_version)
+AC_DEFINE(PYGTK_MINOR_VERSION, pygtk_minor_version, [PyGtk minor version])
+AC_SUBST(PYGTK_MINOR_VERSION, pygtk_minor_version)
+AC_DEFINE(PYGTK_MICRO_VERSION, pygtk_micro_version, [PyGtk micro version])
+AC_SUBST(PYGTK_MICRO_VERSION, pygtk_micro_version)
+
+AC_CONFIG_SRCDIR([gtk/gtkmodule.c])
+AM_CONFIG_HEADER(config.h)
+
+AM_INIT_AUTOMAKE
+AC_CHECK_FUNCS(bind_textdomain_codeset)
+
+dnl put the ACLOCAL flags in the makefile
+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_MSG_CHECKING([for some Win32 platform])
+case "$host" in
+  *-*-mingw*|*-*-cygwin*)
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$platform_win32])
+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+  *-*-mingw*)
+    os_win32=yes
+    ;;
+  *)
+    os_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+
+AC_DISABLE_STATIC
+
+dnl XXXX hack to kill off all the libtool tags ...
+dnl it isn't like we are using C++ or Fortran.
+dnl (copied from libglade/configure.in)
+m4_define([_LT_AC_TAGCONFIG],[])
+
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+AM_PATH_PYTHON(2.3.5)
+
+AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+
+AC_ARG_ENABLE(thread,
+  AC_HELP_STRING([--disable-thread], [Disable pygtk threading support]),,
+  enable_thread=yes)
+
+AM_CHECK_PYMOD(thread,,,enable_thread=no)
+
+dnl Building documentation
+AC_ARG_ENABLE(docs,
+  AC_HELP_STRING([--enable-docs], [Enable documentation building]),enable_docs=yes,
+  enable_docs=no)
+if test "${enable_docs}" != no; then
+  dnl Check for xsltproc
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  if test -z "$XSLTPROC"; then
+    enable_docs=no
+  fi
+fi
+
+AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno)
+
+
+AC_MSG_CHECKING(whether to enable threading in pygtk)
+if test "x$enable_thread" != xno; then
+  extra_mods=gthread
+  THREADING_CFLAGS=
+  AC_MSG_RESULT(yes)
+else
+  extra_mods=
+  THREADING_CFLAGS="-DDISABLE_THREADING"
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST(THREADING_CFLAGS)
+CPPFLAGS="${CPPFLAGS} $THREADING_CFLAGS"
+
+dnl get rid of the -export-dynamic stuff from the configure flags ...
+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+
+dnl glib
+AM_PATH_GLIB_2_0(glib_required_version,,[AC_MSG_ERROR(gobject is required to build pygtk?)],gobject $extra_mods)
+if test -n "$export_dynamic"; then
+  GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+PKG_CHECK_MODULES(PYGOBJECT, [pygobject-2.0 >= pygobject_required_version])
+
+PYGOBJECT_INCLUDEDIR=`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0`
+AC_SUBST(PYGOBJECT_INCLUDEDIR)
+
+PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0`
+AC_SUBST(PYGOBJECT_DATADIR)
+
+PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`"
+AC_SUBST(PYGOBJECT_FIXXREF)
+
+PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs pygobject-2.0`"
+AC_SUBST(PYGOBJECT_PYGDOCS)
+
+dnl atk
+PKG_CHECK_MODULES(ATK, atk >= atk_required_version,
+	have_atk=true, have_atk=false)
+AC_SUBST(ATK_CFLAGS)
+AC_SUBST(ATK_LIBS)
+AM_CONDITIONAL(BUILD_ATK, $have_atk)
+if test -n "$export_dynamic"; then
+  ATK_LIBS=`echo $ATK_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+dnl pango
+PKG_CHECK_MODULES(PANGO, pango >= pango_required_version,
+	have_pango=true, have_pango=false)
+AC_SUBST(PANGO_CFLAGS)
+AC_SUBST(PANGO_LIBS)
+AM_CONDITIONAL(BUILD_PANGO, $have_pango)
+if test -n "$export_dynamic"; then
+  PANGO_LIBS=`echo $PANGO_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+dnl pycairo
+PYGTK_CODEGEN_DEFINES=""
+AC_SUBST([PYGTK_CODEGEN_DEFINES])
+
+gtk_version=""
+PKG_CHECK_MODULES(PYCAIRO, [pycairo >= pycairo_required_version],
+        have_pycairo=true, have_pycairo=false)
+AC_SUBST(PYCAIRO_CFLAGS)
+AC_SUBST(PYCAIRO_LIBS)
+if test $have_pycairo; then
+  PYGTK_CODEGEN_DEFINES="-DHAVE_PYCAIRO $PYGTK_CODEGEN_DEFINES";
+  AC_DEFINE([HAVE_PYCAIRO], [1], [Define to 1 if pycairo is available])
+
+  AC_DEFINE_UNQUOTED(PYCAIRO_MAJOR_VERSION, [`pkg-config --modversion pycairo | cut -d '.' -f 1`], dnl
+                     [pycairo major version])
+  AC_DEFINE_UNQUOTED(PYCAIRO_MINOR_VERSION, [`pkg-config --modversion pycairo | cut -d '.' -f 2`], dnl
+                     [pycairo minor version])
+  AC_DEFINE_UNQUOTED(PYCAIRO_MICRO_VERSION, [`pkg-config --modversion pycairo | cut -d '.' -f 3`], dnl
+                     [pycairo micro version])
+
+  dnl pangocairo
+  PKG_CHECK_MODULES(PANGOCAIRO, 
+          [pangocairo >= pango_required_version,
+           pycairo >= pycairo_required_version],
+	  have_pangocairo=true, have_pangocairo=false)
+  if test ! $have_pangocairo
+  then
+    AC_MSG_RESULT(no)
+  fi
+  AC_SUBST(PANGOCAIRO_CFLAGS)
+  AC_SUBST(PANGOCAIRO_LIBS)
+  AM_CONDITIONAL(BUILD_PANGOCAIRO, $have_pangocairo)
+  
+  if test -n "$export_dynamic"; then
+    PANGOCAIRO_LIBS=`echo $PANGOCAIRO_LIBS | sed -e "s/$export_dynamic//"`
+  fi
+
+  dnl gtk+
+  PKG_CHECK_MODULES(GTK, gtk+-2.0 >= gtk_required_version,
+          HAVE_GTK="yes", HAVE_GTK="no")
+  if test "x$HAVE_GTK" = "xyes"; then
+     have_gtk=true
+  else
+     have_gtk=false
+     AC_MSG_RESULT(no)
+  fi
+  AM_CONDITIONAL(BUILD_GTK, $have_gtk)
+  AC_SUBST(GTK_CFLAGS)
+  AC_SUBST(GTK_LIBS)
+  if test -n "$export_dynamic"; then
+    GTK_LIBS=`echo $GTK_LIBS | sed -e "s/$export_dynamic//"`
+  fi
+
+  PKG_CHECK_MODULES(GTK210, gtk+-2.0 >= 2.10.0,
+	  HAVE_GTK_210="yes", HAVE_GTK_210="no")
+  if test "x$HAVE_GTK_210" = "xyes"; then
+     gtk_version="2.10"	
+     have_gtk_210=true
+  else
+     AC_MSG_RESULT(no)
+     gtk_version="2.8"
+     have_gtk_210=false
+  fi
+	
+  AM_CONDITIONAL(HAVE_GTK_2_10, $have_gtk_210)
+  AC_SUBST(HAVE_GTK_2_10)
+  AC_DEFINE([HAVE_GTK_2_10], [$have_gtk_210], [If Gtk 2.10 was found])
+
+  dnl libglade
+  PKG_CHECK_MODULES(LIBGLADE, [libglade-2.0 >= libglade_required_version],
+	  have_libglade=true, have_libglade=false)
+  AC_SUBST(LIBGLADE_CFLAGS)
+  AC_SUBST(LIBGLADE_LIBS)
+  AM_CONDITIONAL(BUILD_LIBGLADE, $have_libglade)
+  if test -n "$export_dynamic"; then
+    LIBGLADE_LIBS=`echo $LIBGLADE_LIBS | sed -e "s/$export_dynamic//"`
+  fi
+
+  dnl gtkunixprint
+  PKG_CHECK_MODULES(GTKUNIXPRINT, [gtk+-unix-print-2.0 >= gtkunixprint_required_version],
+	  have_gtkunixprint=true, have_gtkunixprint=false)
+  AC_SUBST(GTKUNIXPRINT_CFLAGS)
+  AC_SUBST(GTKUNIXPRINT_LIBS)
+  AM_CONDITIONAL(BUILD_GTKUNIXPRINT, $have_gtkunixprint)
+  if test -n "$export_dynamic"; then
+    GTKUNIXPRINT_LIBS=`echo $GTKUNIXPRINT_LIBS | sed -e "s/$export_dynamic//"`
+  fi
+
+else
+  AC_MSG_RESULT(no)
+  AC_MSG_RESULT(not checking for gtk due to missing pycairo)
+fi
+
+dnl Check for GDK target
+AC_MSG_CHECKING([for GDK target])
+gdk_target=`$PKG_CONFIG --variable target gdk-2.0`
+if test -z $gdk_target; then
+  AC_MSG_RESULT((unknown))
+  AC_MSG_WARN([unable to determine the GDK target system; some functions may not be available])
+else
+  AC_MSG_RESULT($gdk_target)
+fi
+
+case $gdk_target in
+        x11) PYGTK_CODEGEN_DEFINES="$PYGTK_CODEGEN_DEFINES -DGDK_TARGET_X11"
+        ;;
+esac
+
+
+dnl checks to see if Numeric Python is installed.
+AC_ARG_ENABLE(numpy,
+  AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
+  enable_numpy=yes)
+
+if test "x$enable_numpy" != xno; then
+  save_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+  AC_CHECK_HEADER([Numeric/arrayobject.h],
+    [AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],,
+    [#include <Python.h>])
+  CPPFLAGS="$save_CPPFLAGS"
+fi
+
+dnl add required cflags ...
+JH_ADD_CFLAG([-Wall])
+JH_ADD_CFLAG([-std=c9x])
+JH_ADD_CFLAG([-fno-strict-aliasing])
+
+AC_CONFIG_FILES(
+  Makefile
+  pygtk-2.0.pc
+  codegen/Makefile
+  gtk/Makefile
+  docs/Makefile
+  docs/reference/entities.docbook
+  examples/Makefile
+  tests/Makefile
+  codegen/pygtk-codegen-2.0
+  pygtk.spec
+  PKG-INFO)
+AC_OUTPUT
+
+echo
+echo "The following modules will be built:"
+echo
+$have_atk               && echo     atk
+$have_pango             && echo     pango
+$have_pangocairo        && echo     pangocairo
+$have_gtk               && echo     gtk with $gtk_version API
+$have_libglade          && echo     gtk.glade
+$have_gtkunixprint      && echo     gtk.unixprint
+echo
+
+if test ! $have_atk || ! $have_pango || \
+        ! $have_gtk || ! $have_libglade || \
+        ! $have_pangocairo || ! $have_gtkunixprint; then
+  echo "The following modules will NOT be built:"
+  echo
+  $have_atk               || echo     atk
+  $have_pango             || echo     pango
+  $have_pangocairo        || echo     pangocairo
+  $have_gtk               || echo     gtk
+  $have_libglade          || echo     gtk.glade
+  $have_gtkunixprint      || echo     gtk.unixprint
+fi
+
Index: pkg/pygtk/branches/upstream/current/ChangeLog
===================================================================
--- pkg/pygtk/branches/upstream/current/ChangeLog	(revision 4)
+++ pkg/pygtk/branches/upstream/current/ChangeLog	(revision 4)
@@ -0,0 +1,2284 @@
+=== 2.10.4 ===
+2007-02-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* NEWS: 
+	
+	2.10.4
+
+2007-01-31  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+	* gtk/gtkcontainer.override: Fix a possible memory leak in
+	gtk.Container.child_get() (Fixes bug #404076)
+
+2007-01-31  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkcontainer.override (_wrap_gtk_container_class_list_child_properties): Undeprecate
+
+2007-01-20  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_display_close): Force keeping of a
+	reference to the display GObject even when we close() it.
+
+	* tests/test_gdk.py (GdkTest.testDisplay): Johan's unit test with
+	minor modifications.
+
+	* gtk/gdk.override (_wrap_gdk_display_close): Override and make it
+	aware that calling gdk_display_close unrefs the GdkDisplay.
+
+2007-01-18  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk-base.defs: allow None
+
+2007-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* configure.ac:  Turn the option --disable-docs into --enable-docs.
+	* docs/Makefile.am:  Treat --enable-docs like --enable-gtk-doc in
+	gtk+, i.e. do not ever build docs unless requested, but always
+	install them if they are found already built.
+
+2006-12-21  Sebastien Bacher  <seb128@ubuntu.com>
+
+	* codegen/Makefile.am: install createdefs.py, fix dsextras.py,
+	patch by Michael Bienia (Fixes #385934)
+
+2006-12-14  Kjartan Maraas  <kmaraas@gnome.org>
+
+	* autogen.sh: Make it work with automake 1.10.
+
+2006-12-05  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gdkevent.override (_wrap_gdk_event_tp_setattr): For the
+	attribute "string", free the old string and g_strdup the new one;
+	spotted by John Ehresman.
+	Fixes bug #382428.
+
+2006-12-02  Manish Singh  <yosh@gimp.org>
+
+	* codegen/codegen.py: fix code for generating defines in override
+	files, by using variables that actually exist in the context.
+	Fixes bug #381389.
+
+2006-11-25  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtktreeview.override (pygtk_tree_foreach_marshal): Use
+	pygtk_boxed_unref_shared to unref py_iter.  We need this because
+	the application may decided to keep a copy of the iterator passed
+	in to a gtk_tree_model_foreach callback.
+
+2006-11-19  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* examples/Makefile.am (demo_PYTHON),
+	* examples/pygtk-demo/demos/statusicon.py: Add a gtk.StatusIcon
+	example by Nikos Kouremenos.
+
+2006-11-15  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/__init__.py: Do not rebind sys.path, restore the old one.
+	Thanks to Jp Calderone for pointing out.
+
+2006-10-13  Paolo Borelli  <pborelli@katamail.com>
+
+	* gtk/gtktextview.override
+	(pygtk_text_buffer_register_serialize_format_cb): set return
+	value to NULL in the error codepath.
+
+2006-10-13  John Finlay  <finlay@moeraki.com>
+
+	* docs/Makefile.am (HTMLFILES): Remove
+	html/pygtk-reference-copyright.html. Fixes #361906 (Marc-Andre Lureau)
+
+2006-10-05  Cedric Gustin  <cedric.gustin@gmail.com>
+
+	* setup.py: Initialize Templates and TemplateExtensions with
+	py_ssize_t_clean=True (required by codegen.SourceWriter).
+
+2006-10-03  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* configure.in: Bump version.
+
+=== 2.10.3 ===
+2006-10-03  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* NEWS: Update.
+
+	* Makefile.am:
+	* atk.override:
+	* atkrectangle.override:
+	* codegen/argtypes.py:
+	* codegen/codegen.py:
+	* gtk/Makefile.am:
+	* gtk/gdk.override:
+	* gtk/gdkdraw.override:
+	* gtk/gdkpixbuf.override:
+	* gtk/gdkrectangle.override:
+	* gtk/gtk-types.c: (pygtk_style_helper_getitem),
+	(pygtk_style_helper_setitem), (pygtk_tree_model_row_getitem),
+	(pygtk_tree_model_row_setitem):
+	* gtk/gtk.override:
+	* gtk/gtkcontainer.override:
+	* gtk/gtktextview.override:
+	* gtk/gtktreeview.override:
+	* pango.override:
+
+	Support Python 2.5 + 64-bit architectures (#337368).
+
+2006-10-03  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gtktreeview.override (pygtk_tree_sortable_sort_cb): Fix a
+	refcount problem accidentally introduced by me between 2.10.1 and
+	2.10.2 :P
+
+2006-10-03  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* configure.in: Post-release version bump.
+
+=== 2.10.2 ===
+2006-10-03  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* NEWS: Update.
+
+	* tests/test_treeview.py: Add unit test for bug #347273.
+
+2006-09-21  Cedric Gustin  <cedric.gustin@gmail.com>
+
+	* pygtk_postinstall.py: Adapt the codegendir variable to the user
+	platform. Copy style.css from pygobject docs to pygtk docs. Run
+	fixxref on installed html files. Add functions to install
+	shortcuts in the Start menu to the reference manual (currently
+	disabled: see bug #353849).
+	* setup.py: Changed the way the VERSION macro is defined on
+	win32. Added 2.10 defs files for gdk and gtk when GTK+ 2.10 is
+	detected. Added gtk.keysyms, gtk._lazyutils, dsextras_gen and
+	codegen to the list of installed packages. Also install the html
+	reference documentation and run fixxref on the html files.
+
+2006-09-16  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_activate):
+	Same fix as below.
+
+	* gtk/gtktreeview.override (pygtk_tree_selection_foreach_marshal):
+	Use pygtk_boxed_unref_shared to fix a side-effect of fixing bug
+	#347273.
+	(pygtk_tree_sortable_sort_cb): Add a similar fix.
+
+	* gtk/gtkobject-support.c (pygtk_boxed_unref_shared): Add a new
+	pygtk private API to unref a boxed type with a shared pointer.
+
+2006-09-12  John Ehresman  <jpe@wingware.com>
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_wait_for_rich_text):
+	Declare variable at start of code block
+
+2006-09-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: post release version bump.
+
+=== 2.10.1 ===
+2006-09-04  Johan Dahlin  <jdahlin@async.com.br>
+
+
+	* gtk/gtkmodule.c (init_gtk): Require pygobject 2.12.0
+
+	* configure.in: post release version bump.
+
+=== 2.10.0 ===
+2006-09-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Bump version and require GTK+ 2.10 for 2.10 API
+
+	* README (http): Update
+
+	* NEWS: Update
+
+2006-08-21  Johan Dahlin  <jdahlin@async.com.br>
+
+	* docs/Makefile.am: Get rid of build_stamp, include the generated html
+	documentation in the tarball.
+
+2006-08-14  John Finlay  <finlay@moeraki.com>
+
+	* docs/Makefile.am (CSS_FILES):
+	* docs/style.css: 
+	* configure.in (PYGOBJECT_PYGDOCS): Copy style.css from pygobject docs
+	when installing docs. Fixes #351385 (Gian Mario Tagliaretti)
+
+2006-08-14  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/__init__.py (_init): issue a warning instead of printing
+	to stdout, fixes #316877 regression. (Jeremey Katz)
+
+2006-08-12  John Finlay  <finlay@moeraki.com>
+
+	* docs/style.css: Add.
+	* docs/Makefile.am: Add install of style.css
+
+2006-08-10  John Finlay  <finlay@moeraki.com>
+
+	* configure.in: 
+	* docs/Makefile.am: 
+	* docs/reference/entities.docbook.in:
+	* docs/reference/pygtk2-ref.xml:
+        Use builddate.xml for the builddate entity and have builddate.xml be
+        updated when the docs are built not during configure time.
+
+2006-08-08  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Post release version bump
+
+=== 2.9.6 ===
+2006-08-08  Johan Dahlin  <jdahlin@async.com.br>
+
+	* README: Add PyGObject dependency
+
+	* NEWS: Update
+
+2006-08-07  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/argtypes.py:
+	* codegen/codegen.py:
+	* codegen/reversewrapper.py:
+	Introduce new ArgTypeError exceptions, use them everywhere to
+	raise catch codegen errors.  Bare except: clauses are gone now.
+
+2006-08-07  Johan Dahlin  <jdahlin@async.com.br>
+
+	* docs/Makefile.am ($(HTML_DATA)): Fix parallel build 
+	(#350225, Ed Catmur)
+
+2006-08-07  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/argtypes.py: Don't allow overwrite a argtype
+	registration unless the new kwarg 'overwrite' is True.
+	Fixes bug #350252.
+
+2006-08-07  Johan Dahlin  <johan@gnome.org>
+
+	* tests/test_treeview.py (TreeViewTest._test_default_attributes): Add
+	a test for #350252
+
+2006-08-06  Johan Dahlin  <johan@gnome.org>
+
+	* docs/fixxref.py: Remove, it moved to PyGObject.
+
+2006-08-06  John Finlay  <finlay@moeraki.com>
+
+	* docs/fixxref.py (link_pat): Allow patterns that cross multiple lines.
+
+2006-08-06  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in: Post release version bump
+
+=== PyGTK 2.9.5 ===
+2006-08-06  Johan Dahlin  <johan@gnome.org>
+
+	* NEWS: 2.9.5
+
+2006-08-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/Makefile.am (GDK_TYPES_DEFS): Always include 2.10 defs in
+	EXTRA_DIST, fixes (#350008, Joseph Sacco)
+
+	* gtk/__init__.py (ver): Make it possible to reload the gtk+ module,
+	(#349026, Alexander Larsson)
+
+	* tests/test_api.py (APITest.testGlade): Add a test
+
+	* gtk/_lazyutils.py (LazyModule.__getattr__): Special case __members__
+	to dir on the real module, fixes (#349892, John Finlay)
+
+	* tests/test_api.py (APITest.testKeysyms):
+	Add a test
+
+2006-08-05  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkunixprint.override (pygtk_custom_destroy_notify): Add this
+	back in.
+
+2006-08-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: post release version bump
+
+=== PyGTK 2.9.4 ===
+2006-08-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in:
+	* docs/Makefile.am:
+	* docs/reference/entities.docbook.in:
+	* docs/reference/pygtk2-ref.xml:
+	Clean up the build date/version mess I created.
+	Now it's created during configure time and properly included in
+	the docbook files. Also make sure distcheck passes
+
+2006-08-04  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* configure.in: Add hack to disable libtool checking for g++ and
+	g77 (copied from libglade).
+
+2006-07-31  John Finlay  <finlay@moeraki.com>
+
+	* codegen/defsgen.py: Add new program to generate .defs files using
+	the ctypes module to extract info from the GTK libraries.
+
+2006-07-30  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkunixprint.override: Remove pygtk_custom_destroy_notify.
+
+2006-07-30  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/codegen.py (SourceWriter.write_class): Simplify code
+	that generates the call to pygobject_register_class; Correct the
+	fallback value of bases_str.
+
+2006-07-28  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gtk.override (_wrap_gtk_print_context_get_cairo_context):
+	Someone forgot to rename the override function when gtk+ API
+	changed...
+
+2006-07-27  Rafael Ãvila de EspÃ­ndola <rafael.espindola@gmail.com>
+
+	reviewed by: Johan Dahlin  <jdahlin@async.com.br>
+
+	* atkrectangle.override:
+	* gtk/gdk.override:
+	* gtk/gdkevent.override:
+	* gtk/gdkgc.override:
+	* gtk/gdkpixbuf.override:
+	* gtk/gtk-types.c:
+	* gtk/gtkcontainer.override:
+	* gtk/gtkmodule.c:
+	* gtk/gtktextview.override:
+	* gtk/libglade.override:
+
+	Do not exports internal symbols, fixes #347825
+
+2006-07-27  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_main): Copy paste some code from
+	pygobject/gobject/pygmainloop written by Mark McLoughlin, to check
+	for signals inside the gtk main loop.
+
+	* gtk/gtkmodule.c (init_gtk): Remove the timer; no longer needed.
+	Fixes bug #348937: 100ms timeouts in pygtk.
+
+2006-07-25  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkmodule.c (init_gtk):
+	* pangomodule.c (initpango): Check the required
+	PyGObject version in runtime too.
+
+2006-07-24  John Finlay  <finlay@moeraki.com>
+
+	* atk.defs (atk_role_get_localized_name, atk_role_get_name): Define as
+	functions.
+
+	* pango.defs (pango_script_get_sample_language): Define as function.
+
+	* gtk/gtkunixprint.defs (details_acquired)
+	(gtk_print_capabilities_get_type, status_changed): Add.
+
+	* gtk/gtk-base-types.defs (Editable): Add prerequisite.
+
+	* pangocairo.override (*_get_type): ignore-glob
+	(pango_cairo_update_context, pango_cairo_create_layout)
+	(pango_cairo_update_layout, pango_cairo_show_glyph_string)
+	(pango_cairo_show_layout_line, pango_cairo_show_layout)
+	(pango_cairo_glyph_string_path, pango_cairo_layout_line_path)
+	(pango_cairo_layout_path): ignore.
+
+	* pangocairo.defs (pango_cairo_update_context)
+	(pango_cairo_context_set_font_options)
+	(pango_cairo_context_get_font_options)
+	(pango_cairo_context_set_resolution)
+	(pango_cairo_context_get_resolution, pango_cairo_create_layout)
+	(pango_cairo_update_layout, pango_cairo_show_glyph_string)
+	(pango_cairo_show_layout_line, pango_cairo_show_layout)
+	(pango_cairo_glyph_string_path, pango_cairo_layout_line_path)
+	(pango_cairo_layout_path): Add.
+
+	* pango.override (*_get_type, *_ref, *_unref, *_free): ignore-glob
+	(pango_default_break): ignore
+
+	* pango.defs (pango_attr_shape_new_with_data, pango_default_break)
+	(pango_context_get_font_map, pango_context_set_matrix)
+	(pango_context_get_matrix, pango_itemize_with_base_dir)
+	(pango_coverage_new, pango_glyph_item_split, pango_glyph_item_free)
+	(pango_glyph_item_apply_attrs, pango_glyph_item_letter_space)
+	(pango_item_get_type, pango_item_new, pango_item_copy)
+	(pango_item_free, pango_item_split, pango_script_for_unichar)
+	(pango_script_iter_new, pango_script_iter_get_range)
+	(pango_script_iter_next, pango_script_iter_free)
+	(pango_script_get_sample_language, pango_script_includes_script)
+	(pango_matrix_get_type, pango_matrix_copy, pango_matrix_free)
+	(pango_matrix_translate, pango_matrix_scale, pango_matrix_rotate)
+	(pango_matrix_concat, pango_get_mirror_char, pango_unichar_direction)
+	(pango_find_base_dir): Add. Add virtuals.
+	(pango_font_metrics_new, pango_find_map, pango_map_get_engine)
+	(pango_map_get_engines, pango_module_register): Add with ifdef
+	PANGO_ENABLE_BACKEND
+	(pango_split_file_list, pango_trim_string, pango_read_line)
+	(pango_skip_space, pango_scan_word, pango_scan_string)
+	(pango_scan_int, pango_config_key_get, pango_lookup_aliases)
+	(pango_parse_style, pango_parse_variant, pango_parse_weight)
+	(pango_parse_stretch, pango_get_sysconf_subdirectory)
+	(pango_get_lib_subdirectory, pango_log2vis_get_embedding_levels)
+	(pango_get_sample_string, pango_is_zero_width): Add with ifdef
+	USE_PANGO_UTILS
+
+	* pango-types.defs (WrapMode): Add PANGO_WRAP_WORD_CHAR. Reorganize.
+
+2006-07-23  John Finlay  <finlay@moeraki.com>
+
+	* atk.override (AtkObjectFactory__do_create_accessible)
+	(AtkObjectFactory__proxy_do_create_accessible)
+	(AtkUtil__do_add_global_event_listener)
+	(AtkUtil__proxy_do_add_global_event_listener)
+	(AtkUtil__do_remove_global_event_listener)
+	(AtkUtil__proxy_do_remove_global_event_listener)
+	(AtkUtil__do_add_key_event_listener)
+	(AtkUtil__proxy_do_add_key_event_listener)
+	(AtkUtil__do_remove_key_event_listener)
+	(AtkUtil__proxy_do_remove_key_event_listener): Ignore.
+
+	* codegen/reversewrapper.py (StringReturn): Add const-gchar* as a
+	StringReturn match.
+
+	* codegen/codegen.py (GInterfaceWrapper.write_virtuals): Don't write
+	interface_init if no proxies.
+
+	* atk.defs: Add get_type defs from atk-enum-types.h.
+	Add virtuals for Action, Component, Document, EditableText, Hyperlink,
+	Hypertext, Image, ObjectFactory, ImplementorIface, Object, Selection,
+	StreamableContent, Table. Text, Util and Value.
+
+	* gtk/Makefile.am (libglade.c, gtkunixprint.c): Add dependencies on
+	gtk-types.defs and gdk-types.defs
+
+	* codegen/reversewrapper.py (PangoFontDescriptionReturn)
+	(PangoFontMetricsReturn, PangoLanguageReturn): Add
+
+2006-07-23  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/Makefile.am: Remove back the install-exec-hook that removes _gtk.la.
+
+2006-07-23  Johan Dahlin  <johan@gnome.org>
+
+	* Makefile.am:
+	* gtk/Makefile.am:
+	* gtk/__init__.py:
+	* gtk/_gtk.py:
+	* gtk/_lazyutils.py:
+	* gtk/deprecation.py:
+	* gtk/gtk.override:
+	* gtk/gtkmodule.c: (init_gtk):
+	* gtk/libglademodule.c: (initglade):
+
+	Revert dynamic namespaces, it is not possible
+	to solve it without breaking the ABI.
+
+2006-07-23  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/_gtk.py: Add _PyGtk_API alias from _gtkimpl, for
+	compatibility reasons.
+
+	* gtk/Makefile.am (install-exec-hook): Uninstall old _gtk.la, if
+	installed, else it may conflict with _gtkimpl.la.
+
+2006-07-22  John Finlay  <finlay@moeraki.com>
+
+	* atk.defs (atk_implementor_ref_accessible): Attach as
+	AtkImplementorIface method
+
+	* atk-types.defs (AtkImplementorIface): Revert to registered name.
+
+	* gtk/gtk-base-types.defs: Annotate interfaces with prerequisites
+	and objects with interface implementations
+
+	* gtk/gtk-2.10-types.defs: Annotate interfaces with prerequisites
+	and objects with interface implementations. Reorganize.
+
+	* codegen/reversewrapper.py (VoidReturn.write_conversion)
+	(DoubleReturn.write_conversion, GBoxedReturn.write_conversion): Use
+	failure_exception instead of failure_cleanup
+	(GtkTreePathReturn): Add.
+
+	* gtk/gdk-base.defs (get_display_name, get_n_screens, get_screen)
+	(get_default_screen, closed): Add GdkDisplay virtual defs
+	(create_gc, draw_rectangle, draw_arc, draw_polygon, draw_text)
+	(draw_text_wc, draw_drawable, draw_points, draw_segments)
+	(draw_lines, draw_glyphs, draw_image, get_depth, get_size)
+	(set_colormap, get_colormap, get_visual, get_screen, get_image)
+	(get_clip_region, get_visible_region, get_composite_drawable)
+	(draw_pixbuf, draw_glyphs_transformed, draw_trapezoids)
+	(ref_cairo_surface): Add GdkDrawable virtual defs
+	(get_values, set_values, set_dashes): Add GdkGC virtual defs
+	(direction_changed, keys_changed): Add GdkKeymap virtual defs
+	(size_changed): Add GdkScreen virtual def
+	(gdk_pixbuf_animation_ref, pixbuf_animation_unref): Add
+	GdkPixbufAnimation method defs
+	(non_anim_new, is_static_image, get_static_image, get_size)
+	(get_iter): Add GdkPixbufAnimation method and virtual defs with
+	GDK_PIXBUF_ENABLE_BACKEND ifdef
+	(get_delay_time, get_pixbuf, on_currently_loading_frame, advance): Add
+	GdkPixbufAnimationIter virtual defs with GDK_PIXBUF_ENABLE_BACKEND
+	ifdef
+	(pixbuf_error_quark, pixbuf_get_type, ref, unref)
+	(pixbuf_new_from_file_at_scale, save_to_callbackv)
+	(save_to_buffer, save_to_bufferv): Add misc GdkPixbuf method and
+	function defs
+	(is_scalable, is_disabled, set_disabled, get_license): Add
+	GdkPixbufFormat methods defs
+	(set_option): Add GdkPixbuf method def with GDK_PIXBUF_ENABLE_BACKEND
+	ifdef
+	(size_prepared, area_prepared, area_updated, closed): Add
+	GdkPixbufLoader virtual defs
+	(serialize, deserialize, from_pixbuf, pixbuf_from_pixdata)
+	(to_csource): Add GdkPixdata method and function defs
+
+	* gtk/gdk-2.10.defs (composited_changed): Add GdkScreen virtual def
+
+	* gtk/gdk.override (gdk_pixbuf_from_pixdata, gdk_pixdata_*): Ignore
+
+	* codegen/reversewrapper.py (GdkRegionPtrReturn): Add.
+
+2006-07-22  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* Makefile.am (SUBDIRS): Make --disable-docs really work.
+
+2006-07-22  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk-base.defs (gdk_pixbuf_simple_anim_add_frame)
+	(pixbuf_simple_anim_new, pixbuf_simple_anim_iter_get_type)
+	(pixbuf_simple_anim_get_type, gdk_pixbuf_flip): Add
+
+	* gtk/gdk.override: Add #define for GDK_TYPE_PIXBUF_SIMPLE_ANIM_ITER.
+
+	* gtk/gdk-base-types.defs (PixbufSimpleAnim)
+	(PixbufSimpleAnimIter, PixbufRotation): Add.
+
+2006-07-20  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk-base.defs:
+	Remove the leading gdk_ from a few functions.
+
+2006-07-20  John Finlay  <finlay@moeraki.com>
+
+	* docs/Makefile.am: Make builddate.xml dependent on REFERENCE_DEPS.
+	Make version.xml dependent on config.h. Add builddate.xml to pdf and
+	build-stamp dependencies. Clean pdf files.
+
+2006-07-20  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.ac:
+	* docs/Makefile.am:
+	* docs/reference/.cvsignore:
+	* docs/reference/version.xml.in:
+	Generate builddate.xml and version.xml at build time instead on
+	configure time, add proper dependencies.
+
+2006-07-20  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gtk-base.defs (lookup_icon, load_icon): Caller owns return.
+	Fixes leaks.
+
+2006-07-20  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (GtkObject__do_set_arg, GtkObject__do_get_arg)
+	(GtkObject__proxy_do_set_arg, GtkObject__proxy_do_get_arg): Ignore.
+	#341633 (Johan Dahlin)
+
+	* gtk/gtk-types.c (pygtk_tree_model_row_getitem)
+	(pygtk_tree_model_row_setitem): Remove negative index readjustment
+	code. #311852 (Baiju M)
+
+	* codegen/codegen.py (Coverage.printstats): Fix typo.
+	#341668 (Yevgen Muntyan)
+
+2006-07-19  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_store_insert): Fix typo
+
+	* docs/Makefile.am: Use more portable date generator.
+
+2006-07-19  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkmodule.c (init_gtkimpl): Don't register constants
+	* codegen/codegen.py: Make enum/flags lazily created too.
+
+	* gtk/__init__.py:
+	* gtk/deprecation.py:
+	Make functions lazily loaded.
+	Make deprecation lazy too, to avoid refercing anything until it's called.
+
+2006-07-19  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* atk.override (_wrap_atk_editable_text_set_run_attributes): Don't
+	ignore g_slist_append return value.
+
+2006-07-19  Rafael EspÃ­ndola <rafael.espindola@gmail.com>
+
+	reviewed by: Gustavo Carneiro
+
+	* codegen/codegen.py: Mark generated PyTypeObject structures with
+	G_GNUC_INTERNAL to reduce the size of the PLT.  Fixes #347825.
+
+2006-07-19  John Finlay  <finlay@moeraki.com>
+
+	* docs/fixxref.py: Add utility to fix links to pygobject docs.
+
+	* docs/Makefile.am : Add reference/version.xml and
+	reference/builddate.xml for auto generated version and build date for
+	docs
+
+	* docs/common.xsl:
+	* docs/devhelp.xsl:
+	* docs/html-style.xsl:
+	* docs/html.xsl: Remove.
+
+	* configure.in (AC_CONFIG_FILES): Add docs/reference/version.xml
+
+2006-07-18  Johan Dahlin  <johan@gnome.org>
+
+	* docs/Makefile.am (HTMLdir): Install book in $datadir/gtk-doc/html
+
+2006-07-18  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override (pygtk_cell_data_func_marshal)
+	(pygtk_tree_selection_foreach_marshal, pygtk_tree_sortable_sort_cb)
+	(pygtk_tree_foreach_marshal, pygtk_tree_model_filter_visible_cb)
+	(pygtk_filter_modify_func_marshal)
+	(pygtk_set_search_equal_func_marshal): Don't copy TreeIter when passing
+	to callback. #347273 (Stefano Maggiolo)
+	(_wrap_gtk_tree_selection_set_select_function): Optionally provide full
+	info to callback. #340475 (Wouter Bolsterlee)
+
+2006-07-17  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktreeview.override:
+	(_wrap_gtk_tree_store_set_column_types): Add.
+	(_wrap_gtk_tree_store_insert): Use gtk_tree_store_insert_with_valuesv.
+
+	* gtk/_lazyutils.py (LazyNamespace.__getattribute__): Allow
+	'from gtk import *' to work
+
+2006-07-17  Johan Dahlin  <johan@gnome.org>
+
+	* configure.in:
+	* docs/.cvsignore:
+	* docs/Makefile.am:
+	* docs/reference/pygtk2-ref.xml:
+
+	Add non GObject parts of John Finlays reference manual
+
+2006-07-17  John Finlay  <finlay@moeraki.com>
+
+	* codegen/reversewrapper.py (GBoxedReturn.write_conversion): Specify
+	code arg is None
+
+	* gtk/gtk-2.10.defs: Add additional virtual defs.
+
+	* gtk/gtk-base.defs: Add additional virtual defs.
+
+2006-07-14  John Finlay  <finlay@moeraki.com>
+
+	* Makefile.am (.defs.c): Allow libglade and gtkunixprint code
+	generation in place.
+
+2006-07-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10-types.defs (TargetList): Move from
+	gtk/gtk-base-types.defs
+
+	* gtk/gtk-base-types.defs (AccelMap): Add. #337011 (Sebastian PÃ¶lsterl)
+	(TipsQuery, TargetList, TreePath, FileInfo, FilePath): Add.
+
+	* gtk/gtk.override (_wrap_gtk_accel_map_foreach)
+	(_wrap_gtk_accel_map_foreach_unfiltered): Add.
+	Fixes #337011 (Sebastian PÃ¶lsterl)
+	(GtkTipsQuery, GtkTargetList, GtkTreePath, GtkFileInfo, GtkFilePath):
+	Ignore types.
+
+	* codegen/codegen.py (SourceWriter.write_registers): Don't write
+	registers for ignored types.
+	(SourceWriter.write_type_declarations): Don't write type declarations
+	for ignored types.
+
+2006-07-13  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/codegen.py:
+	* codegen/defsparser.py:
+	* configure.in:
+	* gtk/Makefile.am:
+	* gtk/__init__.py:
+	* gtk/_gtk.py:
+	* gtk/_lazyutils.py:
+	* gtk/deprecation.py:
+	* gtk/gtk.override:
+	* gtk/gtkmodule.c: (init_gtkimpl):
+	* gtk/libglade.override:
+	* gtk/libglademodule.c: (init_glade):
+	* gtk/pygtk.h:
+	* tests/common.py:
+	* tests/test_api.py:
+	Only load types in gtk when they are used, fixes #346946
+
+2006-07-13  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* tests/test_container.py: New unit test to
+	set/get_child_property, etc. by Lorenzo Gil Sanchez.
+
+	* tests/Makefile.am (tests): Add test_container.py.
+
+	* gtk/gtkcontainer.override
+	(_wrap_GtkContainer__proxy_do_set_child_property): Add missing
+	param.
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_set_activate_signal)
+	(_wrap_gtk_widget_get_activate_signal): Add getter and setter for
+	GtkWidgetClass->activate_signal.  Fixes #331445.
+
+	* gtk/gtk.override (_wrap_gtk_action_set_menu_item_type): Add
+	class method to change GtkActionClass->menu_item_type.
+	(_wrap_gtk_action_set_tool_item_type): idem for tool_item_type.
+	Fixes #331355.
+
+	* gtk/gtk-base.defs: Declare the missing
+	GtkAction.create_menu|tool_item virtuals.
+
+	* examples/gtk/scrollable.py (Layout.do_size_allocate): Save the
+	allocation (#341509, Muntyan).
+
+	* gtk/gtk.override (_wrap_GtkEditable__do_insert_text): Impl.
+	(_wrap_GtkEditable__do_get_selection_bounds): Impl.
+
+	* gtk/gtk-base.defs (insert_text): Add direction information to
+	the position parameter of gtk.Editbale.insert_text virtual.
+
+	* codegen/defsparser.py (IncludeParser.include): Fix including
+	absolute path names, #345073.
+
+2006-07-12  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* NEWS: I forgot one NEWS item in the release :P
+
+	* configure.in: Post release version bump.
+
+=== 2.9.3 ===
+2006-07-12  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* NEWS: Update.
+
+	* tests/Makefile.am: Copy a few more gtk module support files for
+	running tests.
+
+	* tests/common.py: Don't hide import errors.
+
+2006-07-13  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk.override: Ignore gtk_recent_chooser_set_show_numbers and
+	gtk_recent_chooser_get_show_numbers,
+	see http://article.gmane.org/gmane.comp.gnome.language-bindings/805
+
+2006-07-12  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkunixprint.override (_wrap_gtk_enumerate_printers): Add.
+
+2006-07-11  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkunixprint.defs (gtk_printer_accepts_pdf)
+	(gtk_printer_accepts_ps, gtk_enumerate_printers): Add.
+
+	* gtk/gdk-base.defs (gdk_set_pointer_hooks): Remove dup.
+
+2006-07-10  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-base.defs (gtk_binding_entry_add_signal): Remove dup.
+
+	* gtk/gdk-base-types.defs (GdkColorspace): Remove duplicate.
+
+	* gtk/gdk-base.defs (gdk_color_change): Change to function to resolve
+	conflict with gdk_colormap_change.
+	(gdk_colormap_change): Note as deprecated.
+	(gdk_display_store_clipboard): Remove dup def
+
+2006-07-08  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk-base.defs (clipboard_get_for_display): Add
+	"(caller-owns-return nil)"; Fixes #343960.
+
+2006-07-07  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.override: Ignore-glob *_libgtk_only. Fixes #321476.
+
+2006-07-06  John Finlay  <finlay@moeraki.com>
+
+	* pango.override (_wrap_pango_attr_underline_color_new)
+	(_wrap_pango_attr_strikethrough_color_new)
+	(_wrap_pango_attr_size_new_absolute)
+	(_wrap_pango_attr_letter_spacing_new): Add.
+
+	* pango.defs (AttrSizeAbsolute, AttrUnderlineColor)
+	(AttrStrikethroughColor, AttrLetterSpacing)
+	(pango_font_description_set_absolute_size)
+	(pango_font_description_get_size_is_absolute)
+	(pango_font_get_font_map): Add.
+
+	* gtk/gtk.override (_wrap_gtk_color_selection_palette_to_string):
+	Allow colors to be a sequence.
+
+	* atk.override (_wrap_atk_state_set_contains_states)
+	(_wrap_atk_state_set_add_states): Fix reference leaks.
+
+2006-07-06  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gtk.override (_wrap_gtk_color_selection_palette_to_string):
+	Check that argument is a list of gdk.Color.  Fixes #346745.
+
+2006-07-06  John Finlay  <finlay@moeraki.com>
+
+	* atk.override (atk_text_free_ranges): Ignore.
+	(_wrap_atk_value_get_current_value)
+	(_wrap_atk_value_get_maximum_value)
+	(_wrap_atk_value_get_current_value)
+	(_wrap_atk_value_set_current_value): Add.
+
+	* atkmodule.c (initatk): Add call to _pyatk_register_boxed_types()
+
+	* Makefile.am (ATK_OVERRIDES): Add atkrectangle.override
+
+	* atkrectangle.override: Add.
+
+	* atk.override (_wrap_atk_text_get_text_at_offset)
+	(_wrap_atk_text_get_text_before_offset)
+	(_wrap_atk_text_get_character_extents)
+	(_wrap_atk_text_get_run_attributes)
+	(_wrap_atk_text_get_default_attributes)
+	(_wrap_atk_text_get_bounded_ranges, _wrap_atk_text_get_selection)
+	(_wrap_atk_text_get_range_extents): Add,
+
+	* atk.defs (atk_rectangle_new): Add.
+
+2006-07-05  John Finlay  <finlay@moeraki.com>
+
+	* atk.override (_wrap_atk_state_set_contains_states)
+	(_wrap_atk_state_set_add_states):
+	(_wrap_atk_table_get_selected_rows)
+	(_wrap_atk_table_get_selected_columns):
+	(_wrap_atk_text_get_text_after_offset): Add.
+
+	* atk.defs (atk_relation_type_get_name): Define as function instead
+	of method.
+	(atk_state_type_get_name):  Define as function instead of method.
+	(atk_state_set_new): Fix typo.
+
+	* atk.override (_wrap_atk_relation_get_target): Add.
+	(_wrap_atk_relation_new): Raise ValueError if targets is zero length.
+
+2006-07-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/Makefile.am:
+	* gtk/__init__.py:
+	* gtk/_lazyutils.py:
+	* tests/Makefile.am:
+	* tests/test_api.py:
+	Add infrastructure to handle lazy loading.
+	Move keysyms to be loaded lazily.
+	Add API tests to make sure keysyms works.
+
+2006-07-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/Makefile.am:
+	* gtk/__init__.py:
+	* gtk/deprecation.py:
+	Move deprecation related classes to a separate python file
+
+2006-06-27  John Finlay  <finlay@moeraki.com>
+
+	* atk-types.defs: Update defs for atk-1.8
+	* atk.defs: Update defs for atk-1.8
+
+	* atk.override (_wrap_atk_component_get_size)
+	(_wrap_atk_component_get_size, _wrap_atk_component_get_extents)
+	(_wrap_atk_editable_text_set_run_attributes)
+	(_wrap_atk_editable_text_insert_text)
+	(_wrap_atk_image_get_image_position)
+	(_wrap_atk_image_get_image_position): Add
+
+2006-06-27  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gdk-2.10.defs, gtk/gdk-base.defs: It seems that all X11
+	specific functions are available in gtk+ 2.8 too; moving them from
+	gdk-2.10.defs to gdk-base.defs.
+
+	* gtk/gdkcairo.override (_wrap_gdk_cairo_rectangle): Missing
+	PyErr_Clear() when first protype parsing fails.
+
+2006-06-27  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (GtkPrintOperationPreview, GtkRecentChooser):
+	Add virtual defs for these interfaces.
+
+2006-06-25  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (gtk_status_icon_set_from_pixbuf): Allow pixbuf
+	to be None
+	(gtk_status_icon_set_tooltip): Allow tooltip_text to be None
+	(print_run_page_setup_dialog): Allow parent to be None.
+
+	* gtk/gtk.override (_wrap_gtk_recent_manager_add_full): is_private
+	should be a boolean.
+
+	* gtk/gtk-2.10-types.defs:  Add RecentChooser and
+	PrintOperationPreview implements interface notations
+
+2006-06-25  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/argtypes.py (ArgMatcher.register_enum,
+	(ArgMatcher.register_flag): Use IntArg to handle enums and flags
+	with no typecode.  This is to avoid the compiler warning
+	"dereferencing type-punned pointer will break strict-aliasing
+	rules" when converting enums or flags with no typecode.
+	(EnumArg.enum): Typecast to gpointer, not gint*, to avoid gcc type
+	punning warnings.
+	(FlagsArg.flag): idem.
+
+	* codegen/codegen.py (SourceWriter.write_enums): Typecast second
+	 argument of PyModule_AddIntConstant to
+	 (char*) to avoid const warning on python < 2.5.
+
+2006-06-25  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkwidget.override (_wrap_gtk_widget_class_find_style_property):
+	Add.
+
+2006-06-24  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_print_operation_get_error):
+	g_clear_error() is called in pyg_error_check()
+
+	* gtk/gtk-2.10.defs (gtk_print_settings_set): Allow value to be NULL.
+
+2006-06-24  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_print_operation_get_error):
+	s/g_error_clear/g_clear_error/.
+	(_wrap_gtk_print_operation_get_error): Return the exception value,
+	not just error->message, so that the programmer can consult
+	error.domain and error.code in addition to error.message.
+
+2006-06-24  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_print_operation_get_error): Return
+	the error message if any.
+
+2006-06-22  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10-types.defs (PrintOperationPreview): Identify as an
+	interface.
+
+	* gtk/gtk-2.10.defs (gtk_label_get_line_wrap_mode)
+	(gtk_label_set_line_wrap_mode): Add
+
+	* gtk/gtk.override (_wrap_gtk_notebook_set_window_creation_hook):
+	Fix parse tuple format.
+
+2006-06-22  Frederic Peters  <fpeters@0d.be>
+
+	* gtk/gtkunixprint.override (_wrap_gtk_print_job_send): update to
+	latest GTK+ API change.  #345623
+
+2006-06-20  Elijah Newren  <newren gmail com>
+
+	* gtk/gtk-2.10.defs (get_print_to_file, set_print_to_file): remove
+	these functions as the corresponding functions in gtk+ have
+	recently been removed as well.  #345447
+
+2006-06-15  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_notebook_set_window_creation_hook): Add.
+
+	* gtk/gdk.override (_wrap_gdk_screen_set_font_options)
+	(_wrap_gdk_screen_set_font_options): Add.
+
+	* gtk/gtk-base.defs (accel_group_from_accel_closure): Remove duplicate.
+
+	* gtk/gdk.override (gdk_atom_intern_static_string): Ignore
+
+2006-06-15  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* configure.in: Post-release version bump.
+
+=== 2.9.2 ===
+2006-06-15  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* examples/pygtk-demo/demos/print_editor.py: Update example to
+	API changes a couple of weeks ago.
+
+	* NEWS: Update.
+
+	* gtk/gtk-2.10.defs (target_list_add_rich_text_targets): Remove
+	"(of-object "GtkTargetList")", which is not valid for functions.
+
+	* gtk/gtkunixprint.override (pygtk_print_job_complete_func_cb):
+	PycairoSurface_FromSurface API breakage happened since pycairo
+	1.1.6, not 1.1.7.  Fixes #344957.
+
+2006-06-14  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktextview.override (_wrap_gtk_text_buffer_serialize)
+	(_wrap_gtk_text_buffer_register_deserialize_format)
+	(_wrap_gtk_text_buffer_register_serialize_format)
+	(_wrap_gtk_text_buffer_get_serialize_formats)
+	(_wrap_gtk_text_buffer_get_serialize_formats): Add.
+
+	* codegen/argtypes.py (arg): Match const-guint8* as UCharArg
+
+	* gtk/gtktextview.override (_wrap_gtk_text_buffer_deserialize)
+	(_wrap_gtk_text_buffer_deserialize): Add.
+
+2006-06-14  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* codegen/defsparser.py (IncludeParser.include): Fix a small typo
+	that caused bug #344845.
+
+2006-06-14  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtktextview.override
+	(_wrap_gtk_text_buffer_get_copy_target_list) : Add,
+
+	* gtk/gtk.override (_wrap_gtk_drag_dest_find_target)
+	(_wrap_gtk_drag_dest_get_target_list)
+	(_wrap_gtk_drag_dest_set_target_list, _wrap_gtk_drag_begin)
+	(_wrap_gtk_drag_source_get_target_list)
+	(_wrap_gtk_drag_source_set_target_list)
+	(_wrap_gtk_target_list_add_text_targets)
+	(_wrap_gtk_target_list_add_image_targets)
+	(_wrap_gtk_target_list_add_uri_targets)
+	(_wrap_gtk_target_list_add_rich_text_targets):
+	Use pygtk_target_list_from_sequence and pygtk_target_list_to_list.
+
+	* gtk/gtkobject-support.c (pygtk_target_list_from_sequence)
+	(pygtk_target_list_to_list): Add.
+
+2006-06-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (gtk_tree_view_set_search_entry): Allow entry arg
+	to default to None.
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_view_set_search_position_func): Add.
+
+	* gtk/gtk-2.10.defs (gtk_target_list_add_rich_text_targets): Change
+	to function.
+
+	* gtk/gtk.override (_wrap_gtk_target_list_add_rich_text_targets): Add.
+
+2006-06-14  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* configure.in: Post-release version bump.
+
+=== 2.9.1 ===
+2006-06-14  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/defsparser.py (IncludeParser.include),
+	* codegen/codegen.py (main): Add a -I option to specify a path to
+	search for .defs files.
+
+	* gtk/Makefile.am (CREATEDEFS): Use $(top_srcdir) to find
+	createdefs.py.
+	(gtk.c): gtk.c depends also on gdk-types.defs.
+	(EXTRA_DIST): Add gtk-extrafuncs.defs.
+
+	* codegen/Makefile.am (EXTRA_DIST): Add createdefs.py.
+
+2006-06-13  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtkmodule.c (pygtk_add_extra_constants): Don't add
+	GTK_PAPER_* constants with gtk+ 2.8.
+
+	* gtk/gtkunixprint.override (pygtk_print_job_complete_func_cb):
+	Make it conditionally compile with both pycairo >= 1.1.7 and
+	earlier versions.
+
+	* configure.in: Explicitly require pycairo for module pangocairo.
+	Minimum pycairo version changed back to 1.0.2.
+
+	* NEWS: Updated.
+
+	* gtk/gdkcairo.override (_wrap_gdk_cairo_rectangle): Make
+	gdk.CairoContext.rectangle() also accept (x, y, width, height)
+	parameters to avoid violating the Liskov substitution principle,
+	since it redefines cairo.Context.rectangle() with a different
+	signature.
+
+2006-06-13  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_menu_popup): Improve anti-leak code.
+	(_wrap_gtk_init_check, _wrap_gtk_init_check): Ignore.
+
+	* gtk/pygtk-private.h: Add. pygdk_atom_vector_from_sequence
+
+	* gtk/gtkobject-support.c (pygdk_atom_vector_from_sequence): Add.
+
+	* gtk/gtk.override (_wrap_gtk_targets_include_rich_text)
+	(_wrap_gtk_targets_include_uri, _wrap_gtk_targets_include_text)
+	(_wrap_gtk_targets_include_image): Add.
+
+2006-06-12  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkstyle.override (_wrap_gtk_style_lookup_color): Add.
+
+	* gtk/gtk-2.10-types.defs (enum TreeViewGridLines): Add.
+
+	* gtk/gtk-2.10.defs (gtk_tree_view_set_enable_tree_lines)
+	(gtk_tree_view_get_enable_tree_lines, gtk_tree_view_set_grid_lines)
+	(gtk_tree_view_get_grid_lines, gtk_tree_view_grid_lines_get_type)
+	(gtk_print_operation_action_get_type): Add.
+
+	* gtk/gtk.override (_wrap_gtk_status_icon_position_menu)
+	(_wrap_gtk_status_icon_position_menu): Add.
+	(_wrap_gtk_menu_popup): Recode to support passing
+	gtk.status_icon_position_menu as a position function while maintaining
+	backward compatibility.
+
+2006-06-11  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_recent_manager_get_items)
+	(_wrap_gtk_recent_manager_add_full): Add.
+
+	* gtk/gtktreeview.override (gtk_tree_store_insert_with_values)
+	(gtk_tree_store_insert_with_valuesv): Ignore
+
+	* gtk/gtk.override (_wrap_gtk_size_group_get_widgets): Fix bug.
+	(_wrap_gtk_recent_filter_add_custom)
+	(_wrap_gtk_recent_filter_filter): Add.
+
+	* gtk/gtk-2.10.defs (register_serialize_tagset)
+	(register_deserialize_tagset): Allow NULL tagset_name arg.
+
+	* gtk/gtk.override (_wrap_gtk_recent_chooser_dialog_new): Note as
+	new-constructor.
+	(_wrap_gtk_size_group_get_widgets): Add.
+
+2006-06-10  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (gtk_recent_chooser_menu_new_for_manager)
+	(recent_chooser_widget_new_for_manager): Use new object constructor.
+
+2006-06-11  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* configure.in: Check for the X11 GDK target.
+
+	* gtk/gdk.override: Don't ignore gdk_x11_* any more.
+
+	* gtk/gdk-2.10.defs: Add x11 specific functions, scanned from
+	gdkx.h, corrected (function->method), and made conditionally
+	compile only on the X11 GDK target.
+
+	* gtk/gdk-base.defs: Removed x11 specific functions added by johan
+	after 2.8 (re-added in gdk-2.10.defs).
+
+2006-06-10  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (gtk_recent_chooser_menu_new_for_manager)
+	(recent_chooser_widget_new_for_manager): : Set
+	as constructor and allow manager param to default to None.
+
+	* gtk/gtk.override (_wrap_gtk_recent_chooser_dialog_new)
+	(_wrap_gtk_recent_info_get_application_info)
+	(_wrap_gtk_recent_info_get_groups)
+	(_wrap_gtk_recent_info_get_applications)
+	(_wrap_gtk_recent_chooser_set_sort_func)
+	(_wrap_gtk_recent_chooser_list_filters): Add.
+	(gtk_print_error_quark, gtk_recent_chooser_error_quark)
+	(gtk_recent_chooser_dialog_new_for_manager)
+	(gtk_recent_chooser_menu_new)
+	(gtk_recent_chooser_widget_new, gtk_recent_manager_error_quark): Ignore
+
+2006-06-09  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_recent_chooser_get_items)
+	(_wrap_gtk_recent_chooser_get_uris): Add.
+
+	* gtk/gtkiconview.override (_wrap_gtk_icon_view_selected_foreach):
+	Fix leaks.
+
+	* gtk/gtktextview.override (_wrap_gtk_text_tag_table_foreach):
+	Fix leaks.
+
+	* gtk/gtk.override (_wrap_gtk_print_settings_foreach)
+	(_wrap_gtk_print_settings_set_page_ranges)
+	(_wrap_gtk_print_settings_get_page_ranges): Add.
+
+	* gtk/gtk-2.10.defs (gtk_button_set_image_position)
+	(gtk_button_get_image_position, gtk_print_context_set_cairo_context)
+	(gtk_print_operation_set_track_print_status)
+	(gtk_print_operation_set_show_progress)
+	(gtk_print_operation_set_allow_async)
+	(gtk_print_operation_set_custom_tab_label)
+	(gtk_print_operation_get_error, gtk_print_operation_cancel
+	(gtk_status_icon_get_geometry): Add.
+	(gtk_print_operation_set_default_page_setup)
+	(gtk_print_operation_set_print_settings): Allow default NULL arg.
+
+	* gtk/gtk-2.10-types.defs: Add PrintOperationPreview, RecentFilter,
+	RecentInfo. Sync enums.
+
+2006-06-08  Frederic Peters  <fpeters@0d.be>
+
+	* configure.in, gtk/gtkunixprint.override: Updated pycairo dependencies
+	from 0.5.0 to 1.1.7 since PycairoSurface_FromSurface signature changed.
+
+	* gtk/gtk-2.10-types.defs, gtk/gtk-2.10.defs: Updated to new GTK+
+	Printing API changes.
+
+2006-06-06  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtkunixprintmodule.c (initunixprint):
+	Add pygtkunixprint_add_constants() call.
+
+	* gtk/gtkunixprint.defs:
+	* gtk/gtkunixprint.override: Add files for unixprint module.
+
+	* gtk/Makefile.am: Add support for gtk.unixprint module.
+
+	* configure.in: Add support for gtk.unixprint module.
+
+2006-06-06  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtk-base.defs (set_mnemonic_widget): Allow widget to be null
+
+2006-06-05  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (paper_size_new): Allow name to default to None.
+
+	* gtk/gtkmodule.c (pygtk_add_extra_constants): Add GTK_PAPER_NAME
+	constants.
+
+2006-06-04  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (gtk_paper_size_free): Ignore
+
+	* gtk/gtk-2.10.defs (gtk_message_dialog_set_image): Add.
+
+	* gtk/gtk.override (_wrap_gtk_link_button_set_uri_hook): Add.
+
+	* gtk/gtk-2.10.defs (input_shape_combine_mask): Allow shape_mask
+	to be None.
+	(gtk_link_button_new_with_label): Set as constructor for GtkLinkButton.
+	Allow label param to default to None.
+
+2006-06-04  Johan Dahlin  <johan@gnome.org>
+
+	* pango.override (_wrap_pango_tab_array_get_tabs): Fix two
+	leaks found by coverity.
+
+2006-06-04  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (drag_dest_set_track_motion)
+	(drag_dest_get_track_motion): Change to methods of GtkWidget.
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_wait_for_rich_text)
+	(_wrap_gtk_clipboard_request_rich_text): Add.
+
+	* codegen/argtypes.py (AtomArg.write_return): Fix leak in GdkAtom
+	return.
+
+2006-06-03  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-2.10.defs (gtk_assistant_set_page_header_image)
+	(gtk_assistant_set_page_side_image): Allow
+	pixbuf param to be None and optional.
+	(gtk_entry_set_inner_border): Allow border param to be None.
+
+2006-06-01  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (_wrap_gtk_assistant_set_forward_page_func): Add.
+
+	* gtk/gdkevent.override (_wrap_gdk_event_tp_getattr): Output
+	"selection" as a gdk.OWNER_CHANGE member.
+
+2006-06-01  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gtk-2.10.defs: gtk_print_context_create_context renamed to
+	gtk_print_context_create_pango_context;
+	gtk_print_context_create_layout renamed to
+	gtk_print_context_create_pango_layout;
+	gtk_print_context_get_fontmap renamed to
+	gtk_print_context_get_pango_fontmap; gtk_print_context_get_cairo
+	renamed to gtk_print_context_get_cairo_context.
+
+	* gtk/gtk.override
+	(_wrap_GtkCellLayout__proxy_do_set_cell_data_func):
+	s/Py_DECREF(py_ret)/Py_XDECREF(py_ret)/, thanks Paolo Borelli.
+
+2006-05-31  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdkdraw.override (_wrap_gdk_draw_layout_line): Add,
+
+	* gtk/gdkcairo.override (_wrap_gdk_cairo_set_source_pixmap)
+	(_wrap_gdk_cairo_region, _wrap_gdk_cairo_rectangle): Add as methods.
+
+	* gtk/gdk-base.defs (shape_combine_region): shape_region may be None.
+
+	* gtk/gdk.override (gdk_region_destroy): Ignore.
+
+2006-05-26  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk-base.defs (set_cursor): Allow IconView.set_cursor method
+	params 'cell' and 'start_editing' to be optional.
+	Fixes #343039 (Ross Burton)
+
+2006-05-20  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override (_wrap_GtkCellRenderer__do_get_size): Impl.
+	Fixes #339431.
+
+2006-05-20  John Finlay  <finlay@moeraki.com>
+
+	* pangocairo.override (_wrap_context_set_font_options): Allow
+	font_options param to be None.
+
+2006-05-20  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* examples/pygtk-demo/demos/print_editor.py (begin_print):
+	s/set_nr_of_pages/set_n_pages/ (gtk api change).
+
+2006-05-18  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.override (clipboard_request_contents_cb)
+	(clipboard_clear_func, clipboard_get_func)
+	(clipboard_request_targets_cb, clipboard_request_image_cb): Fix
+	reference leaks (#342114).
+
+2006-05-17  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gtk.override (clipboard_request_text_cb): Fix reference
+	leaks (#342114).
+
+2006-05-14  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtkcontainer.override
+	(_wrap_GtkContainer__proxy_do_set_child_property)
+	(_wrap_GtkContainer__proxy_do_get_child_property)
+	(_wrap_GtkContainer__do_set_child_property)
+	(_wrap_GtkContainer__do_get_child_property): Impl.  Fixes #341641.
+
+	* gtk/gtk.override (_wrap_GtkCellRenderer__proxy_do_get_size): Fix
+	reference leak on 'self' and 'py_ret'.
+	(_wrap_gtk_dialog_set_alternative_button_order): idem.
+
+	* codegen/reversewrapper.py: Fix registration of StringReturn type
+	handler; fixes #341634.
+
+2006-05-14  Murray Cumming  <murrayc@murrayc.com>
+
+	* gtk/gtk-2.10.defs: Updated to fix the build, because
+	- gtk_print_operation_set_nr_of_pages() changed to gtk_print_operation_set_n_pages()
+	- gtk_print_settings_get_num_copies() changed to gtk_print_settings_get_n_copies()
+	- gtk_print_settings_set_num_copies() changed to gtk_print_settings_set_n_copies()
+	- gtk_recent_manager_add_full() no longer has a GError* parameter.
+
+2006-05-10  Johan Dahlin  <johan@gnome.org>
+
+	* codegen/codegen.py: Refactor a big chunk into a class with methods.
+
+	* Makefile.am:
+	* gtk/Makefile.am: Use PYCAIRO_CFLAGS
+
+	* configure.in: Make pycairo a required dependency, make sure
+	the optional Gtk+ 2.10 dependency check work and only build
+	pangocairo if pycairo found and libglade if gtk can be built
+
+2006-05-08  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* examples/pygtk-demo/demos/print_editor.py,
+	* examples/Makefile.am: Add Print Editor demo, originally found in
+	gtk+ sources and translated to Python.
+
+	* gtk/gtk-2.10.defs: gtk.print_run_page_setup_dialog second
+	argument can be None/NULL.
+
+2006-05-07  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override (_wrap_add_log_handlers)
+	(_wrap_remove_log_handlers): Try to use
+	pyg_add_warning_redirection and pyg_disable_warning_redirections
+	if available.
+
+	* pangomodule.c (initpango): idem.
+
+	* examples/gtk/testprint.py: Add a python print demonstration,
+	based on testprint.c in gtk+ sources.  It is missing a print
+	dialog, though...
+
+	* examples/Makefile.am (EXTRA_DIST): add gtk/testprint.py.
+
+	* gtk/gtk.override: Include pycairo.
+	(_wrap_gtk_print_context_get_cairo): Override to make
+	gtk.PrintContext return a gtk.gdk.CairoContext object instead of a
+	cairo.Context one.
+
+	* configure.in: pycairo dependency no longer optional.
+
+	* gtk/gtk-2.10-types.defs (PrintContext): Missing gtk.PrintContext.
+
+	* gtk/gtk-2.10.defs: Make 'parent' parameter of
+	gtk_print_operation_run optional and None acceptable.
+
+	* gtk/gtk-2.10-types.defs: Declare type gtk.PageSetup.
+	(PrintSettings): idem for gtk.PrintSettings.
+	(PaperSize): Add boxed gtk.PaperSize.
+
+	* gtk/gdk.override (_wrap_gdk_bitmap_create_from_data)
+	(_wrap_gdk_pixmap_create_from_data): Override to fix a compilation
+	warning and add bounds check on the data parameter.
+
+	* gtk/gdkcairo.override: Add explicit braces to keep gcc happy.
+
+	* gtk/Makefile.am: Make sure the defs are regenerated when
+	configure runs, due to possible changes in gtk+ 2.10 detection.
+	(gtk.c): Make gtk.c depend on gdk-types.defs to force it to be
+	generated early.
+	(.defs.c): Remove the recursive make invocation, no longer needed.
+
+	* gtk/Makefile.am (defs_DATA): Install gdk.defs, gtk.defs,
+	gdk-types.defs, and gtk-types.defs.  Thanks Olav Vitters
+	Fixes bug #340920.
+
+2006-05-06  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/createdefs.py:
+	* configure.in:
+	* gtk/Makefile.am:
+	* gtk/gdk-2.10.defs:
+	* gtk/gdk-base-types.defs:
+	* gtk/gdk-base.defs:
+	* gtk/gdk-types.defs:
+	* gtk/gdk.defs:
+	* gtk/gdk.override:
+	* gtk/gtk-2.10-types.defs:
+	* gtk/gtk-2.10.defs:
+	* gtk/gtk-base-types.defs:
+	* gtk/gtk-base.defs:
+	* gtk/gtk-types.defs:
+	* gtk/gtk.defs:
+
+	Add conditional support for Gtk+ 2.10 add new api.
+
+2006-05-06  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/h2def.py (main): Add support for filtering out definies
+	in existing files
+
+	* gtk/gtk.override: Ignore a bunch of stuff
+
+	* gtk/gtk.defs: Add deprecated, broken and unsupported API here,
+	to make it easier to merge in the future
+
+	* codegen/override.py (Overrides.__parse_override):
+	* codegen/codegen.py (main):
+	Add ignore-type statement in override
+
+	* codegen/h2def.py: Refactor to use OOP, remove duplicated code
+
+2006-05-01  John Ehresman <jpe@wingware.com>
+
+	* gtk/gdk-types.defs:
+	* gtk/gdk.defs:
+	* gtk/gdk.override
+	* gtk/gtk.defs:
+	* gtk/pygtk-private.h:
+	GdkRegion wrapper
+
+2006-05-01  John Ehresman <jpe@wingware.com>
+
+	* gtk/gtktreeview.override: Restore override for
+	TreeView.get_visible_rect
+
+2006-05-01  Yevgen Muntyan  <muntyan@tamu.edu>
+
+	* codegen/reversewrapper.py (ReverseWrapper.generate): Missing ()
+	in Py_BuildValue template string to force a tuple to be created
+	even when number of retvals is one.  Reviewed by Gustavo.  Fixes
+	Bug 340162 "Missing ()".
+
+2006-04-26  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.override (_wrap_gdk_event_handler_set):
+	* gtk/gdk.defs (event_handler_set):
+	Wrap gdk_event_handler_set
+
+	* gtk/Makefile.am:
+	* gtk/gdk.override:
+	* gtk/gdkcairo.override:
+	* gtk/gdkcolor.override:
+	* gtk/gdkdraw.override:
+	* gtk/gdkevent.override:
+	* gtk/gdkgc.override:
+	* gtk/gdkpixbuf.override:
+	* gtk/gdkrectangle.override:
+	* gtk/gdkwindow.override:
+	* gtk/gtktoolbar.override:
+	Split out a few more files
+
+2006-04-23  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/codegen.py:
+	* codegen/definitions.py:  Add support for (unblock-threads #t) in
+	functions and methods, which enables the generation of
+	pyg_(begin|end)_allow_threads around the C call.
+
+	* codegen/argtypes.py (ObjectArg.write_return): Follow up on
+	#169204 to add support for const-Object as return type.  This
+	fixes a build problem in pygda.
+
+2006-04-18  John Ehresman   <jpe@wingware.com>
+
+	* setup.py: Remove support for building / installing gobject, pygtk.py,
+	and dsextras.py
+
+2006-04-16  Richard Hult  <richard@imendio.com>
+
+	* gtk/gtkmodule.c:
+	* gtk/gtk.override: Move locale.h include from gtkmodule.c here to
+	fix the build.
+
+2006-04-13  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkcontainer.override (pygtk_container_for_common):
+	Set an exception and jump out (Coverity)
+
+	* gtk/gtk.override (_wrap_gtk_stock_list_ids): Decref py_item
+	after using it (Coverity)
+
+2006-04-06  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/__init__.py (_init): Add log handlers here
+	(threads_init): Deprecated gtk.threads_*, gtk.gdk.threads_* should
+	be used instead, fixes #165927 (Steve Chaplin)
+
+	* gtk/gtk.override (_wrap_remove_log_handlers): New function,
+	makes it possible to remove the handlers pygtk installs.
+	Fixes #323786
+
+	* gtk/gtkmodule.c (init_gtk): Refactor, move init_check...
+	(init_gtk): Move the log handlers to gtk.override
+
+	* gtk/gtk.override (_wrap_gtk_init_check): ..to here
+
+	* gtk/__init__.py: Refactor, call init_check() and print warning
+	if DISPLAY is not set. Fixes #316877
+
+2006-04-05  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtktreeview.override
+	(_wrap_gtk_tree_sortable_set_default_sort_func): Allow callback
+	to be set to None, found by Patrick O'Brien
+
+	* tests/test_liststore.py (ListStoreTest.testSetDefaultSortFunc):
+	Add test
+
+2006-04-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Post release version bump
+
+=== 2.9.0 ===
+2006-04-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* NEWS: Update
+
+2006-04-04  John Ehresman  <jpe@wingware.com>
+
+    reviewed by: Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtktreeview.override:
+	Make sure gtk.TreeView.cell_get_size() allows
+	the usage of the in argument. Fixes #326357
+
+2006-04-03  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/codegen.py:
+	Fit in 80 characters, do not use \
+
+	* codegen/argtypes.py:
+	* codegen/codegen.py:
+	* codegen/definitions.py:
+	* codegen/defsconvert.py:
+	* codegen/defsparser.py:
+	* codegen/docextract.py:
+	* codegen/docextract_to_xml.py:
+	* codegen/docgen.py:
+	* codegen/h2def.py:
+	* codegen/mkskel.py:
+	* codegen/override.py:
+	* codegen/reversewrapper.py:
+	* examples/glade/autoconnect.py:
+	* examples/gobject/editable-interface.py:
+	* examples/gobject/signal.py:
+	* examples/gtk/bin.py:
+	* examples/gtk/filechooser.py:
+	* examples/gtk/scrollable.py:
+	* examples/gtk/sizegroup.py:
+	* examples/gtk/uimanager.py:
+	* examples/ide/edit.py:
+	* examples/ide/gtkdb.py:
+	* examples/ide/gtkprof.py:
+	* examples/pango/pangocairo-simple.py:
+	* examples/pango/utf8-demo.py:
+	* examples/pygtk-demo/demos/changedisplay.py:
+	* examples/pygtk-demo/demos/dnd.py:
+	* examples/pygtk-demo/demos/dndpixmap.py:
+	* examples/pygtk-demo/demos/entry_completion.py:
+	* examples/pygtk-demo/demos/expander.py:
+	* examples/pygtk-demo/demos/hypertext.py:
+	* examples/pygtk-demo/demos/list_store.py:
+	* examples/pygtk-demo/demos/textview.py:
+	* examples/pygtk-demo/demos/tree_store.py:
+	* examples/pygtk-demo/demos/treemodel.py:
+	* examples/simple/dnd.py:
+	* examples/simple/dndpixmap.py:
+	* examples/simple/hello.py:
+	* examples/simple/scribble.py:
+	* examples/simple/simple.py:
+	* examples/simple/tooltip.py:
+	* gtk/__init__.py:
+	* gtk/compat.py:
+	* gtk/keysyms.py:
+	* ltihooks.py:
+	* setup.py:
+	* tests/common.py:
+	* tests/runtests.py:
+	* tests/test_actiongroup.py:
+	* tests/test_conversion.py:
+	* tests/test_dialog.py:
+	* tests/test_enum.py:
+	* tests/test_gdkevent.py:
+	* tests/test_liststore.py:
+	* tests/test_radiobutton.py:
+	* tests/test_style.py:
+	* tests/testmodule.py:
+
+	Run reindent.py on all python code.
+
+2006-04-02  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.defs (rotate_simple): Add gdk.Pixbuf.rotate_simple,
+	fixes #314164 (Karel Vervaeke)
+
+	* examples/pygtk-demo/demos/treemodel.py:
+	Check for null, so it can be used with a model filter,
+	fixes #311459 (Stephen Kennedy)
+
+	* examples/gtk/widget.py: Remove tabs fixes #325320
+	(Dieter Verfaillie)
+
+2006-04-02  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk-types.c (PyGdkWindow_PropertyGet): Change property size
+	limit from 9999 to G_MAXLONG.  Thanks Wander Boessenkool.
+	Fixes #327778.
+
+	* pango.override (_wrap_pango_layout_line_index_to_x): First
+	keyword name should be index, not x_pos, as pointed out by John
+	Finlay.  Fixes #316581.
+
+	* gtk/gtk.defs: Mark gtk_tree_row_reference_free as deprecated.
+	Fixes #309811.
+
+	* gtk/gtkcontainer.override
+	(_wrap_gtk_container_class_list_child_properties): Deprecate in
+	favour of gtk.Container.list_child_properties.
+	(_wrap_gtk_container_list_child_properties): Add
+	gtk.Container.list_child_properties as classmethod.
+	(_wrap_gtk_container_class_install_child_property): Deprecate in
+	favour of gtk.Container.install_child_property.
+	(_wrap_gtk_container_install_child_property): Add
+	gtk.Container.install_child_property as clasmethod.  Fixes #308394.
+
+	* gtk/gtktreeview.override: Remove gtk_tree_view_get_visible_rect
+	duplicate override.
+
+	* gtk/gtk.override: Make the "new-constructor
+	GTK_TYPE_MESSAGE_DIALOG" declaration conditional on gtk+ >= 2.9,
+	to match the contents of the constructor.
+
+2006-04-02  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_draw_indexed_image):
+	wrap, Fixes #333431 (Hamish Moffatt)
+	* tests/test_gdk.py (GdkTest.testDrawIndexedImage): Add test
+
+	* gtk/gtk.defs (spin): Set default value of increment to
+	1, fixes #325452 (Sebastian Rittau)
+
+	* pango.override:
+	* tests/Makefile.am:
+	* tests/test_pango.py:
+
+	Set default markup accel marker to \x00, add tests,
+	Fixes #329658 (Johan Svedberg)
+
+2006-04-02  Ben Caradoc-Davies  <ben@wintersun.org>
+
+	reviewed by: Johan
+
+	* examples/pygtk-demo/demos/pixbufs.py: Remove
+	discontinuous motion, fixes #327931
+
+2006-04-02  Johan Dahlin  <johan@gnome.org>
+
+
+	* gtk/gtkmodule.c (init_gtk): GDK_PARENT_RELATIVE constant
+
+	* gtk/gtk-types.c (pygtk_style_helper_setitem): Add support for
+	GDK_PARENT_RELATIVE in style pixmaps.
+
+	Fixes #320248 (Nikos Kouremenos)
+
+2006-04-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/override.py (Overrides.__parse_override): Check and
+	abort if a function is being overridden more than once.
+
+2006-04-01  Rauli Ruohonen  <raulir@iki.fi>
+
+	* codegen/codegen.py (Wrapper.write_functions): Add missing 'data'
+	parameter when calling self.write_function.
+
+	* pangocairo.override: Wrap pango_cairo_context_set_font_options
+	and pango_cairo_context_get_font_options.  Fixes #328108.
+
+	Reviewed by Gustavo Carneiro.
+
+2006-04-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* codegen/codegen.py (Wrapper.write_virtuals): Use
+	PyObject_GetAttrString, not PyDict_GetItemString, fixes #327715.
+
+	* gtk/pygtk.h, gtk/gtkmodule.c: Export pygtk_tree_path_to_pyobject
+	and pygtk_tree_path_from_pyobject as public APIs.  Fixes #318021.
+
+	* codegen/argtypes.py: Add suppport for const object args.
+	Patch by wollny@cbs.mpg.de, plus some additional changes for code
+	style improvements and a bug fix.  Fixes #169204.
+
+	* gtk/gtkmodule.c (_pygtk_log_func): Call g_log_default_handler
+	when python isn't initialized.  Fixes #334188.
+
+	* examples/Makefile.am (EXTRA_DIST): Ship new editable interface example.
+
+	* examples/gobject/editable-interface.py: Add small example of
+	overriding GtkEditable interface method and chaining to parent.
+
+	* codegen/codegen.py: Bug 334986: "Make it possible to
+	re-implement interfaces and chain to parent impl."
+
+2006-04-01  Johan Dahlin  <johan@gnome.org>
+
+	* codegen/h2def.py (proto_pat): Allow whitespace before
+	last parenthesis. Fixes #317124
+
+2006-04-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.defs (GtkSpinButton.input, GtkEditable.do_insert_text)
+	(GtkEditable.get_selection_bounds,
+	GtkMenuItem.toggle_size_request): Add (direction ...) specifiers
+	to these virtuals.  Probably more of these are missing, though.
+
+	* codegen/codegen.py,
+	* codegen/definitions.py,
+	* codegen/reversewrapper.py:
+	Add support for int* and double* (and basic infrastructure to
+	support other types in the future) parameters for "reverse
+	wrappers".  To use this feature one needs to help the
+	codegenerator by adding (direction "out") or (direction "inout") to
+	the parameter definitions as appropriate.  Fixes #335964.
+
+2006-04-01  John Finlay  <finlay@moerari.com>
+
+	reviewed by: Johan
+
+	* gtk/gdk.defs:
+	* gtk/gtk.defs:
+	* gtk/gtk.override:
+	* gtk/gtktextview.override:
+	* gtk/gtktreeview.override:
+	* gtk/gtkwidget.override:
+	Add missing bindings, fixes #316881
+
+2006-04-01  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gdk.defs: Remove display_open_default_libgtk_only,
+	it should not be wrapped.
+	Fixes #321476
+
+2006-04-01  Marco Cabizza  <marco87@gmail.com>
+
+	reviewed by: Johan
+
+	* gtk/gdk.defs:
+	add gdk_screen_get_rgba_colormap and gdk_screen_get_rgba_visual,
+	Fixes 328996
+
+2006-04-01  Johan Dahlin  <johan@gnome.org>
+
+	* gtk/gtkmodule.c: (init_gtk):
+	* pangomodule.c: (initpango):
+	Set default encoding to utf-8 in pango instead of gtk.
+	Fixes #328031
+
+2006-04-01  Johan Dahlin  <johan@gnome.org>
+
+	* Makefile.am:
+	* configure.in:
+	* dsextras.py:
+	* gobject/Makefile.am:
+	* gobject/gobjectmodule.c:
+	* gobject/pygboxed.c:
+	* gobject/pygenum.c:
+	* gobject/pygflags.c:
+	* gobject/pygiochannel.c:
+	* gobject/pygmaincontext.c:
+	* gobject/pygmainloop.c:
+	* gobject/pygobject.c:
+	* gobject/pygparamspec.c:
+	* gobject/pygpointer.c:
+	* gobject/pygsource.c:
+	* gobject/pygtype.c:
+	* gtk/Makefile.am:
+	* pygtk.py:
+	* tests/Makefile.am:
+	Remove gobject and depend on pygobject 2.10.0
+
+2006-04-01  Johan Dahlin  <jdahlin@async.com.br>
+
+	* codegen/codegen.py: Mark function, methods and getsets as const.
+
+2006-04-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.override (_wrap_gtk_message_dialog_new): Add missing
+	"new-constructor GTK_TYPE_MESSAGE_DIALOG" codegen declaration.
+
+	* codegen/codegen.py: Add support for docstrings in .defs.  To use
+	it, add (docstring "foo bar") to class, function or method
+	definitions.  Fixes bug #322843.
+
+	* pangocairomodule.c (initpangocairo): Fix compiler warning.
+
+	* m4/python.m4: Fix "underquoted definition of AM_CHECK_PYMOD" warning.
+
+	* gtk/gtk.override (_wrap_gtk_message_dialog_new): On gtk+ 2.9,
+	fix constructor to allow subclassing.  Fixes bug #312056.
+
+2006-03-30  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Post release version bump
+
+=== PyGTK 2.8.5 ===
+2006-03-30  Johan Dahlin  <jdahlin@async.com.br>
+
+	* NEWS: Update.
+
+2006-02-27  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* tests/test_dialog.py (MessageDialogTest.testDialogLeak): Add
+	test for bug #332771.
+
+	* tests/test_actiongroup.py (ActionGroupTest.timeout_cb): Use
+	self.assertEqual instead of plain assert.
+
+	* gtk/gtk.override (gtk_dialog_new_with_buttons): Remove one too
+	many g_object_ref.  Fixes Bug 332771: "gtk.Dialog leak".
+
+2006-02-20  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gtk/gdkcairo.override: Don't raise an exception if pangocairo
+	import fails, since in this case python itself had already raised
+	another exception with more information.
+
+2006-02-14  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkclist.override (_wrap_gtk_clist_new_with_titles): Fix typos,
+	found by Padraig Brady
+
+2006-02-06  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/__init__.py (_is_pydoc): Do not print the deprecation warning
+	if we're running under pydoc.
+
+2006-01-26  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* examples/pygtk-demo/demos/pixbufs.py (PixbufsDemo.expose_cb):
+	Remove the "FIXME: draw_rgb_image_dithalign seems not to be
+	available" comment.
+
+	* gtk/gdk.override (_wrap_gdk_draw_rgb_image): Add comment
+	explaining why we always call gdk_draw_rgb_image_dithalign instead
+	of gdk_draw_rgb_image.
+	(_wrap_gdk_draw_gray_image): idem.
+
+2006-01-21  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.defs (cell_view_new_with_text): Add
+	caller-owns-return to fix a reference leak.
+	(cell_view_new_with_markup): idem.
+	(cell_view_new_with_pixbuf): idem.
+	(combo_box_new_text): idem.
+	(combo_box_entry_new_with_model): idem.
+	(combo_box_entry_new_text): idem.
+	(expander_new_with_mnemonic): idem.
+	(file_chooser_button_new_with_backend): idem.
+	(file_chooser_button_new_with_dialog): idem.
+	(file_chooser_widget_new_with_backend): idem.
+	(gtk_font_button_new_with_font): idem.
+	(icon_set_new): idem.
+	(gtk_icon_view_new_with_model): idem.
+	(gtk_menu_tool_button_new_from_stock): idem.
+	(toggle_tool_button_new_from_stock): idem.
+	(tool_button_new_from_stock): idem.
+
+	* gtk/gdk.defs (pixbuf_loader_new_with_mime_type): Add
+	caller-owns-return to fix a reference leak.
+
+2006-01-20  John Ehresman <jpe@wingware.com>
+
+	* gtk/gdk.override (_wrap_gdk_window_new): Bump ref count
+	on x11 so destroy() works as expected
+
+	* tests/test_gdk.py: test for the above
+
+2006-01-19  Johan Dahlin  <jdahlin@async.com.br>
+
+	* examples/Makefile.am:
+	Install examples
+
+	* examples/gtk/widget.py:
+	Call unrealize too
+
+	* examples/gtk/scrollable.py:
+	Add example of a scrollable widget
+
+2006-01-15  Christopher Aillon  <caillon@redhat.com>
+
+	* gobject/gobjectmodule.c (pyg_strv_to_gvalue):
+	Don't call g_value_init since the other *_to_gvalue
+	methods expect an already inited GValue
+
+2006-01-11  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: Post release version bump
+
+=== PyGTK 2.8.4 ===
+2006-01-11  Johan Dahlin  <jdahlin@async.com.br>
+
+	* NEWS: Update.
+
+	* Makefile.am: Only install pygtk.pth if we're building gobject.
+
+2006-01-10  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk-types.defs (IconView): should implement gtk.CellLayout
+
+2006-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* Makefile.am,
+	* configure.in,
+	* gtk/Makefile.am,
+	* tests/Makefile.am: Fix pygobject check; Add external pygobject
+	include dir to include path instead of the internal one if
+	compiling with pygobject 2.9.
+
+	* Makefile.am: Don't build or install gobject bindings if
+	pygobject >= 2.9 was found.
+
+	* configure.in: Check for pygobject 2.9; create an AM conditional
+	based on it.
+
+=== PyGTK 2.8.3 ===
+2006-01-04  Cedric Gustin  <cedric.gustin@gmail.com>
+
+	* dsextras.py (Template.generate): Pass GLOBAL_MACROS (in
+	particular HAVE_PYCAIRO) to codegen DefsParser.
+	* setup.py: If pangocairo is enabled, add pycairo to the list of
+	packages required to build the GTK+ module. Also set HAVE_PYCAIRO.
+
+2005-12-24  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/pygflags.c (pyg_flags_add): Tolerate module == NULL,
+	which may happen when called from pyg_flags_from_gtype if a
+	wrapper for the GFlags was not registered.
+
+2005-11-15  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygobject.c (pygobject_new_with_interfaces): We always
+	need to free interfaces since its a null terminated array.
+
+2005-11-13  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/gobjectmodule.c (pyg_type_register): Remove deprecation
+	warning.
+
+2005-11-13  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtk.defs (gtk_image_new_from_stock)
+	(gtk_image_new_from_icon_set, image_new_from_animation)
+	(gtk_image_new_from_icon_name)
+	(gtk_radio_menu_item_new_from_widget)
+	(gtk_radio_menu_item_new_with_mnemonic_from_widget)
+	(gtk_radio_menu_item_new_with_label_from_widget): Add missing
+	"(caller-owns-return #t)" -- fixes mem leaks.
+
+2005-11-12  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gdk.override (_wrap_gdk_pixbuf_animation_iter_advance):
+	Missing g_object_unref(ret), since caller owns the return value.
+
+2005-11-11  Johan Dahlin  <jdahlin@async.com.br>
+
+	* examples/gtk/sizegroup.py: New example.
+
+2005-11-09  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* gobject/pygobject.c (CHECK_GOBJECT): Use %p formatter instead of 0x%x.
+
+	* gobject/pygobject-private.h (pyg_gil_state_ensure)
+	(pyg_gil_state_release): Sync these macro definitions with the
+	version in pygobject.h, i.e. don't call pygobject API
+	replacements, call the Python API directly.
+
+	* tests/Makefile.am (tests): Add test_glade.py.
+
+	* tests/test_glade.py: Add this file which was missing from CVS.
+
+	* gtk/gtk.defs (gtk_widget_render_icon): Add missing
+	"(caller-owns-return #t)" to plug a leak.
+
+2005-11-03  Manish Singh  <yosh@gimp.org>
+
+	reviewed by: Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/gobjectmodule.c: (pyg_integer_richcompare):
+	* gobject/pygenum.c: (pyg_enum_richcompare):
+	* gobject/pygflags.c: (pyg_flags_richcompare):
+	* gobject/pygobject-private.h:
+	Prepare for Python 2.5 richcompare changes, fixes #320455.
+
+2005-11-02  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/__init__.py: Remove '' from sys.path if it was added by
+	PySys_SetArgv in init_gtk.
+
+2005-10-15  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gtk/gtkobject-support.c (pygtk_custom_destroy_notify): Add
+	g_return_if_fail to catch user_data == NULL.
+
+	* gtk/gtktreeview.override (pygtk_set_search_equal_func_marshal):
+	Add some NULL parameter checks.  Use PyObject_IsTrue instead of
+	comparing agains PyTrue.
+
+2005-10-14  Johan Dahlin  <jdahlin@async.com.br>
+
+	* tests/Makefile.am (tests):
+	* tests/test_gdk.py: Add test
+
+	* gtk/gdk.defs (pixmap_create_from_data)
+	(bitmap_create_from_data): use guchar* instead of gchar,
+	fixes #318874 (Bob Gibbs)
+
+2005-10-09  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: post release version bump
+
+=== PyGTK 2.8.2 ===
+2005-10-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* NEWS: Update
+
+2005-10-09  Johan Dahlin  <johan@gnome.org>
+
+	* gobject/pygiochannel.c: (pyg_iowatch_marshal):
+	Use GIL state instead of block/unblock. Fixes crasher found
+	by Ole Andre Valda RavnÃ¥s.
+
+2005-10-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: post release version bump
+
+=== PyGTK 2.8.1 ===
+2005-10-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* NEWS: Update
+
+2005-10-03  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/pygobject.c: (PyGProps_length):
+	* gtk/gdk.defs:
+	* gtk/gdk.override:
+	* gtk/gtk.defs:
+	* gtk/gtk.override:
+	Fix gcc 4.0 warnings.
+
+2005-10-02  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* tests/test_properties.py (PropertyObject.__gproperties__)
+	(PropertyObject.do_get_property, PropertyObject.do_set_property)
+	(TestProperties.testUint64): Add guint64 property test case, by
+	Johan Dahlin.
+
+	* gobject/pygtype.c (pyg_value_from_pyobject): Accept conversion
+	from PyInt (not just PyLong) to guint64.
+	(_wrap_g_type_wrapper__get_children): Fix sign/unsigned warning.
+	(_wrap_g_type_wrapper__get_interfaces): idem.
+	(pyg_value_from_pyobject): idem.
+
+2005-10-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* tests/test_subtype.py (TestSubType.testGObjectNewError): Add new
+	test for the bug below.
+
+	* gobject/gobjectmodule.c (pyg_object_new): don't unref/sink obj
+	if it is NULL.
+
+2005-09-29  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/gobjectmodule.c: (pyg_type_name), (pyg_type_from_name),
+	(pyg_type_parent), (pyg_type_is_a), (pyg_type_children),
+	(pyg_type_interfaces): Undeprecate for now.
+
+2005-09-28  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+	* tests/Makefile.am (tests): Add test_textview.py.
+
+	* tests/test_textview.py: Test gtk.TextView.get_default_attributes().
+
+	* gtk/gtktextview.override
+	(_wrap_gtk_text_view_get_default_attributes): Override to
+	workaround gtk bug #317455.
+
+	* pangomodule.c (initpango): Fix values of pango.SCALE_X_LARGE and
+	pango.SCALE_XX_LARGE.
+
+2005-09-25  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* tests/Makefile.am (EXTRA_DIST): Add leak.glade.
+
+	* tests/test_glade.py: Test case for the leak below.
+
+	* gtk/libglade.override (connect_many): Fix a reference leak in 'tuple'.
+
+2005-09-22  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/gobjectmodule.c: (pyg_type_from_name):
+	* gobject/pygobject.c: (pygobject_connect),
+	(pygobject_connect_after), (pygobject_connect_object),
+	(pygobject_connect_object_after), (pygobject_emit),
+	(pygobject_stop_emission):
+	Include the object and the name of the signal in TypeErrors
+
+2005-09-20  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtk.defs (Entry.set_completion): Add null-ok
+
+2005-09-16  John Ehresman  <jpe@wingware.com>
+
+	* gtk/gdk.override (_wrap_gdk_event_tp_setattr): Allow subwindow
+	to be set for enter & leave notify events.
+
+2005-09-16  John Ehresman  <jpe@wingware.com>
+
+	* gobjectmodule.c (initgobject): Add gobject.Warning Warning subclass
+	and redirect all g_log messages for the "GLib", "Glib-GObject", and
+	"GThread" domains to the python warning system
+
+	* pangomodule.c (initpango): Add pango.Warning Warning subclass
+	and redirect all g_log messages for the "Pango" domain to the
+	python warning system
+
+	* gtkmodule.c (initgtk): Move gtk Warning subclass from the gdk
+	module to the gtk module and added redirections for g_log messages
+	for the "Gdk" and "GdkPixbuf" domains to the python warning system
+
+	* gtk/__init__.py: Set gdk.Warning = gtk.Warning for backward
+	compatibility
+
+2005-09-13  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gdk.defs:
+	* gtk/gtk.defs:
+	* gtk/gtk.override:
+	* gtk/gtktextview.override:
+	* gtk/gtktreeview.override:
+	* gtk/gtkwidget.override:
+
+	Revert Johns latest commit.
+
+2005-09-13  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/gobjectmodule.c (add_properties): Append extra
+	information to the exception value strings to help contextualize
+	any errors that occur while registering properties.
+
+2005-09-06  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gdk.defs (set_urgency_hint): Add.
+
+	* gtk/gtktreeview.override (_wrap_gtk_tree_view_get_visible_range):
+	Add.
+
+	* gtk/gtk.defs (set_drag_dest_item): Allow path to be None.
+	(get_visible_range): Add.
+
+2005-09-05  John Finlay  <finlay@moeraki.com>
+
+	* gtk/gtk.defs (set_cursor): Allow cell to be None
+
+	* gtk/gtkwidget.override (_wrap_gtk_drag_source_set_icon_name1): Add.
+
+	* gtk/gtk.defs (gtk_drag_source_set_icon_name): Add as a widget method
+	and deprecate function gtk.drag_source_set_icon_name.
+
+	* gtk/gdk.defs (set_icon_name): Add.
+
+	* gtk/gtktextview.override (_wrap_gtk_text_view_get_iter_at_position):
+	Add.
+
+	* gtk/gtk.override (_wrap_gtk_clipboard_request_image): Add.
+
+	* gtk/gtk.defs (gtk_alternative_dialog_button_order)
+	(gtk_clipboard_request_image, gtk_clipboard_wait_for_image)
+	(gtk_clipboard_set_image, gtk_clipboard_wait_is_image_available)
+	(drag_source_add_iamge_targets, drag_source_add_uri_targets):
+	Add defs.
+
+2005-09-02  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/pygparamspec.c (pyg_param_spec_getattr): Sort all attributes
+	alphabetically, like python does. Set default value to None
+	(pyg_param_spec_getattr): Add default_values fallback, for backwards
+	compatibility.
+
+2005-09-02  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+	* gobject/gobjectmodule.c (_wrap_pyg_type_register): Don't crash
+	when registering non-types.
+
+	* tests/test_subtype.py: Test registering non-types raises
+	TypeError.
+
+	Fixes #315100: "gobject.type_register crashes if parameter is not
+	a type."
+
+2005-09-02  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gobject/gobjectmodule.c: (pyg_signal_list_names):
+	Also include interfaces, fixes #315038
+
+2005-09-02  Johan Dahlin  <jdahlin@async.com.br>
+
+	* configure.in: post release version bump
+
+	* Changelog.pre-2-8: Move old changelog
+
Index: pkg/pygtk/branches/upstream/current/setup.py
===================================================================
--- pkg/pygtk/branches/upstream/current/setup.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/setup.py	(revision 4)
@@ -0,0 +1,320 @@
+#!/usr/bin/env python
+#
+# setup.py - distutils configuration for pygtk
+#
+# TODO:
+# pygtk.spec(.in)
+# install *.pyc for codegen
+#
+"""Python Bindings for the GTK Widget Set.
+
+PyGTK is a set of bindings for the GTK widget set. It provides an object
+oriented interface that is slightly higher level than the C one. It
+automatically does all the type casting and reference counting that you
+would have to do normally with the C API. You can find out more on the
+official homepage, http://www.daa.com.au/~james/pygtk/"""
+
+from distutils.command.build import build
+from distutils.core import setup
+import glob
+import os
+import sys
+
+from dsextras import get_m4_define, getoutput, have_pkgconfig, \
+     pkgc_version_check, \
+     GLOBAL_INC, GLOBAL_MACROS, InstallLib, InstallData, BuildExt, \
+     PkgConfigExtension, Template, TemplateExtension
+
+
+if '--yes-i-know-its-not-supported' in sys.argv:
+    sys.argv.remove('--yes-i-know-its-not-supported')
+else:
+    print '*'*70
+    print 'Building PyGTK using distutils is NOT SUPPORTED.'
+    print "It's mainly included to be able to easily build win32 installers"
+    print "You may continue, but only if you agree to not ask any questions"
+    print "To build PyGTK in a supported way, read the INSTALL file"
+    print
+    print "Build fixes are of course welcome and should be filed in bugzilla"
+    print '*'*70
+    input = raw_input('Not supported, ok [y/N]? ')
+    if not input.startswith('y'):
+        raise SystemExit
+
+    if sys.version_info[:3] < (2, 3, 5):
+        raise SystemExit, \
+              "Python 2.3.5 or higher is required, %d.%d.%d found" % sys.version_info[:3]
+    
+MAJOR_VERSION = int(get_m4_define('pygtk_major_version'))
+MINOR_VERSION = int(get_m4_define('pygtk_minor_version'))
+MICRO_VERSION = int(get_m4_define('pygtk_micro_version'))
+
+VERSION = "%d.%d.%d" % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)
+
+GOBJECT_REQUIRED  = get_m4_define('glib_required_version')
+ATK_REQUIRED      = get_m4_define('atk_required_version')
+PANGO_REQUIRED    = get_m4_define('pango_required_version')
+GTK_REQUIRED      = get_m4_define('gtk_required_version')
+LIBGLADE_REQUIRED = get_m4_define('libglade_required_version')
+PYCAIRO_REQUIRED  = get_m4_define('pycairo_required_version')
+
+PYGTK_SUFFIX = '2.0'
+PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX
+
+GLOBAL_INC += ['.', 'gtk']
+GLOBAL_MACROS += [('PYGTK_MAJOR_VERSION', MAJOR_VERSION),
+                  ('PYGTK_MINOR_VERSION', MINOR_VERSION),
+                  ('PYGTK_MICRO_VERSION', MICRO_VERSION)]
+
+if sys.platform == 'win32':
+    GLOBAL_MACROS.append(('VERSION', '"""%s"""' % VERSION))
+    GLOBAL_MACROS.append(('PLATFORM_WIN32',1))
+    GLOBAL_MACROS.append(('HAVE_BIND_TEXTDOMAIN_CODESET',1))
+else:
+    GLOBAL_MACROS.append(('VERSION', '"%s"' % VERSION))
+
+DEFS_DIR    = os.path.join('share', 'pygtk', PYGTK_SUFFIX, 'defs')
+CODEGEN_DIR = os.path.join('share', 'pygtk', PYGTK_SUFFIX, 'codegen')
+INCLUDE_DIR = os.path.join('include', 'pygtk-%s' % PYGTK_SUFFIX)
+HTML_DIR = os.path.join('share', 'gtk-doc', 'html', 'pygtk')
+
+class PyGtkInstallLib(InstallLib):
+    def run(self):
+
+        # Install pygtk.pth, pygtk.py[c] and templates
+        self.install_pth()
+
+        # Modify the base installation dir
+        install_dir = os.path.join(self.install_dir, PYGTK_SUFFIX_LONG)
+        self.set_install_dir(install_dir)
+
+        InstallLib.run(self)
+
+    def install_pth(self):
+        """Write the pygtk.pth file"""
+        file = os.path.join(self.install_dir, 'pygtk.pth')
+        self.mkpath(self.install_dir)
+        open(file, 'w').write(PYGTK_SUFFIX_LONG)
+        self.local_outputs.append(file)
+        self.local_inputs.append('pygtk.pth')
+
+class PyGtkInstallData(InstallData):
+    def run(self):
+        self.add_template_option('VERSION', VERSION)
+        self.prepare()
+
+        # Install templates
+        self.install_templates()
+
+        InstallData.run(self)
+
+    def install_templates(self):
+        file = self.install_template('codegen/pygtk-codegen-2.0.in',
+                                     os.path.join(self.install_dir, 'bin'))
+        os.chmod(file, 0755)
+        self.install_template('pygtk-2.0.pc.in',
+                              os.path.join(self.install_dir,
+                                           'lib','pkgconfig'))
+
+class PyGtkBuild(build):
+    enable_threading = 1
+PyGtkBuild.user_options.append(('enable-threading', None,
+                                'enable threading support'))
+
+# Atk
+atk = TemplateExtension(name='atk', pkc_name='atk',
+                        pkc_version=ATK_REQUIRED,
+                        sources=['atkmodule.c', 'atk.c'],
+                        register=['atk-types.defs'],
+                        override='atk.override',
+                        defs='atk.defs',
+                        py_ssize_t_clean=True)
+# Pango
+pango = TemplateExtension(name='pango', pkc_name='pango',
+                          pkc_version=PANGO_REQUIRED,
+                          sources=['pango.c', 'pangomodule.c'],
+                          register=['pango-types.defs'],
+                          override='pango.override',
+                          defs='pango.defs',
+                          py_ssize_t_clean=True)
+# Pangocairo
+pangocairo = TemplateExtension(name='pangocairo',
+                               pkc_name=('pycairo', 'pangocairo'),
+                               pkc_version=(PYCAIRO_REQUIRED,
+                                            PANGO_REQUIRED),
+                               sources=['pangocairo.c', 'pangocairomodule.c'],
+                               register=['pango-types.defs'],
+                               override='pangocairo.override',
+                               defs='pangocairo.defs',
+                               py_ssize_t_clean=True)
+
+# Gdk (template only)
+gdk_template = Template('gtk/gdk.override', 'gtk/gdk.c',
+                        defs=('gtk/gdk.defs',
+                              ['gtk/gdk-2.10.defs','gtk/gdk-base.defs']),
+                        prefix='pygdk',
+                        register=['atk-types.defs',
+                                  'pango-types.defs',
+                                  ('gtk/gdk-types.defs',
+                                   ['gtk/gdk-base-types.defs'])],
+                        py_ssize_t_clean=True)
+# Gtk+
+if pangocairo.can_build():
+    gtk_pkc_name=('gtk+-2.0','pycairo')
+    gtk_pkc_version=(GTK_REQUIRED,PYCAIRO_REQUIRED)
+else:
+    gtk_pkc_name='gtk+-2.0'
+    gtk_pkc_version=GTK_REQUIRED
+
+if pkgc_version_check('gtk+-2.0', '2.10.0'):
+    gtk_pkc_defs=('gtk/gtk.defs',['gtk/gtk-2.10.defs','gtk/gtk-base.defs'])
+    gtk_pkc_register=['pango-types.defs',
+                      ('gtk/gdk-types.defs',['gtk/gdk-base-types.defs']),
+                      ('gtk/gtk-types.defs',['gtk/gtk-base-types.defs',
+                                             'gtk/gtk-2.10-types.defs'])]
+    libglade_pkc_register=[('gtk/gtk-types.defs',
+                            ['gtk/gtk-base-types.defs',
+                             'gtk/gtk-2.10-types.defs']),
+                           'gtk/libglade.defs']
+else:
+    gtk_pkc_defs=('gtk/gtk.defs',['gtk/gtk-base.defs'])
+    gtk_pkc_register=['pango-types.defs',
+                      ('gtk/gdk-types.defs',['gtk/gdk-base-types.defs']),
+                      ('gtk/gtk-types.defs',['gtk/gtk-base-types.defs'])]
+    libglade_pkc_register=[('gtk/gtk-types.defs',['gtk/gtk-base-types.defs']),
+                           'gtk/libglade.defs']
+
+gtk = TemplateExtension(name='gtk', pkc_name=gtk_pkc_name,
+                        pkc_version=gtk_pkc_version,
+                        output='gtk._gtk',
+                        sources=['gtk/gtkmodule.c',
+                                 'gtk/gtkobject-support.c',
+                                 'gtk/gtk-types.c',
+                                 'gtk/pygtktreemodel.c',
+                                 'gtk/pygtkcellrenderer.c',
+                                 'gtk/gdk.c',
+                                 'gtk/gtk.c'],
+                        register=gtk_pkc_register,
+                        override='gtk/gtk.override',
+                        defs=gtk_pkc_defs,
+                        py_ssize_t_clean=True)
+gtk.templates.append(gdk_template)
+
+# Libglade
+libglade = TemplateExtension(name='libglade', pkc_name='libglade-2.0',
+                             pkc_version=LIBGLADE_REQUIRED,
+                             output='gtk.glade',
+                             defs='gtk/libglade.defs',
+                             sources=['gtk/libglademodule.c',
+                                      'gtk/libglade.c'],
+                             register=libglade_pkc_register,
+                             override='gtk/libglade.override',
+                             py_ssize_t_clean=True)
+
+data_files = []
+ext_modules = []
+py_modules = []
+packages = ['codegen']
+
+if not have_pkgconfig():
+    print "Error, could not find pkg-config"
+    raise SystemExit
+
+if atk.can_build():
+    ext_modules.append(atk)
+    data_files.append((DEFS_DIR, ('atk.defs', 'atk-types.defs')))
+if pango.can_build():
+    ext_modules.append(pango)
+    data_files.append((DEFS_DIR, ('pango.defs', 'pango-types.defs')))
+    if pangocairo.can_build():
+        ext_modules.append(pangocairo)
+        data_files.append((DEFS_DIR, ('pangocairo.defs',)))
+        GLOBAL_MACROS.append(('HAVE_PYCAIRO',1))
+if gtk.can_build():
+    if '--disable-numeric' in sys.argv:
+        sys.argv.remove('--disable-numeric')
+    else:
+        try:
+            import Numeric
+            Numeric # pyflakes
+            GLOBAL_MACROS.append(('HAVE_NUMPY', 1))
+        except ImportError:
+            print ('* Numeric module could not be found, '
+                   'will build without Numeric support.')
+    ext_modules.append(gtk)
+    data_files.append((os.path.join(INCLUDE_DIR, 'pygtk'), ('gtk/pygtk.h',)))
+    data_files.append((DEFS_DIR, ('gtk/gdk.defs', 'gtk/gdk-types.defs',
+                                  'gtk/gdk-base.defs',
+                                  'gtk/gdk-base-types.defs',
+                                  'gtk/gtk.defs', 'gtk/gtk-types.defs',
+                                  'gtk/gtk-2.10.defs',
+                                  'gtk/gtk-2.10-types.defs',
+                                  'gtk/gtk-base.defs',
+                                  'gtk/gtk-base-types.defs',
+                                  'gtk/gtk-extrafuncs.defs')))
+    data_files.append((HTML_DIR, glob.glob('docs/html/*.html')))
+    py_modules += ['gtk.compat', 'gtk.deprecation', 'gtk.keysyms',
+                   'gtk._lazyutils']
+
+if libglade.can_build():
+    ext_modules.append(libglade)
+    data_files.append((DEFS_DIR, ('gtk/libglade.defs',)))
+
+# Threading support
+if '--disable-threading' in sys.argv:
+    sys.argv.remove('--disable-threading')
+    enable_threading = False
+else:
+    if '--enable-threading' in sys.argv:
+        sys.argv.remove('--enable-threading')
+    try:
+        import thread
+        thread # pyflakes
+    except ImportError:
+        print "Warning: Could not import thread module, disabling threading"
+        enable_threading = False
+    else:
+        enable_threading = True
+
+if enable_threading:
+    name = 'gthread-2.0'
+    for module in ext_modules:
+        raw = getoutput('pkg-config --libs-only-l %s' % name)
+        for arg in raw.split():
+            if arg.startswith('-l'):
+                module.libraries.append(arg[2:])
+            else:
+                module.extra_link_args.append(arg)
+        raw = getoutput('pkg-config --cflags-only-I %s' % name)
+        for arg in raw.split():
+            if arg.startswith('-I'):
+                module.include_dirs.append(arg[2:])
+            else:
+                module.extra_compile_args.append(arg)
+else:
+    GLOBAL_MACROS.append(('DISABLE_THREADING', 1))
+
+
+doclines = __doc__.split("\n")
+
+options = {"bdist_wininst": {"install_script": "pygtk_postinstall.py"}}
+
+setup(name="pygtk",
+      url='http://www.daa.com.au/~james/pygtk/',
+      version=VERSION,
+      license='LGPL',
+      platforms=['yes'],
+      maintainer="James Henstridge",
+      maintainer_email="james@daa.com.au",
+      description = doclines[0],
+      long_description = "\n".join(doclines[2:]),
+      py_modules=py_modules,
+      packages=packages,
+      ext_modules=ext_modules,
+      data_files=data_files,
+      scripts = ["pygtk_postinstall.py"],
+      options=options,
+      cmdclass={'install_lib': PyGtkInstallLib,
+                'install_data': PyGtkInstallData,
+                'build_ext': BuildExt,
+                'build': PyGtkBuild})
Index: pkg/pygtk/branches/upstream/current/THREADS
===================================================================
--- pkg/pygtk/branches/upstream/current/THREADS	(revision 4)
+++ pkg/pygtk/branches/upstream/current/THREADS	(revision 4)
@@ -0,0 +1,119 @@
+-*- mode: text; mode: auto-fill -*-
+
+Requirements to get threading to work with pygtk2
+=================================================
+
+Python side
+-----------
+* Python has a global interpreter lock, so no two threads can execute
+  code at the same time.
+
+* In order to execute python code, you need to hold the interpreter
+  lock, and have the correct PyThreadState object set
+  (PyThreadState_Swap is used for this).  As a convenience, the
+  following functions can be used:
+    void PyEval_AcquireThread(PyThreadState *tstate);
+    void PyEval_ReleaseThread(PyThreadState *tstate);
+
+* When C functions are called from python, the global interpreter lock
+  is held.  If the function blocks, then no python code can execute in
+  other threads during this time.  Python provides two macros to allow
+  threads to run while the function executes:
+    Py_BEGIN_ALLOW_THREADS
+    Py_END_ALLOW_THREADS
+  between these two macro calls, the global interpreter lock is
+  released, and the current thread state is set to NULL.  This means
+  that in order to execute python code, AcquireThread must be called.
+
+GLib side
+---------
+* The glib main loop function blocks, so we need to allow threads so
+  that other threads don't hang while in the event loop.
+
+* Destroy notifies and signal handlers may be called in response to
+  some function call (such as GObject.set_data or GtkButton.clicked),
+  or while the main loop is running.  In the first case, the global
+  interpreter lock will be held, and a thread state will be acquired.
+  In the second case, the global interpreter lock will not be held by
+  us and there will be a NULL thread state.  Example:
+---- Cut Here ----
+  import gtk
+  ...
+  b = gtk.GtkButton("Click me")
+  def f(button):
+      ... some python code ...
+  b.connect("clicked", f)
+  b.clicked()  # the signal handler f is called with the interpreter
+               # lock held
+  ...
+  gtk.main()   # if the button is clicked while in the main loop, the
+               # interpreter lock may be held by someone else
+---- Cut Here ----
+
+* We need to have a valid thread state before executing one of these
+  callbacks, or bad things happen.
+
+* Ideally, the solution chosen should work at the GObject level,
+  rather than GTK/GDK level.
+
+* In gtk 1.2 based PyGTK, we used a bit of code from Paul Fisher to
+  handle this problem.  It relied on the global GDK lock to serialise
+  requests to unblock threading.  As the GObject functions do not rely
+  on a global lock being held, we can't use this.  Here is the
+  existing code:
+---- Cut Here ----
+/* The threading code has been enhanced to be a little better with multiple
+ * threads accessing GTK+.  Here are some notes on the changes by
+ * Paul Fisher:
+ *
+ * If threading is enabled, we create a recursive version of Python's
+ * global interpreter mutex using TSD.  This scheme makes it possible,
+ * although rather hackish, for any thread to make a call into PyGTK,
+ * as long as the GDK lock is held (that is, Python code is wrapped
+ * around a threads_{enter,leave} pair).
+ *
+ * A viable alternative would be to wrap each and every GTK call, at
+ * the Python/C level, with Py_{BEGIN,END}_ALLOW_THREADS.  However,
+ * given the nature of Python threading, this option is not
+ * particularly appealing.
+ */
+
+static GStaticPrivate pythreadstate_key = G_STATIC_PRIVATE_INIT;
+static GStaticPrivate counter_key = G_STATIC_PRIVATE_INIT;
+
+/* The global Python lock will be grabbed by Python when entering a
+ * Python/C function; thus, the initial lock count will always be one.
+ */
+#  define INITIAL_LOCK_COUNT 1
+#  define PyGTK_BLOCK_THREADS                                              \
+   {                                                                       \
+     gint counter = GPOINTER_TO_INT(g_static_private_get(&counter_key));   \
+     if (counter == -INITIAL_LOCK_COUNT) {                                 \
+       PyThreadState *_save;                                               \
+       _save = g_static_private_get(&pythreadstate_key);                   \
+       Py_BLOCK_THREADS;                                                   \
+     }                                                                     \
+     counter++;                                                            \
+     g_static_private_set(&counter_key, GINT_TO_POINTER(counter), NULL);   \
+   }
+
+#  define PyGTK_UNBLOCK_THREADS                                            \
+   {                                                                       \
+     gint counter = GPOINTER_TO_INT(g_static_private_get(&counter_key));   \
+     counter--;                                                            \
+     if (counter == -INITIAL_LOCK_COUNT) {                                 \
+       PyThreadState *_save;                                               \
+       Py_UNBLOCK_THREADS;                                                 \
+       g_static_private_set(&pythreadstate_key, _save, NULL);              \
+     }                                                                     \
+     g_static_private_set(&counter_key, GINT_TO_POINTER(counter), NULL);   \
+   }
+---- Cut Here ----
+
+* One possible solution is to wrap every single pygtk call in
+  Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS calls.  This would
+  probably be quite slow.
+
+* Can Paul Fisher's code be modified to work without needing the GDK
+  lock for serialisation?
+
Index: pkg/pygtk/branches/upstream/current/MAPPING
===================================================================
--- pkg/pygtk/branches/upstream/current/MAPPING	(revision 4)
+++ pkg/pygtk/branches/upstream/current/MAPPING	(revision 4)
@@ -0,0 +1,170 @@
+The mapping of GTK+ onto Python
+===============================
+
+This file documents the mapping of the C GTK+ functions and types in
+the pygtk package.  If you want just enough information on how to use
+C documentation to help you program with pygtk or help you read or
+translate GTK+ programs written in C, then see the "Mapping of GTK+
+functions to gtk.py" section.
+
+
+The _gtk module
+===============
+
+This module is almost a direct mapping of the GTK+ functions.  It has
+no object oriented constructs and is the part written in C.  Large
+parts of it are generated from .defs files (which are also used in the
+guile and perl bindings), while some is written in hand crafted C.
+Note that this module is mainly a convenience that makes it easier to
+code the higher level gtk.py.
+
+There are a number of types defined by this module.  The main one is a
+wrapper for GtkObject and all its descendants.  This type is just a
+wrapper round the pointer, and calls gtk_object_ref on creation, and
+gtk_object_unref on destruction (hence the C structure will not be
+freed while python has a reference to it).
+
+For all the functions in _gtk that take GtkObject descendents as
+arguments, the type conversion is done automatically (so you don't
+have to call GTK_WIDGET or GTK_CONTAINER type macros).  So at this
+level, reference counting and type casting has already been taken care
+of.
+
+Also a number of other types are defined in this module.  For these
+objects, there are relatively few functions and attributes specific to
+the individual types, so I have spent some time writing nice
+interfaces to them.  Outlines of the available attributes and methods
+of these types are available in the file description.py, which is
+distributed with pygtk.  These types include:
+  GtkCTreeNode
+  GtkStyle
+  GtkSelectionData
+  GdkAtom
+  GdkColor
+  GdkColormap
+  GdkCursor
+  GdkDragContext
+  GdkEvent
+  GdkFont
+  GdkGC
+  GdkWindow (aka GdkDrawable aka GdkPixmap aka GdkBitmap)
+
+Also, for the functions defined in _gtk, enumerations and flags are
+handled specially.  Where an enumeration value is to be passed to a
+function, you can give it an integer representing its value, or a
+string representing the name.  For the list of names that can be used,
+see the file gtk.defs that comes with the GTK+ distribution.  The
+(define-enum) and (define-flags) sections list the possible values.
+For flags, you can pass any value that would be accepted as an enum
+value in adition to a tuple of strings, which would be converted to
+their corresponding numeric values and ORed together.
+
+GTK.py and GDK.py
+=================
+
+These python modules define the numerical values for the host of enums
+and flags in gtk and gdk respectively.  The GTK_ prefix has been
+removed from the gtk enums, and the GDK_ prefix from the GDK ones
+(where this would leave the identifier starting with a digit, an
+underscore has been prepended).  This way if you do an "import GTK",
+you reference the constants with a gtk prefix (eg GTK.STATE_NORMAL),
+or if you do a "from GTK import *" you can access the constants via
+shorter names (eg STATE_NORMAL).
+
+With _gtk, GTK.py and GDK.py, you should be able to write programs
+that quite closely resemble the what they would look like in C (minus
+type casts and occasional referencing/dereferencing).
+
+gtk.py
+======
+
+This module is meant to be the high level interface that will be used
+by most programmers.  It defines a number of classes that mirror the
+class heirachy of the GtkObject descendents found in GTK+.  Each of
+these classes has an _o attribute which points to an instance of the
+GtkObject wrapper type from _gtk.
+
+Because of reference counting problems (we don't want the GTK object
+to die while we have a reference to the python one, and we don't want
+the python one to die while we have a reference to the GTK object --
+circular reference alert :), there will usually be more than one of
+these python wrappers existing for a single GtkObject (ie. a 1 to many
+relationship).  The bigest example of this is signal handlers where a
+different object will always be passed in.  This means that any
+attributes you set on the object (ie. obj.foo = "bar") will not be
+visible inside the callback.  You can get round this by using the
+object data mechanisms:
+  obj.set_data("string_tag", data)
+  data = obj.get_data("string_tag")
+
+This data will be accessible to every instance pointing to a single
+GtkObject.
+
+Since there are two times you may want to create instances of these
+classes, there are two ways to call their constructors:
+  - as normal to create a new C level object.
+  - as 'GtkSomething(_obj=obj)', which does not create a new C level
+    object, but creates a new python instance that represents the C
+    level object wrapped by obj.
+
+The second way of creating instances is done by giving default values
+for all the constructor arguments, and adding "_obj=None" to the end
+of the argument list.  Then the first line of the constructor is set
+to:
+    if _obj: self._o = _obj; return
+
+Mapping of GTK+ functions to gtk.py
+===================================
+
+For each GtkObject descendent, there is a python class of the same
+name.  It will list the C class's superclass as its superclass.  For
+each desendant, say GtkSomething, there will be a function defined in
+GTK+ called gtk_something_new() or similar.  This is mapped to the
+constructor for the class.
+
+There are usually a number of other functions starting with
+gtk_something_ in GTK+.  These functions will generally take an
+instance of GtkSomething as the first argument.  These map to methods
+of the python class.  So the following:
+  gtk_something_method(GtkSomething *something, args, ...)
+maps to this:
+  something.method(args, ...)
+
+Note that this means that methods of the parent class are accessed as
+easily as those of the actual class.
+
+There are a few special cases of course.  For instance, all the
+gtk_drag_*() functions have been mapped to GtkWidget.drag_*(), and the
+gtk_selection_*() functions have been mapped to
+GtkWidget.selection_*().
+
+The object argument mechanisms are also implemented in pygtk.  You can
+query and change these properties on an already instantiated object
+using the mapping behaviour similar to the way you can in Tkinter (eg
+label_widget['label'] = 'Hello' will change a label's text).  You can
+also create new objects and setting their object arguments at creation
+time with the new() method.  The first argument should be the class
+object for the instance you want.  The rest of the arguments should be
+keyword arguments specifying the object arguments you want to set (eg
+label = new(GtkLabel, label='Hello')).
+
+There are also a number of other functions not associated with any
+particular class that are accessible through the global scope of the
+gtk.py module.  It is probably easiest to read the end of gtk.py to
+get a feel for these functions.
+
+gtk.py also imports the GTK constants with "from GTK import *", and
+the GDK constants with "import GDK".  The reasons for using "from GTK
+import *" are partly for convenience and partly because thats how I
+did it when I first wrote pygtk :)
+
+Conclusions
+===========
+
+That about sums up the language mapping in pygtk.  The best way of
+learning how to program in pygtk is to read sample code.  Take a look
+at the examples/ directory, and go through the examples there.
+
+If you think something is missing from this document, please mail me
+at <james@daa.com.au>.
+
Index: pkg/pygtk/branches/upstream/current/config.h.win32
===================================================================
--- pkg/pygtk/branches/upstream/current/config.h.win32	(revision 4)
+++ pkg/pygtk/branches/upstream/current/config.h.win32	(revision 4)
@@ -0,0 +1,6 @@
+
+#define PYGTK_MAJOR_VERSION (2)
+#define PYGTK_MINOR_VERSION (4)
+#define PYGTK_MICRO_VERSION (1)
+
+#define VERSION "2.4.1"
Index: pkg/pygtk/branches/upstream/current/pygtk.spec.in
===================================================================
--- pkg/pygtk/branches/upstream/current/pygtk.spec.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/pygtk.spec.in	(revision 4)
@@ -0,0 +1,127 @@
+# -*- mode: rpm-spec -*-
+%define buildglade %(pkg-config libglade-2.0 && echo 1 || echo 0)
+%define python python2
+
+Summary: Python bindings for the GTK+ widget set.
+Name: pygtk2
+Version: @VERSION@
+Release: 1
+Copyright: LGPL
+Group: Development/Languages
+Source: ftp://ftp.gtk.org/pub/gtk/python/pygtk-%{version}.tar.gz
+BuildRoot: /var/tmp/pygtk-root
+Packager: James Henstridge <james@daa.com.au>
+Requires: gtk2 >= 2.0.0
+Requires: %{python} >= 2.2
+Buildrequires: %{python}-devel >= 2.2
+Buildrequires: libglade2-devel
+
+%description
+PyGTK is an extension module for python that gives you access to the GTK+
+widget set.  Just about anything you can write in C with GTK+ you can write
+in python with PyGTK (within reason), but with all the benefits of python.
+
+%package libglade
+Summary: A wrapper for the libglade library for use with PyGTK
+Group: Development/Languages
+Requires: pygtk2 = %{version}
+
+%description libglade
+This module contains a wrapper for the libglade library.  Libglade allows
+a program to construct its user interface from an XML description, which
+allows the programmer to keep the UI and program logic separate.
+
+%package devel
+Summary: files needed to build wrappers for GTK+ addon libraries
+Group: Development/Languages
+Requires: pygtk2 = %{version}
+
+%description devel
+This package contains files required to build wrappers for GTK+ addon
+libraries so that they interoperate with pygtk.
+
+%changelog
+* Thu Oct 31 2002 Matt Wilson <msw@redhat.com>
+- use libdir for .pc files
+
+* Wed Feb 27 2002 Matt Wilson <msw@redhat.com>
+- 1.99.8
+
+* Mon Jan 28 2002 Matt Wilson <msw@redhat.com>
+- added atkmodule.so to file list
+
+* Thu Oct 18 2001 Matt Wilson <msw@redhat.com>
+- fix devel filelist to match new header location
+
+* Mon Oct 15 2001 Matt Wilson <msw@redhat.com>
+- get the headers from their new version-specific location
+
+* Thu Oct 11 2001 Matt Wilson <msw@redhat.com>
+- fixed typo in devel filelist
+- added macro that tests to see if we have libglade2, make the
+  filelist a condition of that
+- changed name to 'pygtk2' to avoid name conflict with pygtk
+
+%prep
+%setup -q -n pygtk-%{version}
+[ -x /usr/bin/python2.2 ] && export PYTHON=/usr/bin/python2.2
+./configure --prefix=%{_prefix}
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
+
+%files
+%defattr(644, root, root, 755)
+%{_prefix}/lib/python?.?/site-packages/pygtk.pth
+%{_prefix}/lib/python?.?/site-packages/pygtk.py*
+%dir %{_prefix}/lib/python?.?/site-packages/gtk-2.0
+%dir %{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/__init__.py*
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/compat.*
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/keysyms.py*
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/dsextras*
+
+%defattr(755, root, root, 755)
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/atk.so
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gobject.so
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/pango.so
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/_gtk.so
+
+%doc AUTHORS NEWS README MAPPING ChangeLog
+%doc examples
+
+%if %{buildglade}
+%files libglade
+%defattr(755, root, root, 755)
+%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/glade.so
+%endif
+
+%files devel
+%defattr(755, root, root, 755)
+%{_prefix}/bin/pygtk-codegen-2.0
+%defattr(644, root, root, 755)
+%dir %{_prefix}/include/pygtk-2.0
+%{_prefix}/include/pygtk-2.0/*.h
+%dir %{_prefix}/include/pygtk-2.0/pygtk
+%{_prefix}/include/pygtk-2.0/pygtk/*.h
+%{_libdir}/pkgconfig/pygtk-2.0.pc
+%dir %{_prefix}/share/pygtk
+%dir %{_prefix}/share/pygtk/2.0
+%dir %{_prefix}/share/pygtk/2.0/codegen
+%dir %{_prefix}/share/pygtk/2.0/defs
+%{_prefix}/share/pygtk/2.0/codegen/*
+%{_prefix}/share/pygtk/2.0/defs/atk.defs
+%{_prefix}/share/pygtk/2.0/defs/atk-types.defs
+%{_prefix}/share/pygtk/2.0/defs/pango.defs
+%{_prefix}/share/pygtk/2.0/defs/pango-types.defs
+%{_prefix}/share/pygtk/2.0/defs/gdk.defs
+%{_prefix}/share/pygtk/2.0/defs/gdk-types.defs
+%{_prefix}/share/pygtk/2.0/defs/gtk.defs
+%{_prefix}/share/pygtk/2.0/defs/gtk-types.defs
+%{_prefix}/share/pygtk/2.0/defs/gtk-extrafuncs.defs
+%{_prefix}/share/pygtk/2.0/defs/libglade.defs
Index: pkg/pygtk/branches/upstream/current/README
===================================================================
--- pkg/pygtk/branches/upstream/current/README	(revision 4)
+++ pkg/pygtk/branches/upstream/current/README	(revision 4)
@@ -0,0 +1,129 @@
+PyGTK
+=====
+Original author: James Henstridge <james@daa.com.au>
+Current maintainer: Johan Dahlin <johan@gnome.org>
+
+This archive contains modules that allow you to use gtk in Python
+programs.  At present, it is a fairly complete set of bindings.
+Despite the low version number, this piece of software is quite
+useful, and is usable to write moderately complex programs.  (see the
+examples directory for some examples of the simpler programs you could
+write).
+
+If you have any enhancements or bug reports, please file them in
+bugzilla at:
+  http://bugzilla.gnome.org/enter_bug.cgi?product=pygtk
+
+If you have a patch, file the bug first and then use the "create new
+attachment" link on the bug's info page.  My preferred format for
+patches is unified diff format (ie. diff -u).  Please don't send me
+diffs which don't have any context, as these make it very difficult to
+see what the patch does.
+
+What's new in PyGTK 2.10
+========================
+
+See the wiki page for an overview of the features in PyGTK 2.10:
+
+http://live.gnome.org/PyGTK/WhatsNew210
+
+New Versions
+============
+
+New versions of this package can be found at:
+  http://ftp.gnome.org/pub/GNOME/sources/pygtk/
+
+
+Mailing list
+============
+
+There is a mailing list for pygtk.  You can subscribe to it through
+the web interface:
+  http://www.daa.com.au/mailman/listinfo/pygtk
+
+
+Requirements
+============
+  * C compiler (GCC and MSVC supported)
+  * Python 2.3.5 or higher
+  * PyGObject 2.12.1 or higher
+  * Glib 2.8.0 or higher
+  * GTK+ 2.8.0 or higher (optional) or
+    GTK+ 2.10.0 or higher for 2.10 API
+  * libglade 2.5.0 or higher (optional)
+  * pycairo 0.5.0 or higher (optional)
+  * Numeric (optional)
+
+This release is supporting the following GTK+ releases:
+
+  2.8.x
+  2.10.x
+
+To include support for the 2.10 API you'll need GTK+ 2.10.0 etc.
+
+Copyright Information
+=====================
+
+This software is covered by the GNU Lesser General Public Licence
+(version 2.1, or if you choose, a later version).  Basically just don't
+say you wrote bits you didn't.
+
+Compilation
+===========
+
+PyGTK uses the standard autotools for the build infrastructure.  To
+build, it should be as simple as running:
+
+    $ ./configure --prefix=<prefix where python is installed>
+    $ make
+    $ make install
+
+If your Python interpreter isn't in the path, or is not called
+"python", you can set the PYTHON environment variable to the full path
+of the interpreter:
+
+    $ PYTHON=/prefix/bin/python
+    $ export PYTHON
+
+If configure can't find GTK+, you may need to set the PKG_CONFIG_PATH
+environment variable to help it find the libraries.
+
+The "make install" target will generate normal and optimised bytecode
+for all the .py files.
+
+Note. If you're installing to another prefix than the one where python
+is installed you'll need to set the PYTHONPATH variable to the
+$prefix/lib/pythonX.Y/site-packages directory created by
+the PyGTK installation.
+
+Upgrading from 0.6.x
+====================
+
+The API has changed a fair bit compared to the 0.6.x releases of pygtk
+in response to feedback from the mailing list.  The main changes are:
+  - no low level procedural interface.  The extension now implements
+    the object oriented API directly, rather than layering it on top
+    of a procedural API.
+  - class names have been shortened.  Eg. instead of gtk.GtkWindow, we
+    now have gtk.Window.
+  - GDK classes and functions have been moved to the "gtk.gdk" module.
+  - the GTK and GDK modules have been removed, with their constants
+    being moved into the "gtk" and "gtk.gdk" modules.
+
+
+Tests
+=====
+
+After having compiled and installed pygtk, you may want to test them.
+There are a number of example programs available in the examples/
+subdirectory.
+
+
+Getting Help
+============
+
+If you have questions about programming with PyGTK, you might want to
+send a message to the mailing list (information on subscribing is
+above).  Alternatively, your question may be answered in the FAQ:
+
+    http://www.async.com.br/faq/pygtk/?req=index
Index: pkg/pygtk/branches/upstream/current/config.h.in
===================================================================
--- pkg/pygtk/branches/upstream/current/config.h.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/config.h.in	(revision 4)
@@ -0,0 +1,85 @@
+/* config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* If Gtk 2.10 was found */
+#undef HAVE_GTK_2_10
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* whether to include numeric python support */
+#undef HAVE_NUMPY
+
+/* Define to 1 if pycairo is available */
+#undef HAVE_PYCAIRO
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* pycairo major version */
+#undef PYCAIRO_MAJOR_VERSION
+
+/* pycairo micro version */
+#undef PYCAIRO_MICRO_VERSION
+
+/* pycairo minor version */
+#undef PYCAIRO_MINOR_VERSION
+
+/* PyGtk major version */
+#undef PYGTK_MAJOR_VERSION
+
+/* PyGtk micro version */
+#undef PYGTK_MICRO_VERSION
+
+/* PyGtk minor version */
+#undef PYGTK_MINOR_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
Index: pkg/pygtk/branches/upstream/current/pygtk-2.0.pc.in
===================================================================
--- pkg/pygtk/branches/upstream/current/pygtk-2.0.pc.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/pygtk-2.0.pc.in	(revision 4)
@@ -0,0 +1,21 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+pyexecdir=@pyexecdir@
+
+# you can use the --variable=pygtkincludedir argument to
+# pkg-config to get this value.  You might want to use this to
+# install additional headers.
+pygtkincludedir=${includedir}/pygtk-2.0
+
+# same here.  Useful when calling the code generator in addon packages.
+defsdir=${datadir}/pygtk/2.0/defs
+codegendir=${datadir}/pygtk/2.0/codegen
+
+Name: PyGTK
+Description: Python bindings for GTK+ and related libraries
+Requires: pygobject-2.0
+Version: @VERSION@
+Cflags: -I${pygtkincludedir} @THREADING_CFLAGS@
Index: pkg/pygtk/branches/upstream/current/codegen/codegen.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/codegen.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/codegen.py	(revision 4)
@@ -0,0 +1,1707 @@
+import getopt
+import keyword
+import os
+import string
+import sys
+
+import argtypes
+import definitions
+import defsparser
+import override
+import reversewrapper
+import warnings
+
+class Coverage(object):
+    def __init__(self, name):
+        self.name = name
+        self.wrapped = 0
+        self.not_wrapped = 0
+
+    def declare_wrapped(self):
+        self.wrapped += 1
+
+    def declare_not_wrapped(self):
+        self.not_wrapped += 1
+
+    def printstats(self):
+        total = self.wrapped + self.not_wrapped
+        fd = sys.stderr
+        if total:
+            fd.write("***INFO*** The coverage of %s is %.2f%% (%i/%i)\n" %
+                     (self.name,
+                      float(self.wrapped*100)/total,
+                      self.wrapped,
+                      total))
+        else:
+            fd.write("***INFO*** There are no declared %s.\n" % self.name)
+
+functions_coverage = Coverage("global functions")
+methods_coverage = Coverage("methods")
+vproxies_coverage = Coverage("virtual proxies")
+vaccessors_coverage = Coverage("virtual accessors")
+iproxies_coverage = Coverage("interface proxies")
+
+def exc_info():
+    warnings.warn("deprecated", DeprecationWarning, stacklevel=2)
+    #traceback.print_exc()
+    etype, value, tb = sys.exc_info()
+    ret = ""
+    try:
+        sval = str(value)
+        if etype == argtypes.ArgTypeError:
+            ret = "No ArgType for %s" % (sval,)
+        else:
+            ret = sval
+    finally:
+        del etype, value, tb
+    return ret
+
+def fixname(name):
+    if keyword.iskeyword(name):
+        return name + '_'
+    return name
+
+class FileOutput:
+    '''Simple wrapper for file object, that makes writing #line
+    statements easier.''' # "
+    def __init__(self, fp, filename=None):
+        self.fp = fp
+        self.lineno = 1
+        if filename:
+            self.filename = filename
+        else:
+            self.filename = self.fp.name
+    # handle writing to the file, and keep track of the line number ...
+    def write(self, str):
+        self.fp.write(str)
+        self.lineno = self.lineno + string.count(str, '\n')
+    def writelines(self, sequence):
+        for line in sequence:
+            self.write(line)
+    def close(self):
+        self.fp.close()
+    def flush(self):
+        self.fp.flush()
+
+    def setline(self, linenum, filename):
+        '''writes out a #line statement, for use by the C
+        preprocessor.''' # "
+        self.write('#line %d "%s"\n' % (linenum, filename))
+    def resetline(self):
+        '''resets line numbering to the original file'''
+        self.setline(self.lineno + 1, self.filename)
+
+class Wrapper:
+    type_tmpl = (
+        'PyTypeObject G_GNUC_INTERNAL Py%(typename)s_Type = {\n'
+        '    PyObject_HEAD_INIT(NULL)\n'
+        '    0,                                 /* ob_size */\n'
+        '    "%(classname)s",                   /* tp_name */\n'
+        '    sizeof(%(tp_basicsize)s),          /* tp_basicsize */\n'
+        '    0,                                 /* tp_itemsize */\n'
+        '    /* methods */\n'
+        '    (destructor)%(tp_dealloc)s,        /* tp_dealloc */\n'
+        '    (printfunc)0,                      /* tp_print */\n'
+        '    (getattrfunc)%(tp_getattr)s,       /* tp_getattr */\n'
+        '    (setattrfunc)%(tp_setattr)s,       /* tp_setattr */\n'
+        '    (cmpfunc)%(tp_compare)s,           /* tp_compare */\n'
+        '    (reprfunc)%(tp_repr)s,             /* tp_repr */\n'
+        '    (PyNumberMethods*)%(tp_as_number)s,     /* tp_as_number */\n'
+        '    (PySequenceMethods*)%(tp_as_sequence)s, /* tp_as_sequence */\n'
+        '    (PyMappingMethods*)%(tp_as_mapping)s,   /* tp_as_mapping */\n'
+        '    (hashfunc)%(tp_hash)s,             /* tp_hash */\n'
+        '    (ternaryfunc)%(tp_call)s,          /* tp_call */\n'
+        '    (reprfunc)%(tp_str)s,              /* tp_str */\n'
+        '    (getattrofunc)%(tp_getattro)s,     /* tp_getattro */\n'
+        '    (setattrofunc)%(tp_setattro)s,     /* tp_setattro */\n'
+        '    (PyBufferProcs*)%(tp_as_buffer)s,  /* tp_as_buffer */\n'
+        '    %(tp_flags)s,                      /* tp_flags */\n'
+        '    %(tp_doc)s,                        /* Documentation string */\n'
+        '    (traverseproc)%(tp_traverse)s,     /* tp_traverse */\n'
+        '    (inquiry)%(tp_clear)s,             /* tp_clear */\n'
+        '    (richcmpfunc)%(tp_richcompare)s,   /* tp_richcompare */\n'
+        '    %(tp_weaklistoffset)s,             /* tp_weaklistoffset */\n'
+        '    (getiterfunc)%(tp_iter)s,          /* tp_iter */\n'
+        '    (iternextfunc)%(tp_iternext)s,     /* tp_iternext */\n'
+        '    (struct PyMethodDef*)%(tp_methods)s, /* tp_methods */\n'
+        '    (struct PyMemberDef*)0,              /* tp_members */\n'
+        '    (struct PyGetSetDef*)%(tp_getset)s,  /* tp_getset */\n'
+        '    NULL,                              /* tp_base */\n'
+        '    NULL,                              /* tp_dict */\n'
+        '    (descrgetfunc)%(tp_descr_get)s,    /* tp_descr_get */\n'
+        '    (descrsetfunc)%(tp_descr_set)s,    /* tp_descr_set */\n'
+        '    %(tp_dictoffset)s,                 /* tp_dictoffset */\n'
+        '    (initproc)%(tp_init)s,             /* tp_init */\n'
+        '    (allocfunc)%(tp_alloc)s,           /* tp_alloc */\n'
+        '    (newfunc)%(tp_new)s,               /* tp_new */\n'
+        '    (freefunc)%(tp_free)s,             /* tp_free */\n'
+        '    (inquiry)%(tp_is_gc)s              /* tp_is_gc */\n'
+        '};\n\n'
+        )
+
+    slots_list = [
+        'tp_getattr', 'tp_setattr', 'tp_getattro', 'tp_setattro',
+        'tp_compare', 'tp_repr',
+        'tp_as_number', 'tp_as_sequence', 'tp_as_mapping', 'tp_hash',
+        'tp_call', 'tp_str', 'tp_as_buffer', 'tp_richcompare', 'tp_iter',
+        'tp_iternext', 'tp_descr_get', 'tp_descr_set', 'tp_init',
+        'tp_alloc', 'tp_new', 'tp_free', 'tp_is_gc',
+        'tp_traverse', 'tp_clear', 'tp_dealloc', 'tp_flags', 'tp_doc'
+        ]
+
+    getter_tmpl = (
+        'static PyObject *\n'
+        '%(funcname)s(PyObject *self, void *closure)\n'
+        '{\n'
+        '%(varlist)s'
+        '    ret = %(field)s;\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+
+    parse_tmpl = (
+        '    if (!PyArg_ParseTupleAndKeywords(args, kwargs,'
+        '"%(typecodes)s:%(name)s"%(parselist)s))\n'
+        '        return %(errorreturn)s;\n'
+        )
+
+    deprecated_tmpl = (
+        '    if (PyErr_Warn(PyExc_DeprecationWarning, '
+        '"%(deprecationmsg)s") < 0)\n'
+        '        return %(errorreturn)s;\n'
+        )
+
+    methdef_tmpl = (
+        '    { "%(name)s", (PyCFunction)%(cname)s, %(flags)s,\n'
+        '      %(docstring)s },\n'
+        )
+
+    noconstructor = (
+        'static int\n'
+        'pygobject_no_constructor(PyObject *self, PyObject *args, '
+        'PyObject *kwargs)\n'
+        '{\n'
+        '    gchar buf[512];\n'
+        '\n'
+        '    g_snprintf(buf, sizeof(buf), "%s is an abstract widget", '
+        'self->ob_type->tp_name);\n'
+        '    PyErr_SetString(PyExc_NotImplementedError, buf);\n'
+        '    return -1;\n'
+        '}\n\n'
+        )
+
+    function_tmpl = (
+        'static PyObject *\n'
+        '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    %(begin_allow_threads)s\n'
+        '    %(setreturn)s%(cname)s(%(arglist)s);\n'
+        '    %(end_allow_threads)s\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+
+    virtual_accessor_tmpl = (
+        'static PyObject *\n'
+        '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n'
+        '{\n'
+        '    gpointer klass;\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    klass = g_type_class_ref(pyg_type_from_object(cls));\n'
+        '    if (%(class_cast_macro)s(klass)->%(virtual)s)\n'
+        '        %(setreturn)s%(class_cast_macro)s(klass)->'
+        '%(virtual)s(%(arglist)s);\n'
+        '    else {\n'
+        '        PyErr_SetString(PyExc_NotImplementedError, '
+        '"virtual method %(name)s not implemented");\n'
+        '        g_type_class_unref(klass);\n'
+        '        return NULL;\n'
+        '    }\n'
+        '    g_type_class_unref(klass);\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+
+    # template for method calls
+    constructor_tmpl = None
+    method_tmpl = None
+
+    def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)):
+        self.parser = parser
+        self.objinfo = objinfo
+        self.overrides = overrides
+        self.fp = fp
+
+    def get_lower_name(self):
+        return string.lower(string.replace(self.objinfo.typecode,
+                                           '_TYPE_', '_', 1))
+
+    def get_field_accessor(self, fieldname):
+        raise NotImplementedError
+
+    def get_initial_class_substdict(self): return {}
+
+    def get_initial_constructor_substdict(self, constructor):
+        return { 'name': '%s.__init__' % self.objinfo.c_name,
+                 'errorreturn': '-1' }
+    def get_initial_method_substdict(self, method):
+        substdict = { 'name': '%s.%s' % (self.objinfo.c_name, method.name) }
+        if method.unblock_threads:
+            substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
+            substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
+        else:
+            substdict['begin_allow_threads'] = ''
+            substdict['end_allow_threads'] = ''
+        return substdict
+
+    def write_class(self):
+        if self.overrides.is_type_ignored(self.objinfo.c_name):
+            return
+        self.fp.write('\n/* ----------- %s ----------- */\n\n' %
+                      self.objinfo.c_name)
+        substdict = self.get_initial_class_substdict()
+        if not substdict.has_key('tp_flags'):
+            substdict['tp_flags'] = 'Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE'
+        substdict['typename'] = self.objinfo.c_name
+        if self.overrides.modulename:
+            substdict['classname'] = '%s.%s' % (self.overrides.modulename,
+                                           self.objinfo.name)
+        else:
+            substdict['classname'] = self.objinfo.name
+        substdict['tp_doc'] = self.objinfo.docstring
+
+        # Maybe this could be done in a nicer way, but I'll leave it as it is
+        # for now: -- Johan
+        if not self.overrides.slot_is_overriden('%s.tp_init' %
+                                                self.objinfo.c_name):
+            substdict['tp_init'] = self.write_constructor()
+        substdict['tp_methods'] = self.write_methods()
+        substdict['tp_getset'] = self.write_getsets()
+
+        # handle slots ...
+        for slot in self.slots_list:
+
+            slotname = '%s.%s' % (self.objinfo.c_name, slot)
+            slotfunc = '_wrap_%s_%s' % (self.get_lower_name(), slot)
+            if slot[:6] == 'tp_as_':
+                slotfunc = '&' + slotfunc
+            if self.overrides.slot_is_overriden(slotname):
+                data = self.overrides.slot_override(slotname)
+                self.write_function(slotname, data)
+                substdict[slot] = slotfunc
+            else:
+                if not substdict.has_key(slot):
+                    substdict[slot] = '0'
+
+        self.fp.write(self.type_tmpl % substdict)
+
+        self.write_virtuals()
+
+    def write_function_wrapper(self, function_obj, template,
+                               handle_return=0, is_method=0, kwargs_needed=0,
+                               substdict=None):
+        '''This function is the guts of all functions that generate
+        wrappers for functions, methods and constructors.'''
+        if not substdict: substdict = {}
+
+        info = argtypes.WrapperInfo()
+
+        substdict.setdefault('errorreturn', 'NULL')
+
+        # for methods, we want the leading comma
+        if is_method:
+            info.arglist.append('')
+
+        if function_obj.varargs:
+            raise argtypes.ArgTypeNotFoundError("varargs functions not supported")
+
+        for param in function_obj.params:
+            if param.pdflt and '|' not in info.parsestr:
+                info.add_parselist('|', [], [])
+            handler = argtypes.matcher.get(param.ptype)
+            handler.write_param(param.ptype, param.pname, param.pdflt,
+                                param.pnull, info)
+
+        substdict['setreturn'] = ''
+        if handle_return:
+            if function_obj.ret not in ('none', None):
+                substdict['setreturn'] = 'ret = '
+            handler = argtypes.matcher.get(function_obj.ret)
+            handler.write_return(function_obj.ret,
+                                 function_obj.caller_owns_return, info)
+
+        if function_obj.deprecated != None:
+            deprecated = self.deprecated_tmpl % {
+                'deprecationmsg': function_obj.deprecated,
+                'errorreturn': substdict['errorreturn'] }
+        else:
+            deprecated = ''
+
+        # if name isn't set, set it to function_obj.name
+        substdict.setdefault('name', function_obj.name)
+
+        if function_obj.unblock_threads:
+            substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
+            substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
+        else:
+            substdict['begin_allow_threads'] = ''
+            substdict['end_allow_threads'] = ''
+
+        if self.objinfo:
+            substdict['typename'] = self.objinfo.c_name
+        substdict.setdefault('cname',  function_obj.c_name)
+        substdict['varlist'] = info.get_varlist()
+        substdict['typecodes'] = info.parsestr
+        substdict['parselist'] = info.get_parselist()
+        substdict['arglist'] = info.get_arglist()
+        substdict['codebefore'] = deprecated + (
+            string.replace(info.get_codebefore(),
+            'return NULL', 'return ' + substdict['errorreturn'])
+            )
+        substdict['codeafter'] = (
+            string.replace(info.get_codeafter(),
+                           'return NULL',
+                           'return ' + substdict['errorreturn']))
+
+        if info.parsestr or kwargs_needed:
+            substdict['parseargs'] = self.parse_tmpl % substdict
+            substdict['extraparams'] = ', PyObject *args, PyObject *kwargs'
+            flags = 'METH_VARARGS|METH_KEYWORDS'
+
+            # prepend the keyword list to the variable list
+            substdict['varlist'] = info.get_kwlist() + substdict['varlist']
+        else:
+            substdict['parseargs'] = ''
+            substdict['extraparams'] = ''
+            flags = 'METH_NOARGS'
+
+        return template % substdict, flags
+
+    def write_constructor(self):
+        initfunc = '0'
+        constructor = self.parser.find_constructor(self.objinfo,self.overrides)
+        if not constructor:
+            return self.write_default_constructor()
+
+        funcname = constructor.c_name
+        try:
+            if self.overrides.is_overriden(funcname):
+                data = self.overrides.override(funcname)
+                self.write_function(funcname, data)
+                self.objinfo.has_new_constructor_api = (
+                    self.objinfo.typecode in
+                    self.overrides.newstyle_constructors)
+            else:
+                # ok, a hack to determine if we should use
+                # new-style constructores :P
+                property_based = getattr(self,
+                                         'write_property_based_constructor',
+                                         None)
+                if property_based:
+                    if (len(constructor.params) == 0 or
+                        isinstance(constructor.params[0],
+                                   definitions.Property)):
+                        # write_property_based_constructor is only
+                        # implemented in GObjectWrapper
+                        return self.write_property_based_constructor(
+                            constructor)
+                    else:
+                        sys.stderr.write(
+                            "Warning: generating old-style constructor for:" +
+                            constructor.c_name + '\n')
+
+                # write constructor from template ...
+                code = self.write_function_wrapper(constructor,
+                    self.constructor_tmpl,
+                    handle_return=0, is_method=0, kwargs_needed=1,
+                    substdict=self.get_initial_constructor_substdict(
+                    constructor))[0]
+                self.fp.write(code)
+            initfunc = '_wrap_' + funcname
+        except argtypes.ArgTypeError, ex:
+            sys.stderr.write('Could not write constructor for %s: %s\n'
+                             % (self.objinfo.c_name, str(ex)))
+
+            initfunc = self.write_noconstructor()
+        return initfunc
+
+    def write_noconstructor(self):
+        # this is a hack ...
+        if not hasattr(self.overrides, 'no_constructor_written'):
+            self.fp.write(self.noconstructor)
+            self.overrides.no_constructor_written = 1
+        initfunc = 'pygobject_no_constructor'
+        return initfunc
+
+    def write_default_constructor(self):
+        return self.write_noconstructor()
+
+    def get_methflags(self, funcname):
+        if self.overrides.wants_kwargs(funcname):
+            flags = 'METH_VARARGS|METH_KEYWORDS'
+        elif self.overrides.wants_noargs(funcname):
+            flags = 'METH_NOARGS'
+        elif self.overrides.wants_onearg(funcname):
+            flags = 'METH_O'
+        else:
+            flags = 'METH_VARARGS'
+        if self.overrides.is_staticmethod(funcname):
+            flags += '|METH_STATIC'
+        elif self.overrides.is_classmethod(funcname):
+            flags += '|METH_CLASS'
+        return flags
+
+    def write_function(self, funcname, data):
+        lineno, filename = self.overrides.getstartline(funcname)
+        self.fp.setline(lineno, filename)
+        self.fp.write(data)
+        self.fp.resetline()
+        self.fp.write('\n\n')
+
+    def _get_class_virtual_substdict(self, meth, cname, parent):
+        substdict = self.get_initial_method_substdict(meth)
+        substdict['virtual'] = substdict['name'].split('.')[1]
+        substdict['cname'] = cname
+        substdict['class_cast_macro'] = parent.typecode.replace(
+            '_TYPE_', '_', 1) + "_CLASS"
+        substdict['typecode'] = self.objinfo.typecode
+        substdict['cast'] = string.replace(parent.typecode, '_TYPE_', '_', 1)
+        return substdict
+
+    def write_methods(self):
+        methods = []
+        klass = self.objinfo.c_name
+        # First, get methods from the defs files
+        for meth in self.parser.find_methods(self.objinfo):
+            method_name = meth.c_name
+            if self.overrides.is_ignored(method_name):
+                continue
+            try:
+                if self.overrides.is_overriden(method_name):
+                    if not self.overrides.is_already_included(method_name):
+                        data = self.overrides.override(method_name)
+                        self.write_function(method_name, data)
+
+                    methflags = self.get_methflags(method_name)
+                else:
+                    # write constructor from template ...
+                    code, methflags = self.write_function_wrapper(meth,
+                        self.method_tmpl, handle_return=1, is_method=1,
+                        substdict=self.get_initial_method_substdict(meth))
+                    self.fp.write(code)
+                methods.append(self.methdef_tmpl %
+                               { 'name':  fixname(meth.name),
+                                 'cname': '_wrap_' + method_name,
+                                 'flags': methflags,
+                                 'docstring': meth.docstring })
+                methods_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                methods_coverage.declare_not_wrapped()
+                sys.stderr.write('Could not write method %s.%s: %s\n'
+                                % (klass, meth.name, str(ex)))
+
+        # Now try to see if there are any defined in the override
+        for method_name in self.overrides.get_defines_for(klass):
+            c_name = override.class2cname(klass, method_name)
+            if self.overrides.is_already_included(method_name):
+                continue
+
+            try:
+                data = self.overrides.define(klass, method_name)
+                self.write_function(method_name, data)
+                methflags = self.get_methflags(method_name)
+
+                methods.append(self.methdef_tmpl %
+                               { 'name':  method_name,
+                                 'cname': '_wrap_' + c_name,
+                                 'flags': methflags,
+                                 'docstring': 'NULL' })
+                methods_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                methods_coverage.declare_not_wrapped()
+                sys.stderr.write('Could not write method %s.%s: %s\n'
+                                % (klass, method_name, str(ex)))
+
+        # Add GObject virtual method accessors, for chaining to parent
+        # virtuals from subclasses
+        methods += self.write_virtual_accessors()
+
+        if methods:
+            methoddefs = '_Py%s_methods' % self.objinfo.c_name
+            # write the PyMethodDef structure
+            methods.append('    { NULL, NULL, 0, NULL }\n')
+            self.fp.write('static const PyMethodDef %s[] = {\n' % methoddefs)
+            self.fp.write(string.join(methods, ''))
+            self.fp.write('};\n\n')
+        else:
+            methoddefs = 'NULL'
+        return methoddefs
+
+    def write_virtual_accessors(self):
+        klass = self.objinfo.c_name
+        methods = []
+        for meth in self.parser.find_virtuals(self.objinfo):
+            method_name = self.objinfo.c_name + "__do_" + meth.name
+            if self.overrides.is_ignored(method_name):
+                continue
+            try:
+                if self.overrides.is_overriden(method_name):
+                    if not self.overrides.is_already_included(method_name):
+                        data = self.overrides.override(method_name)
+                        self.write_function(method_name, data)
+                    methflags = self.get_methflags(method_name)
+                else:
+                    # temporarily add a 'self' parameter as first argument
+                    meth.params.insert(0, definitions.Parameter(
+                        ptype=(self.objinfo.c_name + '*'),
+                        pname='self', pdflt=None, pnull=None))
+                    try:
+                        # write method from template ...
+                        code, methflags = self.write_function_wrapper(
+                            meth, self.virtual_accessor_tmpl,
+                            handle_return=True, is_method=False,
+                            substdict=self._get_class_virtual_substdict(
+                            meth, method_name, self.objinfo))
+                        self.fp.write(code)
+                    finally:
+                        del meth.params[0]
+                methods.append(self.methdef_tmpl %
+                               { 'name':  "do_" + fixname(meth.name),
+                                 'cname': '_wrap_' + method_name,
+                                 'flags': methflags + '|METH_CLASS',
+                                 'docstring': 'NULL'})
+                vaccessors_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                vaccessors_coverage.declare_not_wrapped()
+                sys.stderr.write(
+                    'Could not write virtual accessor method %s.%s: %s\n'
+                    % (klass, meth.name, str(ex)))
+        return methods
+
+    def write_virtuals(self):
+        '''
+        Write _wrap_FooBar__proxy_do_zbr() reverse wrapers for
+        GObject virtuals
+        '''
+        klass = self.objinfo.c_name
+        virtuals = []
+        for meth in self.parser.find_virtuals(self.objinfo):
+            method_name = self.objinfo.c_name + "__proxy_do_" + meth.name
+            if self.overrides.is_ignored(method_name):
+                continue
+            try:
+                if self.overrides.is_overriden(method_name):
+                    if not self.overrides.is_already_included(method_name):
+                        data = self.overrides.override(method_name)
+                        self.write_function(method_name, data)
+                else:
+                    # write virtual proxy ...
+                    ret, props = argtypes.matcher.get_reverse_ret(meth.ret)
+                    wrapper = reversewrapper.ReverseWrapper(
+                        '_wrap_' + method_name, is_static=True)
+                    wrapper.set_return_type(ret(wrapper, **props))
+                    wrapper.add_parameter(reversewrapper.PyGObjectMethodParam(
+                        wrapper, "self", method_name="do_" + meth.name,
+                        c_type=(klass + ' *')))
+                    for param in meth.params:
+                        handler, props = argtypes.matcher.get_reverse(
+                            param.ptype)
+                        props["direction"] = param.pdir
+                        wrapper.add_parameter(handler(wrapper,
+                                                      param.pname, **props))
+                    buf = reversewrapper.MemoryCodeSink()
+                    wrapper.generate(buf)
+                    self.fp.write(buf.flush())
+                virtuals.append((fixname(meth.name), '_wrap_' + method_name))
+                vproxies_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                vproxies_coverage.declare_not_wrapped()
+                virtuals.append((fixname(meth.name), None))
+                sys.stderr.write('Could not write virtual proxy %s.%s: %s\n'
+                                % (klass, meth.name, str(ex)))
+        if virtuals:
+            # Write a 'pygtk class init' function for this object,
+            # except when the object type is explicitly ignored (like
+            # GtkPlug and GtkSocket on win32).
+            if self.overrides.is_ignored(self.objinfo.typecode):
+                return
+            class_cast_macro = self.objinfo.typecode.replace(
+                '_TYPE_', '_', 1) + "_CLASS"
+            cast_macro = self.objinfo.typecode.replace('_TYPE_', '_', 1)
+            funcname = "__%s_class_init" % klass
+            self.objinfo.class_init_func = funcname
+            have_implemented_virtuals = not not [True
+                                                 for name, cname in virtuals
+                                                     if cname is not None]
+            self.fp.write(
+            ('\nstatic int\n'
+             '%(funcname)s(gpointer gclass, PyTypeObject *pyclass)\n'
+             '{\n') % vars())
+
+            if have_implemented_virtuals:
+                self.fp.write('    PyObject *o;\n')
+                self.fp.write(
+                    '    %(klass)sClass *klass = '
+                    '%(class_cast_macro)s(gclass);\n'
+                    '    PyObject *gsignals = '
+                    'PyDict_GetItemString(pyclass->tp_dict, "__gsignals__");\n'
+                    % vars())
+
+            for name, cname in virtuals:
+                do_name = 'do_' + name
+                if cname is None:
+                    self.fp.write('\n    /* overriding %(do_name)s '
+                                  'is currently not supported */\n' % vars())
+                else:
+                    self.fp.write('''
+    o = PyObject_GetAttrString((PyObject *) pyclass, "%(do_name)s");
+    if (o == NULL)
+        PyErr_Clear();
+    else {
+        if (!PyObject_TypeCheck(o, &PyCFunction_Type)
+            && !(gsignals && PyDict_GetItemString(gsignals, "%(name)s")))
+            klass->%(name)s = %(cname)s;
+        Py_DECREF(o);
+    }
+''' % vars())
+            self.fp.write('    return 0;\n}\n')
+
+    def write_getsets(self):
+        lower_name = self.get_lower_name()
+        getsets_name = lower_name + '_getsets'
+        getterprefix = '_wrap_' + lower_name + '__get_'
+        setterprefix = '_wrap_' + lower_name + '__set_'
+
+        # no overrides for the whole function.  If no fields,
+        # don't write a func
+        if not self.objinfo.fields:
+            return '0'
+        getsets = []
+        for ftype, cfname in self.objinfo.fields:
+            fname = cfname.replace('.', '_')
+            gettername = '0'
+            settername = '0'
+            attrname = self.objinfo.c_name + '.' + fname
+            if self.overrides.attr_is_overriden(attrname):
+                code = self.overrides.attr_override(attrname)
+                self.write_function(attrname, code)
+                if string.find(code, getterprefix + fname) >= 0:
+                    gettername = getterprefix + fname
+                if string.find(code, setterprefix + fname) >= 0:
+                    settername = setterprefix + fname
+            if gettername == '0':
+                try:
+                    funcname = getterprefix + fname
+                    info = argtypes.WrapperInfo()
+                    handler = argtypes.matcher.get(ftype)
+                    # for attributes, we don't own the "return value"
+                    handler.write_return(ftype, 0, info)
+                    self.fp.write(self.getter_tmpl %
+                                  { 'funcname': funcname,
+                                    'varlist': info.varlist,
+                                    'field': self.get_field_accessor(cfname),
+                                    'codeafter': info.get_codeafter() })
+                    gettername = funcname
+                except argtypes.ArgTypeError, ex:
+                    sys.stderr.write(
+                        "Could not write getter for %s.%s: %s\n"
+                        % (self.objinfo.c_name, fname, str(ex)))
+            if gettername != '0' or settername != '0':
+                getsets.append('    { "%s", (getter)%s, (setter)%s },\n' %
+                               (fixname(fname), gettername, settername))
+
+        if not getsets:
+            return '0'
+        self.fp.write('static const PyGetSetDef %s[] = {\n' % getsets_name)
+        for getset in getsets:
+            self.fp.write(getset)
+        self.fp.write('    { NULL, (getter)0, (setter)0 },\n')
+        self.fp.write('};\n\n')
+
+        return getsets_name
+
+    def _write_get_symbol_names(self, writer, functions):
+        self.fp.write("""static PyObject *
+_wrap__get_symbol_names(PyObject *self)
+{
+    PyObject *pylist = PyList_New(0);
+
+""")
+        for obj, bases in writer.get_classes():
+            self.fp.write('    PyList_Append(pylist, '
+                          'PyString_FromString("%s"));\n' % (obj.name))
+
+        for name, cname, flags, docstring in functions:
+            self.fp.write('    PyList_Append(pylist, '
+                          'PyString_FromString("%s"));\n' % (name))
+
+        for enum in writer.get_enums():
+            self.fp.write('    PyList_Append(pylist, '
+                          'PyString_FromString("%s"));\n' % (enum.name))
+            for nick, value in enum.values:
+                name = value[len(self.overrides.modulename)+1:]
+                self.fp.write('    PyList_Append(pylist, '
+                              'PyString_FromString("%s"));\n' % (name))
+
+        self.fp.write("    return pylist;\n}\n\n");
+
+    def _write_get_symbol(self, writer, functions):
+        self.fp.write("""static PyObject *
+_wrap__get_symbol(PyObject *self, PyObject *args)
+{
+    PyObject *d;
+    char *name;
+    static PyObject *modulename = NULL;
+    static PyObject *module = NULL;
+    static char *strip_prefix = "%s";
+
+    if (!PyArg_ParseTuple(args, "Os", &d, &name))
+        return NULL;
+
+    if (!modulename)
+       modulename = PyString_FromString("%s");
+
+    if (!module)
+       module = PyDict_GetItemString(d, "__module__");
+
+""" % (self.overrides.modulename.upper() + '_',
+       self.overrides.modulename))
+
+        first = True
+        # Classes / GObjects
+        for obj, bases in writer.get_classes():
+            if first:
+                self.fp.write('    if (!strcmp(name, "%s")) {\n' % obj.name)
+                first = False
+            else:
+                self.fp.write('    } else if (!strcmp(name, "%s")) {\n' % obj.name)
+            self.fp.write(
+                '       return (PyObject*)pygobject_lookup_class(%s);\n' %
+                obj.typecode)
+        self.fp.write('    }\n')
+
+        # Functions
+        for name, cname, flags, docstring in functions:
+            self.fp.write('    else if (!strcmp(name, "%s")) {\n' % name)
+            self.fp.write('        static PyMethodDef ml = { '
+                          '"%s", (PyCFunction)%s, %s, "%s"};\n' % (
+                name, cname, flags, docstring))
+            self.fp.write('        return PyCFunction_NewEx(&ml, NULL, modulename);\n')
+            self.fp.write('    }\n')
+
+        # Enums
+        def write_enum(enum, returnobj=False):
+            if returnobj:
+                ret = 'return '
+            else:
+                ret = ''
+            if enum.deftype == 'enum':
+                self.fp.write(
+                    '        %spyg_enum_add(module, "%s", strip_prefix, %s);\n'
+                    % (ret, enum.name, enum.typecode))
+            else:
+                self.fp.write(
+                    '    %spyg_flags_add(module, "%s", strip_prefix, %s);\n'
+                    % (ret, enum.name, enum.typecode))
+
+        strip_len = len(self.overrides.modulename)+1 # GTK_
+        for enum in writer.get_enums():
+            # XXX: Implement without typecodes
+            self.fp.write('    else if (!strcmp(name, "%s")) {\n' % enum.name)
+            write_enum(enum, returnobj=True)
+            self.fp.write('    }\n')
+
+            for nick, value in enum.values:
+                value = value[strip_len:]
+                self.fp.write('    else if (!strcmp(name, "%s")) {\n' % value)
+                write_enum(enum)
+                self.fp.write('        return PyObject_GetAttrString(module, "%s");\n' %
+                              value)
+                self.fp.write('    }\n')
+
+        self.fp.write('    return Py_None;\n}\n\n');
+
+    def _write_function_bodies(self):
+        functions = []
+        # First, get methods from the defs files
+        for func in self.parser.find_functions():
+            funcname = func.c_name
+            if self.overrides.is_ignored(funcname):
+                continue
+            try:
+                if self.overrides.is_overriden(funcname):
+                    data = self.overrides.override(funcname)
+                    self.write_function(funcname, data)
+
+                    methflags = self.get_methflags(funcname)
+                else:
+                    # write constructor from template ...
+                    code, methflags = self.write_function_wrapper(func,
+                        self.function_tmpl, handle_return=1, is_method=0)
+                    self.fp.write(code)
+                functions.append((func.name, '_wrap_' + funcname,
+                                  methflags, func.docstring))
+                functions_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                functions_coverage.declare_not_wrapped()
+                sys.stderr.write('Could not write function %s: %s\n'
+                                 % (func.name, str(ex)))
+
+        # Now try to see if there are any defined in the override
+        for funcname in self.overrides.get_functions():
+            try:
+                data = self.overrides.function(funcname)
+                self.write_function(funcname, data)
+                methflags = self.get_methflags(funcname)
+                functions.append((funcname, '_wrap_' + funcname,
+                                  methflags, 'NULL'))
+                functions_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                functions_coverage.declare_not_wrapped()
+                sys.stderr.write('Could not write function %s: %s\n'
+                                 % (funcname, str(ex)))
+        return functions
+
+    def write_functions(self, writer, prefix):
+        self.fp.write('\n/* ----------- functions ----------- */\n\n')
+        functions = []
+        func_infos = self._write_function_bodies()
+
+        # If we have a dynamic namespace, write symbol and attribute getter
+        if self.overrides.dynamicnamespace:
+            self._write_get_symbol_names(writer, func_infos)
+            self._write_get_symbol(writer, func_infos)
+            for obj, bases in writer.get_classes():
+                self.fp.write("""static PyTypeObject *
+%s_register_type(const gchar *name, PyObject *unused)
+{
+    PyObject *m = PyImport_ImportModule("gtk");
+    PyObject *d = PyModule_GetDict(m);
+""" % obj.c_name)
+                writer.write_class(obj, bases, indent=1)
+                self.fp.write(
+                    '    return (%s)PyDict_GetItemString(d, "%s");\n' % (
+                    'PyTypeObject*', obj.name))
+                self.fp.write("}\n")
+
+            functions.append('    { "_get_symbol_names", '
+                             '(PyCFunction)_wrap__get_symbol_names, '
+                             'METH_NOARGS, NULL },\n')
+            functions.append('    { "_get_symbol", '
+                             '(PyCFunction)_wrap__get_symbol, '
+                             'METH_VARARGS, NULL },\n')
+        else:
+            for name, cname, flags, docstring in func_infos:
+                functions.append(self.methdef_tmpl % dict(name=name,
+                                                          cname=cname,
+                                                          flags=flags,
+                                                          docstring=docstring))
+
+        # write the PyMethodDef structure
+        functions.append('    { NULL, NULL, 0, NULL }\n')
+
+        self.fp.write('const PyMethodDef ' + prefix + '_functions[] = {\n')
+        self.fp.write(string.join(functions, ''))
+        self.fp.write('};\n\n')
+
+class GObjectWrapper(Wrapper):
+    constructor_tmpl = (
+        'static int\n'
+        '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    self->obj = (GObject *)%(cname)s(%(arglist)s);\n'
+        '%(codeafter)s\n'
+        '    if (!self->obj) {\n'
+        '        PyErr_SetString(PyExc_RuntimeError, '
+        '"could not create %(typename)s object");\n'
+        '        return -1;\n'
+        '    }\n'
+        '%(aftercreate)s'
+        '    pygobject_register_wrapper((PyObject *)self);\n'
+        '    return 0;\n'
+        '}\n\n'
+        )
+
+    method_tmpl = (
+        'static PyObject *\n'
+        '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    %(begin_allow_threads)s\n'
+        '    %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n'
+        '    %(end_allow_threads)s\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+    def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)):
+        Wrapper.__init__(self, parser, objinfo, overrides, fp)
+        if self.objinfo:
+            self.castmacro = string.replace(self.objinfo.typecode,
+                                            '_TYPE_', '_', 1)
+
+    def get_initial_class_substdict(self):
+        return { 'tp_basicsize'      : 'PyGObject',
+                 'tp_weaklistoffset' : 'offsetof(PyGObject, weakreflist)',
+                 'tp_dictoffset'     : 'offsetof(PyGObject, inst_dict)' }
+
+    def get_field_accessor(self, fieldname):
+        castmacro = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1)
+        return '%s(pygobject_get(self))->%s' % (castmacro, fieldname)
+
+    def get_initial_constructor_substdict(self, constructor):
+        substdict = Wrapper.get_initial_constructor_substdict(self,
+                                                              constructor)
+        if not constructor.caller_owns_return:
+            substdict['aftercreate'] = "    g_object_ref(self->obj);\n"
+        else:
+            substdict['aftercreate'] = ''
+        return substdict
+
+    def get_initial_method_substdict(self, method):
+        substdict = Wrapper.get_initial_method_substdict(self, method)
+        substdict['cast'] = string.replace(self.objinfo.typecode,
+                                           '_TYPE_', '_', 1)
+        return substdict
+
+    def write_default_constructor(self):
+        try:
+            parent = self.parser.find_object(self.objinfo.parent)
+        except ValueError:
+            parent = None
+        if parent is not None:
+            ## just like the constructor is inheritted, we should
+            # inherit the new API compatibility flag
+            self.objinfo.has_new_constructor_api = (
+                parent.has_new_constructor_api)
+        elif self.objinfo.parent == 'GObject':
+            self.objinfo.has_new_constructor_api = True
+        return '0'
+
+    def write_property_based_constructor(self, constructor):
+        self.objinfo.has_new_constructor_api = True
+        out = self.fp
+        print >> out, "static int"
+        print >> out, '_wrap_%s(PyGObject *self, PyObject *args,' \
+              ' PyObject *kwargs)\n{' % constructor.c_name
+        if constructor.params:
+            s = "    GType obj_type = pyg_type_from_object((PyObject *) self);"
+            print >> out, s
+
+        def py_str_list_to_c(arg):
+            if arg:
+                return "{" + ", ".join(
+                    map(lambda s: '"' + s + '"', arg)) + ", NULL }"
+            else:
+                return "{ NULL }"
+
+        classname = '%s.%s' % (self.overrides.modulename,
+                               self.objinfo.name)
+
+        if constructor.params:
+            mandatory_arguments = [param for param in constructor.params
+                                             if not param.optional]
+            optional_arguments = [param for param in constructor.params
+                                            if param.optional]
+            arg_names = py_str_list_to_c(
+            [param.argname
+             for param in mandatory_arguments + optional_arguments])
+
+            prop_names = py_str_list_to_c(
+            [param.pname
+             for param in mandatory_arguments + optional_arguments])
+
+            print >> out, "    GParameter params[%i];" % \
+                  len(constructor.params)
+            print >> out, "    PyObject *parsed_args[%i] = {NULL, };" % \
+                  len(constructor.params)
+            print >> out, "    char *arg_names[] = %s;" % arg_names
+            print >> out, "    char *prop_names[] = %s;" % prop_names
+            print >> out, "    guint nparams, i;"
+            print >> out
+            if constructor.deprecated is not None:
+                out.write(
+                    '    if (PyErr_Warn(PyExc_DeprecationWarning, '
+                    '"%s") < 0)\n' %
+                    constructor.deprecated)
+                print >> out, '        return -1;'
+                print >> out
+            out.write("    if (!PyArg_ParseTupleAndKeywords(args, kwargs, ")
+            template = '"'
+            if mandatory_arguments:
+                template += "O"*len(mandatory_arguments)
+            if optional_arguments:
+                template += "|" + "O"*len(optional_arguments)
+            template += ':%s.__init__"' % classname
+            print >> out, template, ", arg_names",
+            for i in range(len(constructor.params)):
+                print >> out, ", &parsed_args[%i]" % i,
+
+            out.write(
+                "))\n"
+                "        return -1;\n"
+                "\n"
+                "    memset(params, 0, sizeof(GParameter)*%i);\n"
+                "    if (!pyg_parse_constructor_args(obj_type, arg_names,\n"
+                "                                    prop_names, params, \n"
+                "                                    &nparams, parsed_args))\n"
+                "        return -1;\n"
+                "    pygobject_constructv(self, nparams, params);\n"
+                "    for (i = 0; i < nparams; ++i)\n"
+                "        g_value_unset(&params[i].value);\n"
+                % len(constructor.params))
+        else:
+            out.write(
+                "    static char* kwlist[] = { NULL };\n"
+                "\n")
+
+            if constructor.deprecated is not None:
+                out.write(
+                    '    if (PyErr_Warn(PyExc_DeprecationWarning, "%s") < 0)\n'
+                    '        return -1;\n'
+                    '\n' % constructor.deprecated)
+
+            out.write(
+                '    if (!PyArg_ParseTupleAndKeywords(args, kwargs,\n'
+                '                                     ":%s.__init__",\n'
+                '                                     kwlist))\n'
+                '        return -1;\n'
+                '\n'
+                '    pygobject_constructv(self, 0, NULL);\n' % classname)
+        out.write(
+            '    if (!self->obj) {\n'
+            '        PyErr_SetString(\n'
+            '            PyExc_RuntimeError, \n'
+            '            "could not create %s object");\n'
+            '        return -1;\n'
+            '    }\n' % classname)
+
+        if not constructor.caller_owns_return:
+            print >> out, "    g_object_ref(self->obj);\n"
+
+        out.write(
+            '    return 0;\n'
+            '}\n\n')
+
+        return "_wrap_%s" % constructor.c_name
+
+
+class GInterfaceWrapper(GObjectWrapper):
+    virtual_accessor_tmpl = (
+        'static PyObject *\n'
+        '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n'
+        '{\n'
+        '    %(vtable)s *iface;\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    iface = g_type_interface_peek('
+        'g_type_class_peek(pyg_type_from_object(cls)), %(typecode)s);\n'
+        '    if (iface->%(virtual)s)\n'
+        '        %(setreturn)siface->%(virtual)s(%(arglist)s);\n'
+        '    else {\n'
+        '        PyErr_SetString(PyExc_NotImplementedError, '
+        '"interface method %(name)s not implemented");\n'
+        '        return NULL;\n'
+        '    }\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+
+    def get_initial_class_substdict(self):
+        return { 'tp_basicsize'      : 'PyObject',
+                 'tp_weaklistoffset' : '0',
+                 'tp_dictoffset'     : '0'}
+
+    def write_constructor(self):
+        # interfaces have no constructors ...
+        return '0'
+    def write_getsets(self):
+        # interfaces have no fields ...
+        return '0'
+
+    def _get_class_virtual_substdict(self, meth, cname, parent):
+        substdict = self.get_initial_method_substdict(meth)
+        substdict['virtual'] = substdict['name'].split('.')[1]
+        substdict['cname'] = cname
+        substdict['typecode'] = self.objinfo.typecode
+        substdict['vtable'] = self.objinfo.vtable
+        return substdict
+
+    def write_virtuals(self):
+        ## Now write reverse method wrappers, which let python code
+        ## implement interface methods.
+        # First, get methods from the defs files
+        klass = self.objinfo.c_name
+        proxies = []
+        for meth in self.parser.find_virtuals(self.objinfo):
+            method_name = self.objinfo.c_name + "__proxy_do_" + meth.name
+            if self.overrides.is_ignored(method_name):
+                continue
+            try:
+                if self.overrides.is_overriden(method_name):
+                    if not self.overrides.is_already_included(method_name):
+                        data = self.overrides.override(method_name)
+                        self.write_function(method_name, data)
+                else:
+                    # write proxy ...
+                    ret, props = argtypes.matcher.get_reverse_ret(meth.ret)
+                    wrapper = reversewrapper.ReverseWrapper(
+                        '_wrap_' + method_name, is_static=True)
+                    wrapper.set_return_type(ret(wrapper, **props))
+                    wrapper.add_parameter(reversewrapper.PyGObjectMethodParam(
+                        wrapper, "self", method_name="do_" + meth.name,
+                        c_type=(klass + ' *')))
+                    for param in meth.params:
+                        handler, props = argtypes.matcher.get_reverse(
+                            param.ptype)
+                        props["direction"] = param.pdir
+                        wrapper.add_parameter(
+                            handler(wrapper, param.pname, **props))
+                    buf = reversewrapper.MemoryCodeSink()
+                    wrapper.generate(buf)
+                    self.fp.write(buf.flush())
+                proxies.append((fixname(meth.name), '_wrap_' + method_name))
+                iproxies_coverage.declare_wrapped()
+            except argtypes.ArgTypeError, ex:
+                iproxies_coverage.declare_not_wrapped()
+                proxies.append((fixname(meth.name), None))
+                sys.stderr.write('Could not write interface proxy %s.%s: %s\n'
+                                % (klass, meth.name, str(ex)))
+
+        if not proxies or not [cname for name, cname in proxies if cname]:
+            return
+
+        ## Write an interface init function for this object
+        funcname = "__%s__interface_init" % klass
+        vtable = self.objinfo.vtable
+        self.fp.write(
+            '\nstatic void\n'
+            '%(funcname)s(%(vtable)s *iface, PyTypeObject *pytype)\n'
+            '{\n'
+            '    %(vtable)s *parent_iface = '
+            'g_type_interface_peek_parent(iface);\n'
+            '    PyObject *py_method;\n'
+            '\n'
+            % vars())
+
+        for name, cname in proxies:
+            do_name = 'do_' + name
+            if cname is None:
+                continue
+
+            self.fp.write((
+                '    py_method = pytype? PyObject_GetAttrString('
+                '(PyObject *) pytype, "%(do_name)s") : NULL;\n'
+                '    if (py_method && !PyObject_TypeCheck(py_method, '
+                '&PyCFunction_Type)) {\n'
+                '        iface->%(name)s = %(cname)s;\n'
+                '    } else {\n'
+                '        PyErr_Clear();\n'
+                '        if (parent_iface) {\n'
+                '            iface->%(name)s = parent_iface->%(name)s;\n'
+                '        }\n'
+                '    Py_XDECREF(py_method);\n'
+                '    }\n'
+                ) % vars())
+        self.fp.write('}\n\n')
+        interface_info = "__%s__iinfo" % klass
+        self.fp.write('''
+static const GInterfaceInfo %s = {
+    (GInterfaceInitFunc) %s,
+    NULL,
+    NULL
+};
+''' % (interface_info, funcname))
+        self.objinfo.interface_info = interface_info
+
+class GBoxedWrapper(Wrapper):
+    constructor_tmpl = (
+        'static int\n'
+        '_wrap_%(cname)s(PyGBoxed *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    self->gtype = %(typecode)s;\n'
+        '    self->free_on_dealloc = FALSE;\n'
+        '    self->boxed = %(cname)s(%(arglist)s);\n'
+        '%(codeafter)s\n'
+        '    if (!self->boxed) {\n'
+        '        PyErr_SetString(PyExc_RuntimeError, '
+        '"could not create %(typename)s object");\n'
+        '        return -1;\n'
+        '    }\n'
+        '    self->free_on_dealloc = TRUE;\n'
+        '    return 0;\n'
+        '}\n\n'
+        )
+
+    method_tmpl = (
+        'static PyObject *\n'
+        '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    %(begin_allow_threads)s\n'
+        '    %(setreturn)s%(cname)s(pyg_boxed_get(self, '
+        '%(typename)s)%(arglist)s);\n'
+        '    %(end_allow_threads)s\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+
+    def get_initial_class_substdict(self):
+        return { 'tp_basicsize'      : 'PyGBoxed',
+                 'tp_weaklistoffset' : '0',
+                 'tp_dictoffset'     : '0' }
+
+    def get_field_accessor(self, fieldname):
+        return 'pyg_boxed_get(self, %s)->%s' % (self.objinfo.c_name, fieldname)
+
+    def get_initial_constructor_substdict(self, constructor):
+        substdict = Wrapper.get_initial_constructor_substdict(
+            self, constructor)
+        substdict['typecode'] = self.objinfo.typecode
+        return substdict
+
+class GPointerWrapper(GBoxedWrapper):
+    constructor_tmpl = (
+        'static int\n'
+        '_wrap_%(cname)s(PyGPointer *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    self->gtype = %(typecode)s;\n'
+        '    self->pointer = %(cname)s(%(arglist)s);\n'
+        '%(codeafter)s\n'
+        '    if (!self->pointer) {\n'
+        '        PyErr_SetString(PyExc_RuntimeError, '
+        '"could not create %(typename)s object");\n'
+        '        return -1;\n'
+        '    }\n'
+        '    return 0;\n'
+        '}\n\n'
+        )
+
+    method_tmpl = (
+        'static PyObject *\n'
+        '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
+        '{\n'
+        '%(varlist)s'
+        '%(parseargs)s'
+        '%(codebefore)s'
+        '    %(setreturn)s%(cname)s(pyg_pointer_get(self, '
+        '%(typename)s)%(arglist)s);\n'
+        '%(codeafter)s\n'
+        '}\n\n'
+        )
+
+    def get_initial_class_substdict(self):
+        return { 'tp_basicsize'      : 'PyGPointer',
+                 'tp_weaklistoffset' : '0',
+                 'tp_dictoffset'     : '0' }
+
+    def get_field_accessor(self, fieldname):
+        return 'pyg_pointer_get(self, %s)->%s' % (self.objinfo.c_name,
+                                                  fieldname)
+
+    def get_initial_constructor_substdict(self, constructor):
+        substdict = Wrapper.get_initial_constructor_substdict(
+            self, constructor)
+        substdict['typecode'] = self.objinfo.typecode
+        return substdict
+
+class SourceWriter:
+    def __init__(self, parser, overrides, prefix, fp=FileOutput(sys.stdout)):
+        self.parser = parser
+        self.overrides = overrides
+        self.prefix = prefix
+        self.fp = fp
+
+    def write(self, py_ssize_t_clean=False):
+        argtypes.py_ssize_t_clean = py_ssize_t_clean
+
+        self.write_headers(py_ssize_t_clean)
+        self.write_imports()
+        self.write_type_declarations()
+        self.write_body()
+        self.write_classes()
+
+        wrapper = Wrapper(self.parser, None, self.overrides, self.fp)
+        wrapper.write_functions(self, self.prefix)
+
+        if not self.overrides.dynamicnamespace:
+            self.write_enums()
+        self.write_extension_init()
+        self.write_registers()
+        
+        argtypes.py_ssize_t_clean = False
+
+    def write_headers(self, py_ssize_t_clean):
+        self.fp.write('/* -- THIS FILE IS GENERATED - DO NOT EDIT */')
+        self.fp.write('/* -*- Mode: C; c-basic-offset: 4 -*- */\n\n')
+        if py_ssize_t_clean:
+            self.fp.write('#define PY_SSIZE_T_CLEAN\n')
+        self.fp.write('#include <Python.h>\n\n\n')
+        if py_ssize_t_clean:
+            self.fp.write('''
+
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+#endif
+
+''')
+        self.fp.write(self.overrides.get_headers())
+        self.fp.resetline()
+        self.fp.write('\n\n')
+
+    def write_imports(self):
+        self.fp.write('/* ---------- types from other modules ---------- */\n')
+        for module, pyname, cname in self.overrides.get_imports():
+            self.fp.write('static PyTypeObject *_%s;\n' % cname)
+            self.fp.write('#define %s (*_%s)\n' % (cname, cname))
+        self.fp.write('\n\n')
+
+    def write_type_declarations(self):
+        #todo use 'static' if used only in one file
+        self.fp.write('/* ---------- forward type declarations ---------- */\n')
+        for obj in self.parser.boxes:
+            if not self.overrides.is_type_ignored(obj.c_name):
+                self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n')
+        for obj in self.parser.objects:
+            if not self.overrides.is_type_ignored(obj.c_name):
+                self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n')
+        for interface in self.parser.interfaces:
+            if not self.overrides.is_type_ignored(interface.c_name):
+                self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + interface.c_name + '_Type;\n')
+        self.fp.write('\n')
+
+    def write_body(self):
+        self.fp.write(self.overrides.get_body())
+        self.fp.resetline()
+        self.fp.write('\n\n')
+
+    def _sort_parent_children(self, objects):
+        objects = list(objects)
+        modified = True
+        while modified:
+            modified = False
+            parent_index = None
+            child_index = None
+            for i, obj in enumerate(objects):
+                if obj.parent == 'GObject':
+                    continue
+                if obj.parent not in [info.c_name for info in objects[:i]]:
+                    for j, info in enumerate(objects[i+1:]):
+                        if info.c_name == obj.parent:
+                            parent_index = i + 1 + j
+                            child_index = i
+                            break
+                    else:
+                        continue
+                    break
+            if child_index is not None and parent_index is not None:
+                if child_index != parent_index:
+                    objects.insert(child_index, objects.pop(parent_index))
+                    modified = True
+        return objects
+
+    def write_classes(self):
+        ## Sort the objects, so that we generate code for the parent types
+        ## before their children.
+        objects = self._sort_parent_children(self.parser.objects)
+
+        for klass, items in ((GBoxedWrapper, self.parser.boxes),
+                             (GPointerWrapper, self.parser.pointers),
+                             (GObjectWrapper, objects),
+                             (GInterfaceWrapper, self.parser.interfaces)):
+            for item in items:
+                instance = klass(self.parser, item, self.overrides, self.fp)
+                instance.write_class()
+                self.fp.write('\n')
+
+    def get_enums(self):
+        enums = []
+        for enum in self.parser.enums:
+            if self.overrides.is_type_ignored(enum.c_name):
+                continue
+            enums.append(enum)
+        return enums
+
+    def write_enums(self):
+        if not self.parser.enums:
+            return
+
+        self.fp.write('\n/* ----------- enums and flags ----------- */\n\n')
+        self.fp.write(
+            'void\n' + self.prefix +
+            '_add_constants(PyObject *module, const gchar *strip_prefix)\n{\n')
+
+        for enum in self.get_enums():
+            if enum.typecode is None:
+                for nick, value in enum.values:
+                    self.fp.write(
+                        '    PyModule_AddIntConstant(module, '
+                        '(char *) pyg_constant_strip_prefix("%s", strip_prefix), %s);\n'
+                        % (value, value))
+            else:
+                if enum.deftype == 'enum':
+                    self.fp.write('  pyg_enum_add(module, "%s", strip_prefix, %s);\n'
+                                  % (enum.name, enum.typecode))
+                else:
+                    self.fp.write('  pyg_flags_add(module, "%s", strip_prefix, %s);\n'
+                                  % (enum.name, enum.typecode))
+
+        self.fp.write('\n')
+        self.fp.write('  if (PyErr_Occurred())\n')
+        self.fp.write('    PyErr_Print();\n')
+        self.fp.write('}\n\n')
+
+    def write_object_imports(self, retval=''):
+        imports = self.overrides.get_imports()[:]
+        if not imports:
+            return
+
+        bymod = {}
+        for module, pyname, cname in imports:
+            bymod.setdefault(module, []).append((pyname, cname))
+        self.fp.write('    PyObject *module;\n\n')
+        for module in bymod:
+            self.fp.write(
+                '    if ((module = PyImport_ImportModule("%s")) != NULL) {\n'
+                % module)
+            #self.fp.write(
+            #    '        PyObject *moddict = PyModule_GetDict(module);\n\n')
+            for pyname, cname in bymod[module]:
+                #self.fp.write(
+                #    '        _%s = (PyTypeObject *)PyDict_GetItemString('
+                #    'moddict, "%s");\n' % (cname, pyname))
+                self.fp.write(
+                    '        _%s = (PyTypeObject *)PyObject_GetAttrString('
+                    'module, "%s");\n' % (cname, pyname))
+                self.fp.write('        if (_%s == NULL) {\n' % cname)
+                self.fp.write('            PyErr_SetString(PyExc_ImportError,\n')
+                self.fp.write('                "cannot import name %s from %s");\n'
+                         % (pyname, module))
+                self.fp.write('            return %s;\n' % retval)
+                self.fp.write('        }\n')
+            self.fp.write('    } else {\n')
+            self.fp.write('        PyErr_SetString(PyExc_ImportError,\n')
+            self.fp.write('            "could not import %s");\n' % module)
+            self.fp.write('        return %s;\n' % retval)
+            self.fp.write('    }\n')
+        self.fp.write('\n')
+
+    def write_extension_init(self):
+        self.fp.write('/* initialise stuff extension classes */\n')
+        self.fp.write('void\n' + self.prefix + '_register_classes(PyObject *d)\n{\n')
+        self.write_object_imports()
+        self.fp.write(self.overrides.get_init() + '\n')
+        self.fp.resetline()
+
+    def get_classes(self):
+        objects = self.parser.objects[:]
+        pos = 0
+        while pos < len(objects):
+            parent = objects[pos].parent
+            for i in range(pos+1, len(objects)):
+                if objects[i].c_name == parent:
+                    objects.insert(i+1, objects[pos])
+                    del objects[pos]
+                    break
+            else:
+                pos = pos + 1
+
+        retval = []
+        for obj in objects:
+            if self.overrides.is_type_ignored(obj.c_name):
+                continue
+            bases = []
+            if obj.parent != None:
+                bases.append(obj.parent)
+            bases = bases + obj.implements
+            retval.append((obj, bases))
+
+        return retval
+
+    def write_registers(self):
+        for boxed in self.parser.boxes:
+            if not self.overrides.is_type_ignored(boxed.c_name):
+                self.fp.write('    pyg_register_boxed(d, "' + boxed.name +
+                              '", ' + boxed.typecode +
+                              ', &Py' + boxed.c_name +
+                          '_Type);\n')
+        for pointer in self.parser.pointers:
+            if not self.overrides.is_type_ignored(pointer.c_name):
+                self.fp.write('    pyg_register_pointer(d, "' + pointer.name +
+                              '", ' + pointer.typecode +
+                              ', &Py' + pointer.c_name + '_Type);\n')
+        for interface in self.parser.interfaces:
+            if not self.overrides.is_type_ignored(interface.c_name):
+                self.fp.write('    pyg_register_interface(d, "'
+                              + interface.name + '", '+ interface.typecode
+                              + ', &Py' + interface.c_name + '_Type);\n')
+                if interface.interface_info is not None:
+                    self.fp.write('    pyg_register_interface_info(%s, &%s);\n' %
+                                  (interface.typecode, interface.interface_info))
+
+        if not self.overrides.dynamicnamespace:
+            for obj, bases in self.get_classes():
+                self.write_class(obj, bases)
+        else:
+            for obj, bases in self.get_classes():
+                self.fp.write(
+                    '    pyg_type_register_custom_callback("%s", '
+                    '(PyGTypeRegistrationFunction)%s_register_type, d);\n' %
+                    (obj.c_name, obj.c_name))
+
+        self.fp.write('}\n')
+
+    def _can_direct_ref(self, base):
+        if not self.overrides.dynamicnamespace:
+            return True
+        if base == 'GObject':
+            return True
+        obj = get_object_by_name(base)
+        if obj.module.lower() != self.overrides.modulename:
+            return True
+        return False
+
+    def write_class(self, obj, bases, indent=1):
+        indent_str = ' ' * (indent * 4)
+        if bases:
+            bases_str = 'Py_BuildValue("(%s)"' % (len(bases) * 'O')
+
+            for base in bases:
+                if self._can_direct_ref(base):
+                    bases_str += ', &Py%s_Type' % base
+                else:
+                    baseobj = get_object_by_name(base)
+                    bases_str += ', PyObject_GetAttrString(m, "%s")' % baseobj.name
+            bases_str += ')'
+        else:
+            bases_str = 'NULL'
+
+        self.fp.write(
+                '%(indent)spygobject_register_class(d, "%(c_name)s", %(typecode)s, &Py%(c_name)s_Type, %(bases)s);\n'
+                % dict(indent=indent_str, c_name=obj.c_name, typecode=obj.typecode, bases=bases_str))
+
+        if obj.has_new_constructor_api:
+            self.fp.write(
+                indent_str + 'pyg_set_object_has_new_constructor(%s);\n' %
+                obj.typecode)
+        else:
+            print >> sys.stderr, (
+                "Warning: Constructor for %s needs to be updated to new API\n"
+                "         See http://live.gnome.org/PyGTK_2fWhatsNew28"
+                "#update-constructors") % obj.c_name
+
+        if obj.class_init_func is not None:
+            self.fp.write(
+                indent_str + 'pyg_register_class_init(%s, %s);\n' %
+                (obj.typecode, obj.class_init_func))
+
+_objects = {}
+
+def get_object_by_name(c_name):
+    global _objects
+    return _objects[c_name]
+
+def register_types(parser):
+    global _objects
+    for boxed in parser.boxes:
+        argtypes.matcher.register_boxed(boxed.c_name, boxed.typecode)
+        _objects[boxed.c_name] = boxed
+    for pointer in parser.pointers:
+        argtypes.matcher.register_pointer(pointer.c_name, pointer.typecode)
+    for obj in parser.objects:
+        argtypes.matcher.register_object(obj.c_name, obj.parent, obj.typecode)
+        _objects[obj.c_name] = obj
+    for iface in parser.interfaces:
+        argtypes.matcher.register_object(iface.c_name, None, iface.typecode)
+        _objects[iface.c_name] = iface
+    for enum in parser.enums:
+        if enum.deftype == 'flags':
+            argtypes.matcher.register_flag(enum.c_name, enum.typecode)
+        else:
+            argtypes.matcher.register_enum(enum.c_name, enum.typecode)
+
+usage = 'usage: codegen.py [-o overridesfile] [-p prefix] defsfile'
+def main(argv):
+    o = override.Overrides()
+    prefix = 'pygtk'
+    outfilename = None
+    errorfilename = None
+    opts, args = getopt.getopt(argv[1:], "o:p:r:t:D:I:",
+                        ["override=", "prefix=", "register=", "outfilename=",
+                         "load-types=", "errorfilename=", "py_ssize_t-clean"])
+    defines = {} # -Dkey[=val] options
+    py_ssize_t_clean = False
+    for opt, arg in opts:
+        if opt in ('-o', '--override'):
+            o = override.Overrides(arg)
+        elif opt in ('-p', '--prefix'):
+            prefix = arg
+        elif opt in ('-r', '--register'):
+            # Warning: user has to make sure all -D options appear before -r
+            p = defsparser.DefsParser(arg, defines)
+            p.startParsing()
+            register_types(p)
+            del p
+        elif opt == '--outfilename':
+            outfilename = arg
+        elif opt == '--errorfilename':
+            errorfilename = arg
+        elif opt in ('-t', '--load-types'):
+            globals = {}
+            execfile(arg, globals)
+        elif opt == '-D':
+            nameval = arg.split('=')
+            try:
+                defines[nameval[0]] = nameval[1]
+            except IndexError:
+                defines[nameval[0]] = None
+        elif opt == '-I':
+            defsparser.include_path.insert(0, arg)
+        elif opt == '--py_ssize_t-clean':
+            py_ssize_t_clean = True
+    if len(args) < 1:
+        print >> sys.stderr, usage
+        return 1
+    if errorfilename:
+        sys.stderr = open(errorfilename, "w")
+    p = defsparser.DefsParser(args[0], defines)
+    if not outfilename:
+        outfilename = os.path.splitext(args[0])[0] + '.c'
+
+    p.startParsing()
+
+    register_types(p)
+    sw = SourceWriter(p, o, prefix, FileOutput(sys.stdout, outfilename))
+    sw.write(py_ssize_t_clean)
+
+    functions_coverage.printstats()
+    methods_coverage.printstats()
+    vproxies_coverage.printstats()
+    vaccessors_coverage.printstats()
+    iproxies_coverage.printstats()
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
Index: pkg/pygtk/branches/upstream/current/codegen/createdefs.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/createdefs.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/createdefs.py	(revision 4)
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+import sys
+
+def main(args):
+    output = args[1]
+    input = args[2:]
+    outfd = open(output, 'w')
+    outfd.write(';; -*- scheme -*-\n')
+    outfd.write(';; THIS FILE IS GENERATED - DO NOT EDIT\n')
+    for filename in input:
+        outfd.write('(include "%s")\n' % filename)
+    outfd.close()
+
+    return 0
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
Index: pkg/pygtk/branches/upstream/current/codegen/definitions.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/definitions.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/definitions.py	(revision 4)
@@ -0,0 +1,547 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import copy
+import sys
+
+def get_valid_scheme_definitions(defs):
+    return [x for x in defs if isinstance(x, tuple) and len(x) >= 2]
+
+def unescape(s):
+    s = s.replace('\r\n', '\\r\\n').replace('\t', '\\t')
+    return s.replace('\r', '\\r').replace('\n', '\\n')
+
+def make_docstring(lines):
+    return "(char *) " + '\n'.join(['"%s"' % unescape(s) for s in lines])
+
+# New Parameter class, wich emulates a tuple for compatibility reasons
+class Parameter(object):
+    def __init__(self, ptype, pname, pdflt, pnull, pdir=None):
+        self.ptype = ptype
+        self.pname = pname
+        self.pdflt = pdflt
+        self.pnull = pnull
+        self.pdir = pdir
+
+    def __len__(self): return 4
+    def __getitem__(self, i):
+        return (self.ptype, self.pname, self.pdflt, self.pnull)[i]
+
+    def merge(self, old):
+        if old.pdflt is not None:
+            self.pdflt = old.pdflt
+        if old.pnull is not None:
+            self.pnull = old.pnull
+
+# Parameter for property based constructors
+class Property(object):
+    def __init__(self, pname, optional, argname):
+        self.pname = pname
+        self.optional = optional
+        self.argname = argname
+
+    def merge(self, old):
+        if old.optional is not None:
+            self.optional = old.optional
+        if old.argname is not None:
+            self.argname = old.argname
+
+
+class Definition:
+    docstring = "NULL"
+    def __init__(self, *args):
+        """Create a new defs object of this type.  The arguments are the
+        components of the definition"""
+        raise RuntimeError, "this is an abstract class"
+    def merge(self, old):
+        """Merge in customisations from older version of definition"""
+        raise RuntimeError, "this is an abstract class"
+    def write_defs(self, fp=sys.stdout):
+        """write out this definition in defs file format"""
+        raise RuntimeError, "this is an abstract class"
+
+    def guess_return_value_ownership(self):
+        "return 1 if caller owns return value"
+        if getattr(self, 'is_constructor_of', False):
+            self.caller_owns_return = True
+        elif self.ret in ('char*', 'gchar*', 'string'):
+            self.caller_owns_return = True
+        else:
+            self.caller_owns_return = False
+
+
+class ObjectDef(Definition):
+    def __init__(self, name, *args):
+        self.name = name
+        self.module = None
+        self.parent = None
+        self.c_name = None
+        self.typecode = None
+        self.fields = []
+        self.implements = []
+        self.class_init_func = None
+        self.has_new_constructor_api = False
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'in-module':
+                self.module = arg[1]
+            elif arg[0] == 'docstring':
+                self.docstring = make_docstring(arg[1:])
+            elif arg[0] == 'parent':
+                self.parent = arg[1]
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'fields':
+                for parg in arg[1:]:
+                    self.fields.append((parg[0], parg[1]))
+            elif arg[0] == 'implements':
+                self.implements.append(arg[1])
+    def merge(self, old):
+        # currently the .h parser doesn't try to work out what fields of
+        # an object structure should be public, so we just copy the list
+        # from the old version ...
+        self.fields = old.fields
+        self.implements = old.implements
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-object ' + self.name + '\n')
+        if self.module:
+            fp.write('  (in-module "' + self.module + '")\n')
+        if self.parent != (None, None):
+            fp.write('  (parent "' + self.parent + '")\n')
+        for interface in self.implements:
+            fp.write('  (implements "' + interface + '")\n')
+        if self.c_name:
+            fp.write('  (c-name "' + self.c_name + '")\n')
+        if self.typecode:
+            fp.write('  (gtype-id "' + self.typecode + '")\n')
+        if self.fields:
+            fp.write('  (fields\n')
+            for (ftype, fname) in self.fields:
+                fp.write('    \'("' + ftype + '" "' + fname + '")\n')
+            fp.write('  )\n')
+        fp.write(')\n\n')
+
+class InterfaceDef(Definition):
+    def __init__(self, name, *args):
+        self.name = name
+        self.module = None
+        self.c_name = None
+        self.typecode = None
+        self.vtable = None
+        self.fields = []
+        self.interface_info = None
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'in-module':
+                self.module = arg[1]
+            elif arg[0] == 'docstring':
+                self.docstring = make_docstring(arg[1:])
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'vtable':
+                self.vtable = arg[1]
+        if self.vtable is None:
+            self.vtable = self.c_name + "Iface"
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-interface ' + self.name + '\n')
+        if self.module:
+            fp.write('  (in-module "' + self.module + '")\n')
+        if self.c_name:
+            fp.write('  (c-name "' + self.c_name + '")\n')
+        if self.typecode:
+            fp.write('  (gtype-id "' + self.typecode + '")\n')
+        fp.write(')\n\n')
+
+class EnumDef(Definition):
+    def __init__(self, name, *args):
+        self.deftype = 'enum'
+        self.name = name
+        self.in_module = None
+        self.c_name = None
+        self.typecode = None
+        self.values = []
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'in-module':
+                self.in_module = arg[1]
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'values':
+                for varg in arg[1:]:
+                    self.values.append((varg[0], varg[1]))
+    def merge(self, old):
+        pass
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-' + self.deftype + ' ' + self.name + '\n')
+        if self.in_module:
+            fp.write('  (in-module "' + self.in_module + '")\n')
+        fp.write('  (c-name "' + self.c_name + '")\n')
+        fp.write('  (gtype-id "' + self.typecode + '")\n')
+        if self.values:
+            fp.write('  (values\n')
+            for name, val in self.values:
+                fp.write('    \'("' + name + '" "' + val + '")\n')
+            fp.write('  )\n')
+        fp.write(')\n\n')
+
+class FlagsDef(EnumDef):
+    def __init__(self, *args):
+        apply(EnumDef.__init__, (self,) + args)
+        self.deftype = 'flags'
+
+class BoxedDef(Definition):
+    def __init__(self, name, *args):
+        self.name = name
+        self.module = None
+        self.c_name = None
+        self.typecode = None
+        self.copy = None
+        self.release = None
+        self.fields = []
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'in-module':
+                self.module = arg[1]
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'copy-func':
+                self.copy = arg[1]
+            elif arg[0] == 'release-func':
+                self.release = arg[1]
+            elif arg[0] == 'fields':
+                for parg in arg[1:]:
+                    self.fields.append((parg[0], parg[1]))
+    def merge(self, old):
+        # currently the .h parser doesn't try to work out what fields of
+        # an object structure should be public, so we just copy the list
+        # from the old version ...
+        self.fields = old.fields
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-boxed ' + self.name + '\n')
+        if self.module:
+            fp.write('  (in-module "' + self.module + '")\n')
+        if self.c_name:
+            fp.write('  (c-name "' + self.c_name + '")\n')
+        if self.typecode:
+            fp.write('  (gtype-id "' + self.typecode + '")\n')
+        if self.copy:
+            fp.write('  (copy-func "' + self.copy + '")\n')
+        if self.release:
+            fp.write('  (release-func "' + self.release + '")\n')
+        if self.fields:
+            fp.write('  (fields\n')
+            for (ftype, fname) in self.fields:
+                fp.write('    \'("' + ftype + '" "' + fname + '")\n')
+            fp.write('  )\n')
+        fp.write(')\n\n')
+
+class PointerDef(Definition):
+    def __init__(self, name, *args):
+        self.name = name
+        self.module = None
+        self.c_name = None
+        self.typecode = None
+        self.fields = []
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'in-module':
+                self.module = arg[1]
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'fields':
+                for parg in arg[1:]:
+                    self.fields.append((parg[0], parg[1]))
+    def merge(self, old):
+        # currently the .h parser doesn't try to work out what fields of
+        # an object structure should be public, so we just copy the list
+        # from the old version ...
+        self.fields = old.fields
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-pointer ' + self.name + '\n')
+        if self.module:
+            fp.write('  (in-module "' + self.module + '")\n')
+        if self.c_name:
+            fp.write('  (c-name "' + self.c_name + '")\n')
+        if self.typecode:
+            fp.write('  (gtype-id "' + self.typecode + '")\n')
+        if self.fields:
+            fp.write('  (fields\n')
+            for (ftype, fname) in self.fields:
+                fp.write('    \'("' + ftype + '" "' + fname + '")\n')
+            fp.write('  )\n')
+        fp.write(')\n\n')
+
+class MethodDefBase(Definition):
+    def __init__(self, name, *args):
+        dump = 0
+        self.name = name
+        self.ret = None
+        self.caller_owns_return = None
+        self.unblock_threads = None
+        self.c_name = None
+        self.typecode = None
+        self.of_object = None
+        self.params = [] # of form (type, name, default, nullok)
+        self.varargs = 0
+        self.deprecated = None
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'of-object':
+                self.of_object = arg[1]
+            elif arg[0] == 'docstring':
+                self.docstring = make_docstring(arg[1:])
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'return-type':
+                self.ret = arg[1]
+            elif arg[0] == 'caller-owns-return':
+                self.caller_owns_return = arg[1] in ('t', '#t')
+            elif arg[0] == 'unblock-threads':
+                self.unblock_threads = arg[1] in ('t', '#t')
+            elif arg[0] == 'parameters':
+                for parg in arg[1:]:
+                    ptype = parg[0]
+                    pname = parg[1]
+                    pdflt = None
+                    pnull = 0
+                    pdir = None
+                    for farg in parg[2:]:
+                        assert isinstance(farg, tuple)
+                        if farg[0] == 'default':
+                            pdflt = farg[1]
+                        elif farg[0] == 'null-ok':
+                            pnull = 1
+                        elif farg[0] == 'direction':
+                            pdir = farg[1]
+                    self.params.append(Parameter(ptype, pname, pdflt, pnull, pdir))
+            elif arg[0] == 'varargs':
+                self.varargs = arg[1] in ('t', '#t')
+            elif arg[0] == 'deprecated':
+                self.deprecated = arg[1]
+            else:
+                sys.stderr.write("Warning: %s argument unsupported.\n"
+                                 % (arg[0]))
+                dump = 1
+        if dump:
+            self.write_defs(sys.stderr)
+
+        if self.caller_owns_return is None and self.ret is not None:
+            self.guess_return_value_ownership()
+
+    def merge(self, old, parmerge):
+        self.caller_owns_return = old.caller_owns_return
+        self.varargs = old.varargs
+        # here we merge extra parameter flags accross to the new object.
+        if not parmerge:
+            self.params = copy.deepcopy(old.params)
+            return
+        for i in range(len(self.params)):
+            ptype, pname, pdflt, pnull = self.params[i]
+            for p2 in old.params:
+                if p2[1] == pname:
+                    self.params[i] = (ptype, pname, p2[2], p2[3])
+                    break
+    def _write_defs(self, fp=sys.stdout):
+        if self.of_object != (None, None):
+            fp.write('  (of-object "' + self.of_object + '")\n')
+        if self.c_name:
+            fp.write('  (c-name "' + self.c_name + '")\n')
+        if self.typecode:
+            fp.write('  (gtype-id "' + self.typecode + '")\n')
+        if self.caller_owns_return:
+            fp.write('  (caller-owns-return #t)\n')
+        if self.unblock_threads:
+            fp.write('  (unblock_threads #t)\n')
+        if self.ret:
+            fp.write('  (return-type "' + self.ret + '")\n')
+        if self.deprecated:
+            fp.write('  (deprecated "' + self.deprecated + '")\n')
+        if self.params:
+            fp.write('  (parameters\n')
+            for ptype, pname, pdflt, pnull in self.params:
+                fp.write('    \'("' + ptype + '" "' + pname +'"')
+                if pdflt: fp.write(' (default "' + pdflt + '")')
+                if pnull: fp.write(' (null-ok)')
+                fp.write(')\n')
+            fp.write('  )\n')
+        if self.varargs:
+            fp.write('  (varargs #t)\n')
+        fp.write(')\n\n')
+
+
+class MethodDef(MethodDefBase):
+    def __init__(self, name, *args):
+        MethodDefBase.__init__(self, name, *args)
+        for item in ('c_name', 'of_object'):
+            if self.__dict__[item] == None:
+                self.write_defs(sys.stderr)
+                raise RuntimeError, "definition missing required %s" % (item,)
+
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-method ' + self.name + '\n')
+        self._write_defs(fp)
+
+class VirtualDef(MethodDefBase):
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-virtual ' + self.name + '\n')
+        self._write_defs(fp)
+
+class FunctionDef(Definition):
+    def __init__(self, name, *args):
+        dump = 0
+        self.name = name
+        self.in_module = None
+        self.is_constructor_of = None
+        self.ret = None
+        self.caller_owns_return = None
+        self.unblock_threads = None
+        self.c_name = None
+        self.typecode = None
+        self.params = [] # of form (type, name, default, nullok)
+        self.varargs = 0
+        self.deprecated = None
+        for arg in get_valid_scheme_definitions(args):
+            if arg[0] == 'in-module':
+                self.in_module = arg[1]
+            elif arg[0] == 'docstring':
+                self.docstring = make_docstring(arg[1:])
+            elif arg[0] == 'is-constructor-of':
+                self.is_constructor_of = arg[1]
+            elif arg[0] == 'c-name':
+                self.c_name = arg[1]
+            elif arg[0] == 'gtype-id':
+                self.typecode = arg[1]
+            elif arg[0] == 'return-type':
+                self.ret = arg[1]
+            elif arg[0] == 'caller-owns-return':
+                self.caller_owns_return = arg[1] in ('t', '#t')
+            elif arg[0] == 'unblock-threads':
+                self.unblock_threads = arg[1] in ('t', '#t')
+            elif arg[0] == 'parameters':
+                for parg in arg[1:]:
+                    ptype = parg[0]
+                    pname = parg[1]
+                    pdflt = None
+                    pnull = 0
+                    for farg in parg[2:]:
+                        if farg[0] == 'default':
+                            pdflt = farg[1]
+                        elif farg[0] == 'null-ok':
+                            pnull = 1
+                    self.params.append(Parameter(ptype, pname, pdflt, pnull))
+            elif arg[0] == 'properties':
+                if self.is_constructor_of is None:
+                    print >> sys.stderr, "Warning: (properties ...) "\
+                          "is only valid for constructors"
+                for prop in arg[1:]:
+                    pname = prop[0]
+                    optional = False
+                    argname = pname
+                    for farg in prop[1:]:
+                        if farg[0] == 'optional':
+                            optional = True
+                        elif farg[0] == 'argname':
+                            argname = farg[1]
+                    self.params.append(Property(pname, optional, argname))
+            elif arg[0] == 'varargs':
+                self.varargs = arg[1] in ('t', '#t')
+            elif arg[0] == 'deprecated':
+                self.deprecated = arg[1]
+            else:
+                sys.stderr.write("Warning: %s argument unsupported\n"
+                                 % (arg[0],))
+                dump = 1
+        if dump:
+            self.write_defs(sys.stderr)
+
+        if self.caller_owns_return is None and self.ret is not None:
+            self.guess_return_value_ownership()
+        for item in ('c_name',):
+            if self.__dict__[item] == None:
+                self.write_defs(sys.stderr)
+                raise RuntimeError, "definition missing required %s" % (item,)
+
+    _method_write_defs = MethodDef.__dict__['write_defs']
+
+    def merge(self, old, parmerge):
+        self.caller_owns_return = old.caller_owns_return
+        self.varargs = old.varargs
+        if not parmerge:
+            self.params = copy.deepcopy(old.params)
+            return
+        # here we merge extra parameter flags accross to the new object.
+        def merge_param(param):
+            for old_param in old.params:
+                if old_param.pname == param.pname:
+                    if isinstance(old_param, Property):
+                        # h2def never scans Property's, therefore if
+                        # we have one it was manually written, so we
+                        # keep it.
+                        return copy.deepcopy(old_param)
+                    else:
+                        param.merge(old_param)
+                        return param
+            raise RuntimeError, "could not find %s in old_parameters %r" % (
+                param.pname, [p.pname for p in old.params])
+        try:
+            self.params = map(merge_param, self.params)
+        except RuntimeError:
+            # parameter names changed and we can't find a match; it's
+            # safer to keep the old parameter list untouched.
+            self.params = copy.deepcopy(old.params)
+
+        if not self.is_constructor_of:
+            try:
+                self.is_constructor_of = old.is_constructor_of
+            except AttributeError:
+                pass
+        if isinstance(old, MethodDef):
+            self.name = old.name
+            # transmogrify from function into method ...
+            self.write_defs = self._method_write_defs
+            self.of_object = old.of_object
+            del self.params[0]
+    def write_defs(self, fp=sys.stdout):
+        fp.write('(define-function ' + self.name + '\n')
+        if self.in_module:
+            fp.write('  (in-module "' + self.in_module + '")\n')
+        if self.is_constructor_of:
+            fp.write('  (is-constructor-of "' + self.is_constructor_of +'")\n')
+        if self.c_name:
+            fp.write('  (c-name "' + self.c_name + '")\n')
+        if self.typecode:
+            fp.write('  (gtype-id "' + self.typecode + '")\n')
+        if self.caller_owns_return:
+            fp.write('  (caller-owns-return #t)\n')
+        if self.unblock_threads:
+            fp.write('  (unblock-threads #t)\n')
+        if self.ret:
+            fp.write('  (return-type "' + self.ret + '")\n')
+        if self.deprecated:
+            fp.write('  (deprecated "' + self.deprecated + '")\n')
+        if self.params:
+            if isinstance(self.params[0], Parameter):
+                fp.write('  (parameters\n')
+                for ptype, pname, pdflt, pnull in self.params:
+                    fp.write('    \'("' + ptype + '" "' + pname +'"')
+                    if pdflt: fp.write(' (default "' + pdflt + '")')
+                    if pnull: fp.write(' (null-ok)')
+                    fp.write(')\n')
+                fp.write('  )\n')
+            elif isinstance(self.params[0], Property):
+                fp.write('  (properties\n')
+                for prop in self.params:
+                    fp.write('    \'("' + prop.pname +'"')
+                    if prop.optional: fp.write(' (optional)')
+                    fp.write(')\n')
+                fp.write('  )\n')
+            else:
+                assert False, "strange parameter list %r" % self.params[0]
+        if self.varargs:
+            fp.write('  (varargs #t)\n')
+
+        fp.write(')\n\n')
Index: pkg/pygtk/branches/upstream/current/codegen/pygtk-codegen-2.0.in
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/pygtk-codegen-2.0.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/pygtk-codegen-2.0.in	(revision 4)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+prefix=@prefix@
+datarootdir=@datarootdir@
+datadir=@datadir@
+codegendir=${datadir}/pygtk/2.0/codegen
+
+PYTHONPATH=$codegendir
+export PYTHONPATH
+
+exec @PYTHON@ $codegendir/codegen.py "$@"
Index: pkg/pygtk/branches/upstream/current/codegen/reversewrapper.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/reversewrapper.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/reversewrapper.py	(revision 4)
@@ -0,0 +1,851 @@
+### -*- python -*-
+### Code to generate "Reverse Wrappers", i.e. C->Python wrappers
+### (C) 2004 Gustavo Carneiro <gjc@gnome.org>
+import argtypes
+import os
+
+DEBUG_MODE = ('PYGTK_CODEGEN_DEBUG' in os.environ)
+
+def join_ctype_name(ctype, name):
+    '''Joins a C type and a variable name into a single string'''
+    if ctype[-1] != '*':
+        return " ".join((ctype, name))
+    else:
+        return "".join((ctype, name))
+
+
+class CodeSink(object):
+    def __init__(self):
+        self.indent_level = 0 # current indent level
+        self.indent_stack = [] # previous indent levels
+
+    def _format_code(self, code):
+        assert isinstance(code, str)
+        l = []
+        for line in code.split('\n'):
+            l.append(' '*self.indent_level + line)
+        if l[-1]:
+            l.append('')
+        return '\n'.join(l)
+
+    def writeln(self, line=''):
+        raise NotImplementedError
+
+    def indent(self, level=4):
+        '''Add a certain ammount of indentation to all lines written
+        from now on and until unindent() is called'''
+        self.indent_stack.append(self.indent_level)
+        self.indent_level += level
+
+    def unindent(self):
+        '''Revert indentation level to the value before last indent() call'''
+        self.indent_level = self.indent_stack.pop()
+
+
+class FileCodeSink(CodeSink):
+    def __init__(self, fp):
+        CodeSink.__init__(self)
+        assert isinstance(fp, file)
+        self.fp = fp
+
+    def writeln(self, line=''):
+        self.fp.write(self._format_code(line))
+
+class MemoryCodeSink(CodeSink):
+    def __init__(self):
+        CodeSink.__init__(self)
+        self.lines = []
+
+    def writeln(self, line=''):
+        self.lines.append(self._format_code(line))
+
+    def flush_to(self, sink):
+        assert isinstance(sink, CodeSink)
+        for line in self.lines:
+            sink.writeln(line.rstrip())
+        self.lines = []
+
+    def flush(self):
+        l = []
+        for line in self.lines:
+            l.append(self._format_code(line))
+        self.lines = []
+        return "".join(l)
+
+class ReverseWrapper(object):
+    '''Object that generates a C->Python wrapper'''
+    def __init__(self, cname, is_static=True):
+        assert isinstance(cname, str)
+
+        self.cname = cname
+        ## function object we will call, or object whose method we will call
+        self.called_pyobj = None
+        ## name of method of self.called_pyobj we will call
+        self.method_name = None
+        self.is_static = is_static
+
+        self.parameters = []
+        self.declarations = MemoryCodeSink()
+        self.post_return_code = MemoryCodeSink()
+        self.body = MemoryCodeSink()
+        self.cleanup_actions = []
+        self.pyargv_items = []
+        self.pyargv_optional_items = []
+        self.pyret_parse_items = [] # list of (format_spec, parameter)
+
+    def set_call_target(self, called_pyobj, method_name=None):
+        assert called_pyobj is not None
+        assert self.called_pyobj is None
+        self.called_pyobj = called_pyobj
+        self.method_name = method_name
+
+    def set_return_type(self, return_type):
+        assert isinstance(return_type, ReturnType)
+        self.return_type = return_type
+
+    def add_parameter(self, param):
+        assert isinstance(param, Parameter)
+        self.parameters.append(param)
+
+    def add_declaration(self, decl_code):
+        self.declarations.writeln(decl_code)
+
+    def add_pyargv_item(self, variable, optional=False):
+        if optional:
+            self.pyargv_optional_items.append(variable)
+        else:
+            self.pyargv_items.append(variable)
+
+    def add_pyret_parse_item(self, format_specifier, parameter, prepend=False):
+        if prepend:
+            self.pyret_parse_items.insert(0, (format_specifier, parameter))
+        else:
+            self.pyret_parse_items.append((format_specifier, parameter))
+
+    def write_code(self, code,
+                   cleanup=None,
+                   failure_expression=None,
+                   failure_cleanup=None,
+                   failure_exception=None,
+                   code_sink=None):
+        '''Add a chunk of code with cleanup and error handling
+
+        This method is to be used by TypeHandlers when generating code
+
+        Keywork arguments:
+        code -- code to add
+        cleanup -- code to cleanup any dynamic resources created by @code
+                   (except in case of failure) (default None)
+        failure_expression -- C boolean expression to indicate
+                              if anything failed (default None)
+        failure_cleanup -- code to cleanup any dynamic resources
+                           created by @code in case of failure (default None)
+        failure_exception -- code to raise an exception in case of
+                             failure (which will be immediately
+                             printed and cleared), (default None)
+        code_sink -- "code sink" to use; by default,
+                      ReverseWrapper.body is used, which writes the
+                      main body of the wrapper, before calling the
+                      python method.  Alternatively,
+                      ReverseWrapper.after_pyret_parse can be used, to
+                      write code after the PyArg_ParseTuple that
+                      parses the python method return value.
+        '''
+        if code_sink is None:
+            code_sink = self.body
+        if code is not None:
+            code_sink.writeln(code)
+        if failure_expression is not None:
+            code_sink.writeln("if (%s) {" % (failure_expression,))
+            code_sink.indent()
+            if failure_exception is None:
+                code_sink.writeln("if (PyErr_Occurred())")
+                code_sink.indent()
+                code_sink.writeln("PyErr_Print();")
+                code_sink.unindent()
+            else:
+                code_sink.writeln(failure_exception)
+                code_sink.writeln("PyErr_Print();")
+            if failure_cleanup is not None:
+                code_sink.writeln(failure_cleanup)
+            for cleanup_action in self.cleanup_actions:
+                code_sink.writeln(cleanup_action)
+            self.return_type.write_error_return()
+            code_sink.unindent()
+            code_sink.writeln("}")
+        if cleanup is not None:
+            self.cleanup_actions.insert(0, cleanup)
+
+    def generate(self, sink):
+        '''Generate the code into a CodeSink object'''
+        assert isinstance(sink, CodeSink)
+
+        if DEBUG_MODE:
+            self.declarations.writeln("/* begin declarations */")
+            self.body.writeln("/* begin main body */")
+            self.post_return_code.writeln("/* begin post-return code */")
+
+        self.add_declaration("PyGILState_STATE __py_state;")
+        self.write_code(code="__py_state = pyg_gil_state_ensure();",
+                        cleanup="pyg_gil_state_release(__py_state);")
+
+        for param in self.parameters:
+            param.convert_c2py()
+
+        assert self.called_pyobj is not None,\
+               "Parameters failed to provide a target function or method."
+
+        if self.is_static:
+            sink.writeln('static %s' % self.return_type.get_c_type())
+        else:
+            sink.writeln(self.return_type.get_c_type())
+        c_proto_params = map(Parameter.format_for_c_proto, self.parameters)
+        sink.writeln("%s(%s)\n{" % (self.cname, ", ".join(c_proto_params)))
+
+        self.return_type.write_decl()
+        self.add_declaration("PyObject *py_retval;")
+
+        ## Handle number of arguments
+        if self.pyargv_items:
+            self.add_declaration("PyObject *py_args;")
+            py_args = "py_args"
+            if self.pyargv_optional_items:
+                self.add_declaration("int argc = %i;" % len(self.pyargv_items))
+                argc = "argc"
+                for arg in self.pyargv_optional_items:
+                    self.body.writeln("if (%s)" % arg)
+                    self.body.indent()
+                    self.body.writeln("++argc;")
+                    self.body.unindent()
+            else:
+                argc = str(len(self.pyargv_items))
+        else:
+            if self.pyargv_optional_items:
+                self.add_declaration("PyObject *py_args;")
+                py_args = "py_args"
+                self.add_declaration("int argc = 0;")
+                argc = "argc"
+                for arg in self.pyargv_optional_items:
+                    self.body.writeln("if (%s)" % arg)
+                    self.body.indent()
+                    self.body.writeln("++argc;")
+                    self.body.unindent()
+            else:
+                py_args = "NULL"
+                argc = None
+
+        self.body.writeln()
+
+        if py_args != "NULL":
+            self.write_code("py_args = PyTuple_New(%s);" % argc,
+                            cleanup="Py_DECREF(py_args);")
+            pos = 0
+            for arg in self.pyargv_items:
+                try: # try to remove the Py_DECREF cleanup action, if we can
+                    self.cleanup_actions.remove("Py_DECREF(%s);" % arg)
+                except ValueError: # otherwise we have to Py_INCREF..
+                    self.body.writeln("Py_INCREF(%s);" % arg)
+                self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg))
+                pos += 1
+            for arg in self.pyargv_optional_items:
+                self.body.writeln("if (%s) {" % arg)
+                self.body.indent()
+                try: # try to remove the Py_DECREF cleanup action, if we can
+                    self.cleanup_actions.remove("Py_XDECREF(%s);" % arg)
+                except ValueError: # otherwise we have to Py_INCREF..
+                    self.body.writeln("Py_INCREF(%s);" % arg)
+                self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg))
+                self.body.unindent()
+                self.body.writeln("}")
+                pos += 1
+
+        self.body.writeln()
+
+        ## Call the python method
+        if self.method_name is None:
+            self.write_code("py_retval = PyObject_Call(%s, %s);"
+                            % (self.called_pyobj, py_args),
+                            cleanup="Py_DECREF(py_retval);",
+                            failure_expression="!py_retval")
+        else:
+            self.add_declaration("PyObject *py_method;")
+            self.write_code("py_method = PyObject_GetAttrString(%s, \"%s\");"
+                            % (self.called_pyobj, self.method_name),
+                            cleanup="Py_DECREF(py_method);",
+                            failure_expression="!py_method")
+            self.write_code("py_retval = PyObject_CallObject(py_method, %s);"
+                            % (py_args,),
+                            cleanup="Py_DECREF(py_retval);",
+                            failure_expression="!py_retval")
+
+        ## -- Handle the return value --
+
+        ## we need to check if the return_type object is prepared to cooperate with multiple return values
+        len_before = len(self.pyret_parse_items)
+        self.return_type.write_conversion()
+        len_after = len(self.pyret_parse_items)
+        assert (self.return_type.get_c_type() == 'void'
+                or not (len_before == len_after and len_after > 0)),\
+               ("Bug in reverse wrappers: return type handler %s"
+                " is not prepared to cooperate multiple return values") % (type(self.return_type),)
+
+        sink.indent()
+
+        if len(self.pyret_parse_items) == 1:
+            ## if retval is one item only, pack it in a tuple so we
+            ## can use PyArg_ParseTuple as usual..
+            self.write_code('py_retval = Py_BuildValue("(N)", py_retval);')
+        if len(self.pyret_parse_items) > 0:
+            ## Parse return values using PyArg_ParseTuple
+            self.write_code(code=None, failure_expression=(
+                '!PyArg_ParseTuple(py_retval, "%s", %s)' % (
+                "".join([format for format, param in self.pyret_parse_items]),
+                ", ".join([param for format, param in self.pyret_parse_items]))))
+
+        if DEBUG_MODE:
+            self.declarations.writeln("/* end declarations */")
+        self.declarations.flush_to(sink)
+        sink.writeln()
+        if DEBUG_MODE:
+            self.body.writeln("/* end main body */")
+        self.body.flush_to(sink)
+        sink.writeln()
+        if DEBUG_MODE:
+            self.post_return_code.writeln("/* end post-return code */")
+        self.post_return_code.flush_to(sink)
+        sink.writeln()
+
+        for cleanup_action in self.cleanup_actions:
+            sink.writeln(cleanup_action)
+        if self.return_type.get_c_type() != 'void':
+            sink.writeln()
+            sink.writeln("return retval;")
+        sink.unindent()
+        sink.writeln("}")
+
+class TypeHandler(object):
+    def __init__(self, wrapper, **props):
+        assert isinstance(wrapper, ReverseWrapper)
+        self.wrapper = wrapper
+        self.props = props
+
+class ReturnType(TypeHandler):
+
+    def get_c_type(self):
+        raise NotImplementedError
+
+    def write_decl(self):
+        raise NotImplementedError
+
+    def write_error_return(self):
+        '''Write "return <value>" code in case of error'''
+        raise NotImplementedError
+
+    def write_conversion(self):
+        '''Writes code to convert Python return value in 'py_retval'
+        into C 'retval'.  Returns a string with C boolean expression
+        that determines if anything went wrong. '''
+        raise NotImplementedError
+
+class Parameter(TypeHandler):
+
+    def __init__(self, wrapper, name, **props):
+        TypeHandler.__init__(self, wrapper, **props)
+        self.name = name
+
+    def get_c_type(self):
+        raise NotImplementedError
+
+    def convert_c2py(self):
+        '''Write some code before calling the Python method.'''
+        pass
+
+    def format_for_c_proto(self):
+        return join_ctype_name(self.get_c_type(), self.name)
+
+
+###---
+class StringParam(Parameter):
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'char *').replace('const-', 'const ')
+
+    def convert_c2py(self):
+        if self.props.get('optional', False):
+            self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
+            self.wrapper.write_code(code=("if (%s)\n"
+                                          "    py_%s = PyString_FromString(%s);\n"
+                                          % (self.name, self.name, self.name)),
+                                    cleanup=("Py_XDECREF(py_%s);" % self.name))
+            self.wrapper.add_pyargv_item("py_%s" % self.name, optional=True)
+        else:
+            self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+            self.wrapper.write_code(code=("py_%s = PyString_FromString(%s);" %
+                                          (self.name, self.name)),
+                                    cleanup=("Py_DECREF(py_%s);" % self.name),
+                                    failure_expression=("!py_%s" % self.name))
+            self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+for ctype in ('char*', 'gchar*', 'const-char*', 'char-const*', 'const-gchar*',
+              'gchar-const*', 'string', 'static_string'):
+    argtypes.matcher.register_reverse(ctype, StringParam)
+del ctype
+
+class StringReturn(ReturnType):
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'char *').replace('const-', 'const ')
+    #return "char *"
+
+    def write_decl(self):
+        self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+        #self.wrapper.add_declaration("char *retval;")
+
+    def write_error_return(self):
+        self.wrapper.write_code("return NULL;")
+
+    def write_conversion(self):
+        self.wrapper.add_pyret_parse_item("s", "&retval", prepend=True)
+        self.wrapper.write_code("retval = g_strdup(retval);", code_sink=self.wrapper.post_return_code)
+
+for ctype in ('char*', 'gchar*', 'const-gchar*'):
+    argtypes.matcher.register_reverse_ret(ctype, StringReturn)
+del ctype
+
+
+class VoidReturn(ReturnType):
+
+    def get_c_type(self):
+        return "void"
+
+    def write_decl(self):
+        pass
+
+    def write_error_return(self):
+        self.wrapper.write_code("return;")
+
+    def write_conversion(self):
+        self.wrapper.write_code(
+            code=None,
+            failure_expression="py_retval != Py_None",
+            failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be None");')
+
+argtypes.matcher.register_reverse_ret('void', VoidReturn)
+argtypes.matcher.register_reverse_ret('none', VoidReturn)
+
+class GObjectParam(Parameter):
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'GObject *')
+
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
+        self.wrapper.write_code(code=("if (%s)\n"
+                                      "    py_%s = pygobject_new((GObject *) %s);\n"
+                                      "else {\n"
+                                      "    Py_INCREF(Py_None);\n"
+                                      "    py_%s = Py_None;\n"
+                                      "}"
+                                      % (self.name, self.name, self.name, self.name)),
+                                cleanup=("Py_DECREF(py_%s);" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse('GObject*', GObjectParam)
+
+class GObjectReturn(ReturnType):
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'GObject *')
+
+    def write_decl(self):
+        self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+
+    def write_error_return(self):
+        self.wrapper.write_code("return NULL;")
+
+    def write_conversion(self):
+        self.wrapper.write_code(
+            code=None,
+            failure_expression="!PyObject_TypeCheck(py_retval, &PyGObject_Type)",
+            failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be a GObject");')
+        self.wrapper.write_code("retval = (%s) pygobject_get(py_retval);"
+                                % self.get_c_type())
+        self.wrapper.write_code("g_object_ref((GObject *) retval);")
+
+argtypes.matcher.register_reverse_ret('GObject*', GObjectReturn)
+
+
+
+class IntParam(Parameter):
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'int')
+
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(code=("py_%s = PyInt_FromLong(%s);" %
+                                      (self.name, self.name)),
+                                cleanup=("Py_DECREF(py_%s);" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+class IntReturn(ReturnType):
+    def get_c_type(self):
+        return self.props.get('c_type', 'int')
+    def write_decl(self):
+        self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+    def write_error_return(self):
+        self.wrapper.write_code("return -G_MAXINT;")
+    def write_conversion(self):
+        self.wrapper.add_pyret_parse_item("i", "&retval", prepend=True)
+
+for argtype in ('int', 'gint', 'guint', 'short', 'gshort', 'gushort', 'long',
+                'glong', 'gsize', 'gssize', 'guint8', 'gint8', 'guint16',
+                'gint16', 'gint32', 'GTime'):
+    argtypes.matcher.register_reverse(argtype, IntParam)
+    argtypes.matcher.register_reverse_ret(argtype, IntReturn)
+del argtype
+
+class IntPtrParam(Parameter):
+    def __init__(self, wrapper, name, **props):
+        if "direction" not in props:
+            raise argtypes.ArgTypeConfigurationError(
+                "cannot use int* parameter without direction")
+        if props["direction"] not in ("out", "inout"):
+            raise argtypes.ArgTypeConfigurationError(
+                "cannot use int* parameter with direction '%s'"
+                % (props["direction"],))
+        Parameter.__init__(self, wrapper, name, **props)
+    def get_c_type(self):
+        return self.props.get('c_type', 'int*')
+    def convert_c2py(self):
+        if self.props["direction"] == "inout":
+            self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+            self.wrapper.write_code(code=("py_%s = PyInt_FromLong(*%s);" %
+                                          (self.name, self.name)),
+                                    cleanup=("Py_DECREF(py_%s);" % self.name))
+            self.wrapper.add_pyargv_item("py_%s" % self.name)
+        self.wrapper.add_pyret_parse_item("i", self.name)
+for argtype in ('int*', 'gint*'):
+    argtypes.matcher.register_reverse(argtype, IntPtrParam)
+del argtype
+
+
+class GEnumReturn(IntReturn):
+    def write_conversion(self):
+        self.wrapper.write_code(
+            code=None,
+            failure_expression=(
+            "pyg_enum_get_value(%s, py_retval, (gint *)&retval)"
+            % (self.props['typecode'],)))
+
+argtypes.matcher.register_reverse_ret("GEnum", GEnumReturn)
+
+class GEnumParam(IntParam):
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(code=("py_%s = pyg_enum_from_gtype(%s, %s);" %
+                                (self.name, self.props['typecode'], self.name)),
+                        cleanup=("Py_DECREF(py_%s);" % self.name),
+                        failure_expression=("!py_%s" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GEnum", GEnumParam)
+
+class GFlagsReturn(IntReturn):
+    def write_conversion(self):
+        self.wrapper.write_code(
+            code=None,
+            failure_expression=(
+            "pyg_flags_get_value(%s, py_retval, (gint *)&retval)" %
+            self.props['typecode']))
+
+argtypes.matcher.register_reverse_ret("GFlags", GFlagsReturn)
+
+class GFlagsParam(IntParam):
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(code=(
+            "py_%s = pyg_flags_from_gtype(%s, %s);" %
+            (self.name, self.props['typecode'], self.name)),
+                                cleanup=("Py_DECREF(py_%s);" % self.name),
+                                failure_expression=("!py_%s" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GFlags", GFlagsParam)
+
+
+class GtkTreePathParam(IntParam):
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(code=(
+            "py_%s = pygtk_tree_path_to_pyobject(%s);" %
+            (self.name, self.name)),
+                                cleanup=("Py_DECREF(py_%s);" % self.name),
+                                failure_expression=("!py_%s" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GtkTreePath*", GtkTreePathParam)
+
+
+class GtkTreePathReturn(ReturnType):
+    def get_c_type(self):
+        return self.props.get('c_type', 'GtkTreePath *')
+    def write_decl(self):
+        self.wrapper.add_declaration("GtkTreePath * retval;")
+    def write_error_return(self):
+        self.wrapper.write_code("return NULL;")
+    def write_conversion(self):
+        self.wrapper.write_code(
+            "retval = pygtk_tree_path_from_pyobject(py_retval);\n",
+            failure_expression=('!retval'),
+            failure_exception=(
+    'PyErr_SetString(PyExc_TypeError, "retval should be a GtkTreePath");'))
+
+argtypes.matcher.register_reverse_ret("GtkTreePath*", GtkTreePathReturn)
+
+
+class BooleanReturn(ReturnType):
+    def get_c_type(self):
+        return "gboolean"
+    def write_decl(self):
+        self.wrapper.add_declaration("gboolean retval;")
+        self.wrapper.add_declaration("PyObject *py_main_retval;")
+    def write_error_return(self):
+        self.wrapper.write_code("return FALSE;")
+    def write_conversion(self):
+        self.wrapper.add_pyret_parse_item("O", "&py_main_retval", prepend=True)
+        self.wrapper.write_code(
+            "retval = PyObject_IsTrue(py_main_retval)? TRUE : FALSE;",
+            code_sink=self.wrapper.post_return_code)
+argtypes.matcher.register_reverse_ret("gboolean", BooleanReturn)
+
+class BooleanParam(Parameter):
+    def get_c_type(self):
+        return "gboolean"
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code("py_%s = %s? Py_True : Py_False;"
+                                % (self.name, self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("gboolean", BooleanParam)
+
+
+class DoubleParam(Parameter):
+    def get_c_type(self):
+        return self.props.get('c_type', 'gdouble')
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(code=("py_%s = PyFloat_FromDouble(%s);" %
+                                      (self.name, self.name)),
+                                cleanup=("Py_DECREF(py_%s);" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+class DoublePtrParam(Parameter):
+    def __init__(self, wrapper, name, **props):
+        if "direction" not in props:
+            raise argtypes.ArgTypeConfigurationError(
+                "cannot use double* parameter without direction")
+        if props["direction"] not in ("out", ): # inout not yet implemented
+            raise argtypes.ArgTypeConfigurationError(
+                "cannot use double* parameter with direction '%s'"
+                % (props["direction"],))
+        Parameter.__init__(self, wrapper, name, **props)
+    def get_c_type(self):
+        return self.props.get('c_type', 'double*')
+    def convert_c2py(self):
+        self.wrapper.add_pyret_parse_item("d", self.name)
+for argtype in ('double*', 'gdouble*'):
+    argtypes.matcher.register_reverse(argtype, DoublePtrParam)
+del argtype
+
+class DoubleReturn(ReturnType):
+    def get_c_type(self):
+        return self.props.get('c_type', 'gdouble')
+    def write_decl(self):
+        self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+    def write_error_return(self):
+        self.wrapper.write_code("return -G_MAXFLOAT;")
+    def write_conversion(self):
+        self.wrapper.write_code(
+            code=None,
+            failure_expression="!PyFloat_AsDouble(py_retval)",
+            failure_exception=
+            'PyErr_SetString(PyExc_TypeError, "retval should be a float");')
+        self.wrapper.write_code("retval = PyFloat_AsDouble(py_retval);")
+
+for argtype in ('float', 'double', 'gfloat', 'gdouble'):
+    argtypes.matcher.register_reverse(argtype, DoubleParam)
+    argtypes.matcher.register_reverse_ret(argtype, DoubleReturn)
+
+
+class GBoxedParam(Parameter):
+    def get_c_type(self):
+        return self.props.get('c_type').replace('const-', 'const ')
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        ctype = self.get_c_type()
+        if ctype.startswith('const '):
+            ctype_no_const = ctype[len('const '):]
+            self.wrapper.write_code(
+                code=('py_%s = pyg_boxed_new(%s, (%s) %s, TRUE, TRUE);' %
+                      (self.name, self.props['typecode'],
+                       ctype_no_const, self.name)),
+                cleanup=("Py_DECREF(py_%s);" % self.name))
+        else:
+            self.wrapper.write_code(
+                code=('py_%s = pyg_boxed_new(%s, %s, FALSE, FALSE);' %
+                      (self.name, self.props['typecode'], self.name)),
+                cleanup=("Py_DECREF(py_%s);" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GBoxed", GBoxedParam)
+
+
+class GBoxedReturn(ReturnType):
+    def get_c_type(self):
+        return self.props.get('c_type')
+    def write_decl(self):
+        self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+    def write_error_return(self):
+        self.wrapper.write_code("return retval;")
+    def write_conversion(self):
+        self.wrapper.write_code(code = None,
+            failure_expression=("!pyg_boxed_check(py_retval, %s)" %
+                                (self.props['typecode'],)),
+            failure_exception=(
+            'PyErr_SetString(PyExc_TypeError, "retval should be a %s");'
+            % (self.props['typename'],)))
+        self.wrapper.write_code('retval = pyg_boxed_get(py_retval, %s);' %
+                                self.props['typename'])
+
+argtypes.matcher.register_reverse_ret("GBoxed", GBoxedReturn)
+
+
+class GdkRegionPtrReturn(GBoxedReturn):
+    def write_error_return(self):
+        self.wrapper.write_code("return gdk_region_new();")
+    def write_conversion(self):
+        self.props['typecode'] = 'PYGDK_TYPE_REGION'
+        self.props['typename'] = 'GdkRegion'
+        super(GdkRegionPtrReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("GdkRegion*", GdkRegionPtrReturn)
+
+
+class PangoFontDescriptionReturn(GBoxedReturn):
+    def write_error_return(self):
+        self.wrapper.write_code("return pango_font_description_new();")
+    def write_conversion(self):
+        self.props['typecode'] = 'PANGO_TYPE_FONT_DESCRIPTION'
+        self.props['typename'] = 'PangoFontDescription'
+        super(PangoFontDescriptionReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("PangoFontDescription*",
+                                      PangoFontDescriptionReturn)
+
+
+class PangoFontMetricsReturn(GBoxedReturn):
+    def write_error_return(self):
+        self.wrapper.write_code("return pango_font_metrics_new();")
+    def write_conversion(self):
+        self.props['typecode'] = 'PANGO_TYPE_FONT_METRICS'
+        self.props['typename'] = 'PangoFontMetrics'
+        super(PangoFontMetricsReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("PangoFontMetrics*",
+                                      PangoFontMetricsReturn)
+
+
+class PangoLanguageReturn(GBoxedReturn):
+    def write_error_return(self):
+        self.wrapper.write_code("return pango_language_from_string(\"\");")
+    def write_conversion(self):
+        self.props['typecode'] = 'PANGO_TYPE_LANGUAGE'
+        self.props['typename'] = 'PangoLanguage'
+        super(PangoLanguageReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("PangoLanguage*", PangoLanguageReturn)
+
+
+class GdkRectanglePtrParam(Parameter):
+    def get_c_type(self):
+        return self.props.get('c_type').replace('const-', 'const ')
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(
+            code=('py_%s = pyg_boxed_new(GDK_TYPE_RECTANGLE, %s, TRUE, TRUE);' %
+                  (self.name, self.name)),
+            cleanup=("Py_DECREF(py_%s);" % self.name))
+        self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GdkRectangle*", GdkRectanglePtrParam)
+argtypes.matcher.register_reverse('GtkAllocation*', GdkRectanglePtrParam)
+
+
+class PyGObjectMethodParam(Parameter):
+    def __init__(self, wrapper, name, method_name, **props):
+        Parameter.__init__(self, wrapper, name, **props)
+        self.method_name = method_name
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'GObject *')
+
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+        self.wrapper.write_code(code=("py_%s = pygobject_new((GObject *) %s);" %
+                                      (self.name, self.name)),
+                                cleanup=("Py_DECREF(py_%s);" % self.name),
+                                failure_expression=("!py_%s" % self.name))
+        self.wrapper.set_call_target("py_%s" % self.name, self.method_name)
+
+
+class CallbackInUserDataParam(Parameter):
+    def __init__(self, wrapper, name, free_it, **props):
+        Parameter.__init__(self, wrapper, name, **props)
+        self.free_it = free_it
+
+    def get_c_type(self):
+        return "gpointer"
+
+    def convert_c2py(self):
+        self.wrapper.add_declaration("PyObject **_user_data;")
+        cleanup = self.free_it and ("g_free(%s);" % self.name) or None
+        self.wrapper.write_code(code=("_real_user_data = (PyObject **) %s;"
+                                      % self.name),
+                                cleanup=cleanup)
+
+        self.wrapper.add_declaration("PyObject *py_func;")
+        cleanup = self.free_it and "Py_DECREF(py_func);" or None
+        self.wrapper.write_code(code="py_func = _user_data[0];",
+                                cleanup=cleanup)
+        self.wrapper.set_call_target("py_func")
+
+        self.wrapper.add_declaration("PyObject *py_user_data;")
+        cleanup = self.free_it and "Py_XDECREF(py_user_data);" or None
+        self.wrapper.write_code(code="py_user_data = _user_data[1];",
+                                cleanup=cleanup)
+        self.wrapper.add_pyargv_item("py_user_data", optional=True)
+
+def _test():
+    import sys
+
+    if 1:
+        wrapper = ReverseWrapper("this_is_the_c_function_name", is_static=True)
+        wrapper.set_return_type(StringReturn(wrapper))
+        wrapper.add_parameter(PyGObjectMethodParam(wrapper, "self", method_name="do_xxx"))
+        wrapper.add_parameter(StringParam(wrapper, "param2", optional=True))
+        wrapper.add_parameter(GObjectParam(wrapper, "param3"))
+        #wrapper.add_parameter(InoutIntParam(wrapper, "param4"))
+        wrapper.generate(FileCodeSink(sys.stderr))
+
+    if 0:
+        wrapper = ReverseWrapper("this_a_callback_wrapper")
+        wrapper.set_return_type(VoidReturn(wrapper))
+        wrapper.add_parameter(StringParam(wrapper, "param1", optional=False))
+        wrapper.add_parameter(GObjectParam(wrapper, "param2"))
+        wrapper.add_parameter(CallbackInUserDataParam(wrapper, "data", free_it=True))
+        wrapper.generate(FileCodeSink(sys.stderr))
+
+if __name__ == '__main__':
+    _test()
Index: pkg/pygtk/branches/upstream/current/codegen/override.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/override.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/override.py	(revision 4)
@@ -0,0 +1,281 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+# this file contains code for loading up an override file.  The override file
+# provides implementations of functions where the code generator could not
+# do its job correctly.
+
+import fnmatch
+import os
+import re
+import string
+import sys
+
+def class2cname(klass, method):
+    c_name = ''
+    for c in klass:
+        if c.isupper():
+            c_name += '_' + c.lower()
+        else:
+            c_name += c
+    return c_name[1:] + '_'  + method
+
+import_pat = re.compile(r'\s*import\s+(\S+)\.([^\s.]+)\s+as\s+(\S+)')
+
+class Overrides:
+    def __init__(self, filename=None):
+        self.modulename = None
+        self.ignores = {}
+        self.glob_ignores = []
+        self.type_ignores = {}
+        self.overrides = {}
+        self.overridden = {}
+        self.kwargs = {}
+        self.noargs = {}
+        self.onearg = {}
+        self.staticmethod = {}
+        self.classmethod = {}
+        self.startlines = {}
+        self.override_attrs = {}
+        self.override_slots = {}
+        self.headers = ''
+        self.body = ''
+        self.init = ''
+        self.imports = []
+        self.defines = {}
+        self.functions = {}
+        self.newstyle_constructors = {}
+        self.dynamicnamespace = False
+        if filename:
+            self.handle_file(filename)
+
+    def handle_file(self, filename):
+        oldpath = os.getcwd()
+
+        fp = open(filename, 'r')
+        dirname = os.path.dirname(os.path.abspath(filename))
+
+        if dirname != oldpath:
+            os.chdir(dirname)
+
+        # read all the components of the file ...
+        bufs = []
+        startline = 1
+        lines = []
+        line = fp.readline()
+        linenum = 1
+        while line:
+            if line == '%%\n' or line == '%%':
+                if lines:
+                    bufs.append((string.join(lines, ''), startline))
+                startline = linenum + 1
+                lines = []
+            else:
+                lines.append(line)
+            line = fp.readline()
+            linenum = linenum + 1
+        if lines:
+            bufs.append((string.join(lines, ''), startline))
+        if not bufs: return
+
+        for buf, startline in bufs:
+            self.__parse_override(buf, startline, filename)
+
+        os.chdir(oldpath)
+
+    def __parse_override(self, buffer, startline, filename):
+        pos = string.find(buffer, '\n')
+        if pos >= 0:
+            line = buffer[:pos]
+            rest = buffer[pos+1:]
+        else:
+            line = buffer ; rest = ''
+        words = string.split(line)
+        command = words[0]
+        if (command == 'ignore' or
+            command == 'ignore-' + sys.platform):
+            "ignore/ignore-platform [functions..]"
+            for func in words[1:]:
+                self.ignores[func] = 1
+            for func in string.split(rest):
+                self.ignores[func] = 1
+        elif (command == 'ignore-glob' or
+              command == 'ignore-glob-' + sys.platform):
+            "ignore-glob/ignore-glob-platform [globs..]"
+            for func in words[1:]:
+                self.glob_ignores.append(func)
+            for func in string.split(rest):
+                self.glob_ignores.append(func)
+        elif (command == 'ignore-type' or
+              command == 'ignore-type-' + sys.platform):
+            "ignore-type/ignore-type-platform [typenames..]"
+            for typename in words[1:]:
+                self.type_ignores[typename] = 1
+            for typename in string.split(rest):
+                self.type_ignores[typename] = 1
+        elif command == 'override':
+            "override function/method [kwargs|noargs|onearg] [staticmethod|classmethod]"
+            func = words[1]
+            if 'kwargs' in words[1:]:
+                self.kwargs[func] = 1
+            elif 'noargs' in words[1:]:
+                self.noargs[func] = 1
+            elif 'onearg' in words[1:]:
+                self.onearg[func] = True
+
+            if 'staticmethod' in words[1:]:
+                self.staticmethod[func] = True
+            elif 'classmethod' in words[1:]:
+                self.classmethod[func] = True
+            if func in self.overrides:
+                raise RuntimeError("Function %s is being overridden more than once" % (func,))
+            self.overrides[func] = rest
+            self.startlines[func] = (startline + 1, filename)
+        elif command == 'override-attr':
+            "override-slot Class.attr"
+            attr = words[1]
+            self.override_attrs[attr] = rest
+            self.startlines[attr] = (startline + 1, filename)
+        elif command == 'override-slot':
+            "override-slot Class.slot"
+            slot = words[1]
+            self.override_slots[slot] = rest
+            self.startlines[slot] = (startline + 1, filename)
+        elif command == 'headers':
+            "headers"
+            self.headers = '%s\n#line %d "%s"\n%s' % \
+                           (self.headers, startline + 1, filename, rest)
+        elif command == 'body':
+            "body"
+            self.body = '%s\n#line %d "%s"\n%s' % \
+                           (self.body, startline + 1, filename, rest)
+        elif command == 'init':
+            "init"
+            self.init = '%s\n#line %d "%s"\n%s' % \
+                        (self.init, startline + 1, filename, rest)
+        elif command == 'modulename':
+            "modulename name"
+            self.modulename = words[1]
+        elif command == 'include':
+            "include filename"
+            for filename in words[1:]:
+                self.handle_file(filename)
+            for filename in string.split(rest):
+                self.handle_file(filename)
+        elif command == 'import':
+            "import module1 [\n module2, \n module3 ...]"
+            for line in string.split(buffer, '\n'):
+                match = import_pat.match(line)
+                if match:
+                    self.imports.append(match.groups())
+        elif command == 'define':
+            "define funcname [kwargs|noargs|onearg] [classmethod|staticmethod]"
+            "define Class.method [kwargs|noargs|onearg] [classmethod|staticmethod]"
+            func = words[1]
+            klass = None
+            if func.find('.') != -1:
+                klass, func = func.split('.', 1)
+
+                if not self.defines.has_key(klass):
+                    self.defines[klass] = {}
+                self.defines[klass][func] = rest
+            else:
+                self.functions[func] = rest
+
+            if 'kwargs' in words[1:]:
+                self.kwargs[func] = 1
+            elif 'noargs' in words[1:]:
+                self.noargs[func] = 1
+            elif 'onearg' in words[1:]:
+                self.onearg[func] = 1
+
+            if 'staticmethod' in words[1:]:
+                self.staticmethod[func] = True
+            elif 'classmethod' in words[1:]:
+                self.classmethod[func] = True
+
+            self.startlines[func] = (startline + 1, filename)
+
+        elif command == 'new-constructor':
+            "new-constructor GType"
+            gtype, = words[1:]
+            self.newstyle_constructors[gtype] = True
+        elif command == 'options':
+            for option in words[1:]:
+                if option == 'dynamicnamespace':
+                    self.dynamicnamespace = True
+
+    def is_ignored(self, name):
+        if self.ignores.has_key(name):
+            return 1
+        for glob in self.glob_ignores:
+            if fnmatch.fnmatchcase(name, glob):
+                return 1
+        return 0
+
+    def is_type_ignored(self, name):
+        return name in self.type_ignores
+
+    def is_overriden(self, name):
+        return self.overrides.has_key(name)
+
+    def is_already_included(self, name):
+        return self.overridden.has_key(name)
+
+    def override(self, name):
+        self.overridden[name] = 1
+        return self.overrides[name]
+
+    def define(self, klass, name):
+        self.overridden[class2cname(klass, name)] = 1
+        return self.defines[klass][name]
+
+    def function(self, name):
+        return self.functions[name]
+
+    def getstartline(self, name):
+        return self.startlines[name]
+
+    def wants_kwargs(self, name):
+        return self.kwargs.has_key(name)
+
+    def wants_noargs(self, name):
+        return self.noargs.has_key(name)
+
+    def wants_onearg(self, name):
+        return self.onearg.has_key(name)
+
+    def is_staticmethod(self, name):
+        return self.staticmethod.has_key(name)
+
+    def is_classmethod(self, name):
+        return self.classmethod.has_key(name)
+
+    def attr_is_overriden(self, attr):
+        return self.override_attrs.has_key(attr)
+
+    def attr_override(self, attr):
+        return self.override_attrs[attr]
+
+    def slot_is_overriden(self, slot):
+        return self.override_slots.has_key(slot)
+
+    def slot_override(self, slot):
+        return self.override_slots[slot]
+
+    def get_headers(self):
+        return self.headers
+
+    def get_body(self):
+        return self.body
+
+    def get_init(self):
+        return self.init
+
+    def get_imports(self):
+        return self.imports
+
+    def get_defines_for(self, klass):
+        return self.defines.get(klass, {})
+
+    def get_functions(self):
+        return self.functions
Index: pkg/pygtk/branches/upstream/current/codegen/scmexpr.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/scmexpr.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/scmexpr.py	(revision 4)
@@ -0,0 +1,143 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+from __future__ import generators
+
+import string
+from cStringIO import StringIO
+
+class error(Exception):
+    def __init__(self, filename, lineno, msg):
+        Exception.__init__(self, msg)
+        self.filename = filename
+        self.lineno = lineno
+        self.msg = msg
+    def __str__(self):
+        return '%s:%d: error: %s' % (self.filename, self.lineno, self.msg)
+
+trans = [' '] * 256
+for i in range(256):
+    if chr(i) in string.letters + string.digits + '_':
+        trans[i] = chr(i)
+    else:
+        trans[i] = '_'
+trans = string.join(trans, '')
+
+def parse(filename):
+    if isinstance(filename, str):
+        fp = open(filename, 'r')
+    else: # if not string, assume it is some kind of iterator
+        fp = filename
+        filename = getattr(fp, 'name', '<unknown>')
+    whitespace = ' \t\n\r\x0b\x0c'
+    nonsymbol = whitespace + '();\'"'
+    stack = []
+    openlines = []
+    lineno = 0
+    for line in fp:
+        pos = 0
+        lineno += 1
+        while pos < len(line):
+            if line[pos] in whitespace: # ignore whitespace
+                pass
+            elif line[pos] == ';': # comment
+                break
+            elif line[pos:pos+2] == "'(":
+                pass # the open parenthesis will be handled next iteration
+            elif line[pos] == '(':
+                stack.append(())
+                openlines.append(lineno)
+            elif line[pos] == ')':
+                if len(stack) == 0:
+                    raise error(filename, lineno, 'close parenthesis found when none open')
+                closed = stack[-1]
+                del stack[-1]
+                del openlines[-1]
+                if stack:
+                    stack[-1] += (closed,)
+                else:
+                    yield closed
+            elif line[pos] == '"': # quoted string
+                if not stack:
+                    raise error(filename, lineno,
+                                'string found outside of s-expression')
+                endpos = pos + 1
+                chars = []
+                while endpos < len(line):
+                    if endpos+1 < len(line) and line[endpos] == '\\':
+                        endpos += 1
+                        if line[endpos] == 'n':
+                            chars.append('\n')
+                        elif line[endpos] == 'r':
+                            chars.append('\r')
+                        elif line[endpos] == 't':
+                            chars.append('\t')
+                        else:
+                            chars.append('\\')
+                            chars.append(line[endpos])
+                    elif line[endpos] == '"':
+                        break
+                    else:
+                        chars.append(line[endpos])
+                    endpos += 1
+                if endpos >= len(line):
+                    raise error(filename, lineno, "unclosed quoted string")
+                pos = endpos
+                stack[-1] += (''.join(chars),)
+            else: # symbol/number
+                if not stack:
+                    raise error(filename, lineno,
+                                'identifier found outside of s-expression')
+                endpos = pos
+                while endpos < len(line) and line[endpos] not in nonsymbol:
+                    endpos += 1
+                symbol = line[pos:endpos]
+                pos = max(pos, endpos-1)
+                try: symbol = int(symbol)
+                except ValueError:
+                    try: symbol = float(symbol)
+                    except ValueError: pass
+                stack[-1] += (symbol,)
+            pos += 1
+    if len(stack) != 0:
+        msg = '%d unclosed parentheses found at end of ' \
+              'file (opened on line(s) %s)' % (len(stack),
+                                               ', '.join(map(str, openlines)))
+        raise error(filename, lineno, msg)
+
+class Parser:
+    def __init__(self, filename):
+        """Argument is either a string, a parse tree, or file object"""
+        self.filename = filename
+    def startParsing(self, filename=None):
+        statements = parse(filename or self.filename)
+        for statement in statements:
+            self.handle(statement)
+    def handle(self, tup):
+        cmd = string.translate(tup[0], trans)
+        if hasattr(self, cmd):
+            getattr(self, cmd)(*tup[1:])
+        else:
+            self.unknown(tup)
+    def unknown(self, tup):
+        pass
+
+_testString = """; a scheme file
+(define-func gdk_font_load    ; a comment at end of line
+  GdkFont
+  ((string name)))
+
+(define-boxed GdkEvent
+  gdk_event_copy
+  gdk_event_free
+  "sizeof(GdkEvent)")
+"""
+
+if __name__ == '__main__':
+    import sys
+    if sys.argv[1:]:
+        fp = open(sys.argv[1])
+    else:
+        fp = StringIO(_testString)
+    statements = parse(fp)
+    for s in statements:
+        print `s`
Index: pkg/pygtk/branches/upstream/current/codegen/Makefile.am
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/Makefile.am	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/Makefile.am	(revision 4)
@@ -0,0 +1,23 @@
+PLATFORM_VERSION = 2.0
+
+bin_SCRIPTS = pygtk-codegen-$(PLATFORM_VERSION)
+
+codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
+
+codegen_PYTHON = \
+	__init__.py \
+	argtypes.py \
+	reversewrapper.py \
+	codegen.py \
+	definitions.py \
+	defsparser.py \
+	docextract.py \
+	docgen.py \
+	h2def.py \
+	createdefs.py \
+	mergedefs.py \
+	mkskel.py \
+	override.py \
+	scmexpr.py
+
+EXTRA_DIST = README.defs pygtk-codegen-$(PLATFORM_VERSION).in
Index: pkg/pygtk/branches/upstream/current/codegen/mkskel.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/mkskel.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/mkskel.py	(revision 4)
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import sys, os, getopt
+
+module_init_template = \
+'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \
+'#ifdef HAVE_CONFIG_H\n' + \
+'#  include "config.h"\n' + \
+'#endif\n' + \
+'#include <Python.h>\n' + \
+'#include <pygtk.h>\n' + \
+'\n' + \
+'/* include any extra headers needed here */\n' + \
+'\n' + \
+'void %(prefix)s_register_classes(PyObject *d);\n' + \
+'extern PyMethodDef %(prefix)s_functions[];\n' + \
+'\n' + \
+'DL_EXPORT(void)\n' + \
+'init%(module)s(void)\n' + \
+'{\n' + \
+'    PyObject *m, *d;\n' + \
+'\n' + \
+'    /* perform any initialisation required by the library here */\n' + \
+'\n' + \
+'    m = Py_InitModule("%(module)s", %(prefix)s_functions);\n' + \
+'    d = PyModule_GetDict(m);\n' + \
+'\n' + \
+'    init_pygtk();\n' + \
+'\n' + \
+'    %(prefix)s_register_classes(d);\n' + \
+'\n' + \
+'    /* add anything else to the module dictionary (such as constants) */\n' +\
+'\n' + \
+'    if (PyErr_Occurred())\n' + \
+'        Py_FatalError("could not initialise module %(module)s");\n' + \
+'}\n'
+
+override_template = \
+'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \
+'%%%%\n' + \
+'headers\n' + \
+'/* include any required headers here */\n' + \
+'%%%%\n' + \
+'init\n' + \
+'    /* include any code here that needs to be executed before the\n' + \
+'     * extension classes get initialised */\n' + \
+'%%%%\n' + \
+'\n' + \
+'/* you should add appropriate ignore, ignore-glob and\n' + \
+' * override sections here */\n'
+
+def open_with_backup(file):
+    if os.path.exists(file):
+        try:
+            os.rename(file, file+'~')
+        except OSError:
+            # fail silently if we can't make a backup
+            pass
+    return open(file, 'w')
+
+def write_skels(fileprefix, prefix, module):
+    fp = open_with_backup(fileprefix+'module.c')
+    fp.write(module_init_template % { 'prefix': prefix, 'module': module })
+    fp.close()
+    fp = open_with_backup(fileprefix+'.override')
+    fp.write(override_template % { 'prefix': prefix, 'module': module })
+    fp.close()
+
+if __name__ == '__main__':
+    opts, args = getopt.getopt(sys.argv[1:], 'f:p:m:h',
+                               ['file-prefix=', 'prefix=', 'module=', 'help'])
+    fileprefix = None
+    prefix = None
+    module = None
+    for opt, arg in opts:
+        if opt in ('-f', '--file-prefix'):
+            fileprefix = arg
+        elif opt in ('-p', '--prefix'):
+            prefix = arg
+        elif opt in ('-m', '--module'):
+            module = arg
+        elif opt in ('-h', '--help'):
+            print 'usage: mkskel.py -f fileprefix -p prefix -m module'
+            sys.exit(0)
+    if not fileprefix or not prefix or not module:
+        print 'usage: mkskel.py -f fileprefix -p prefix -m module'
+        sys.exit(1)
+    write_skels(fileprefix, prefix, module)
Index: pkg/pygtk/branches/upstream/current/codegen/README.defs
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/README.defs	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/README.defs	(revision 4)
@@ -0,0 +1,351 @@
+   ChangeLog for this draft:
+    - caller-owns-return attribute on functions/methods
+    - include gtk-type-id in the type alias system
+    - c-name for types converted to in-c-name out-c-name inout-c-name
+    - merge unref-func and destroy-func for boxed types into release-func
+
+    - split structs out of boxed types
+    - c-declaration field
+    - special "native" type alias; bail and use C declaration when
+   necessary
+    - defined objects and boxeds automatically create a module
+    - make constructors functions and not methods, in appropriate
+      object/boxed module
+
+   Draft =========================
+
+   The overall syntax is:
+
+        (type-of-thing-being-defined name-used-to-refer-to-this-thing
+          (attribute-name attribute-value-depending-on-the-attribute)
+          (attribute-name attribute-value-depending-on-the-attribute)
+          (attribute-name attribute-value-depending-on-the-attribute))
+
+   Some definitions can have a c-declaration field that gives the C code
+   we parsed to arrive at the definition. The c-declaration is a quoted
+   string because it can contain parentheses and such.
+
+   Defined types and their attributes:
+
+   ===
+   (module module-name
+     (submodule-of module-name)) ;; submodule is optional
+
+   Ex: (module Gtk)
+   Ex: (module Rgb
+         (submodule-of Gdk))
+
+   modules are later referred to with a list of module names, like
+   (Gdk Rgb) or (Gtk)
+
+   Object and boxed type definitions automatically create a submodule.
+   For example, GtkCList creates the module (module CList (submodule-of
+   (Gtk))) which is referred to as module (Gtk CList).
+
+   ===
+
+   (type
+    (alias some-unique-identifier)
+    (in-module module-name) ;; optional, gchar* is not in a module
+    (gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
+                                     ;; in the type system
+    (in-c-name name-of-symbol-in-C)
+    (out-c-name name-of-symbol-in-C)
+    (inout-c-name name-of-symbol-in-C))
+
+   Ex: (type
+        (alias string)
+        (gtk-type-id GTK_TYPE_STRING)
+        (in-c-name const-gchar*)
+        (out-c-name gchar**) ;; actually I'm not sure how strings work
+   out/inout
+        (inout-c-name gchar*))
+
+    ;; This one would be implied by the (object) def for GtkWidget I
+    ;; think - (type) is only required for types that are not implied
+    ;; by other definitions, such as int/boolean/etc.
+
+       (type
+        (alias GtkWidget)
+        (in-module (Gtk))
+        (gtk-type-id GTK_TYPE_WIDGET)
+        (in-c-name GtkWidget*)
+        (inout-c-name GtkWidget*)
+        (out-c-name GtkWidget**))
+
+   "Type" bindings are automatically assumed for objects, boxed types,
+   etc. as defined below.
+
+   The alias field is used to refer to the type later on.
+
+   If the C type has spaces they are converted to hyphens after
+   compressing all syntactically significant whitespace to a single
+   space:
+    (type
+       (alias const-gchar*
+        (c-name const-gchar*)))
+
+   So hyphens have to go back to spaces for binding generators that
+   output C code.
+
+   Whenever a type alias can be used, it is also possible to use the
+   keyword "native", which implies that the type in question is too
+   C-specific to represent. Then a c-declaration will typically be
+   available for use.
+
+   C types containing [] or () are function pointers or arrays. For
+   arrays that don't specify a size, we just treat them as pointers. For
+   function pointers, we need special (type) syntax/attributes of some
+   kind, but since there basically aren't any of these right now in the
+   libs we care about we can just ignore them. For arrays that specify a
+   size ditto, you would handle them by adding an (array-size) attribute
+   or something or using the "native" keyword and skipping the (type)
+   stuff.
+
+   ===
+   (object object-name
+      (in-module module-name-list)
+      (parent object-name optional-module-name-if-different)
+      (abstract boolean-is-abstract-class) ;; omit for default of #f
+      (c-name name-of-the-object-in-C)
+      (field (type-and-name type-alias-of-struct-field
+   name-of-struct-field)
+             (access read-or-write-or-readwrite)))
+
+
+   Ex: (object Widget
+         (in-module (Gtk))
+         (parent Object) ;; could say (parent Object (Gtk))
+         (abstract #t)
+         (c-name GtkWidget)
+         (field (type-and-name GdkWindow* window) (access read)))
+
+   An "object" declaration automatically implies the type definition:
+
+   (type
+     (alias concat-module-elements-and-object-name)
+     (in-c-name pointer-to-c-name)
+     (out-c-name pointer-to-pointer-to-c-name)
+     (inout-c-name pointer-to-c-name))
+
+   Ex:
+    (type (alias GtkWidget)
+          (in-c-name GtkWidget*)
+          (out-c-name GtkWidget**)
+          (inout-c-name GtkWidget*))
+
+   It also implies a module that is the name broken into parts:
+    (module CTree
+      (submodule-of Gtk))
+
+   ===
+
+   (function function-name
+     (in-module module-name-list) ;; "static methods" go in their
+                                  ;; object's module
+     (is-constructor-of object-type-alias) ;; optional, marks a
+   constructor
+     (c-name function-name)
+     (return-type return-value-type) ;; defaults to void
+     (caller-owns-return boolean-value) ;; defaults to #f
+     (parameter in-or-out-or-inout
+         (type-and-name parameter-type-alias parameter-name)
+         (c-declaration "c-type-and-name")) ;; c-declaration only
+   required
+                                            ;; if the type alias is
+   "native"
+     (varargs #t) ;; has varargs at the end
+   )
+
+   Ex:
+     (function init
+       (in-module (Gdk Rgb)
+       (c-name gdk_rgb_init)))
+
+   Ex:
+     (function new
+       (in-module (Gdk Rgb Cmap))
+       (is-constructor-of GdkRgbCmap)
+       (c-name gdk_rgb_cmap_new)
+       (return-type GdkRgbCmap)
+       (caller-owns-return #t) ;; perhaps this could be implied by
+   is-constructor-of
+       (parameter in (type-and-name array-of-guint32 colors))
+       (parameter in (type-and-name gint n_colors)))
+
+   Ex:
+     (function config_set_set_handler
+      (in-module (Gnome))
+      (c-name gnome_config_set_set_handler)
+      (parameter in (type-and-name native func)
+                    (c-declaration "void (*func)(void*)"))
+      (parameter in (type-and-name gpointer data)))
+
+   ===
+   (method method-name
+     (of-object object-name module-name)
+     ;; retval/arg attributes as for (function), but with first parameter
+
+     ;; omitted for non-constructors
+      )
+
+   Ex:
+     (method set_text
+        (of-object Label (Gtk))
+        (parameter (type-and-name const-gchar* str)))
+
+   ===
+   (object-argument arg-name
+      (of-object object-we-are-an-argument-of optional-objects-module)
+      (type argument-type) ;; not sure what to put for type
+      ;; flags all default to #f
+      (readable bool-value)
+      (writeable bool-value)
+      (run-action bool-value)
+      (construct-only bool-value))
+
+   Ex:
+     (object-argument label
+        (of-object Label (Gtk))
+        (type gchar*) ;; ????
+        (readable #t)
+        (writeable #t))
+
+   ===
+   (signal signal-name
+     (of-object object-we-are-a-signal-of optional-objects-module)
+     ;; return value and parameters as for a function, omitting the
+   object
+     ;; and user data parameters
+
+     ;; what other properties matter for a signal?
+   )
+
+   Ex:
+     (signal select_row
+        (of-object CList (Gtk))
+        ;; return type defaults to void
+        (parameter in (type-and-name gint row))
+        (parameter in (type-and-name gint column))
+        (parameter in (type-and-name GdkEvent* event)))
+
+   ===
+   (enum enum-name
+     (in-module modname)
+     (c-name name-in-c)
+     (value (name value-name-noprefixes-hyphen-lowercase) (c-name
+   value-c-name)))
+
+   Ex:
+
+     (enum DirectionType
+       (in-module Gtk)
+       (c-name GtkDirectionType)
+       (value (name tab-forward) (c-name GTK_DIR_TAB_FORWARD))
+       (value (name tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
+       (value (name up) (c-name GTK_DIR_UP))
+       (value (name down) (c-name GTK_DIR_DOWN))
+       (value (name left) (c-name GTK_DIR_LEFT))
+       (value (name right) (c-name GTK_DIR_RIGHT)))
+
+     (enum Pos
+       (in-module (Gtk CTree))
+       (c-name GtkCTreePos)
+       (value (name before) (c-name GTK_CTREE_POS_BEFORE))
+       (value (name as-child) (c-name GTK_CTREE_POS_AS_CHILD))
+       (value (name after) (c-name GTK_CTREE_POS_AFTER)))
+
+   ===
+   (flags) is just like enum, but some bindings may wrap enums and flags
+   differently.
+
+   ===
+
+   (boxed boxed-name
+     (in-module modname)
+     (c-name c-name)
+     (ref-func func-to-increase-refcount)
+     (copy-func func-to-copy)
+     (release-func func-to-destroy-or-decrement-refcount)
+     (field (type-and-name type-alias-of-struct-field
+   name-of-struct-field) (access access-rule)))
+
+   It is never OK to use memcpy() to copy a boxed type, or use
+   malloc()/free() to alloc/free one.
+
+   Ex:
+
+    (boxed Pixmap
+      (in-module (Gdk))
+      (c-name GdkPixmap)
+      (ref-func pixmap_ref)
+      (unref-func pixmap_unref))
+
+   An "object" declaration automatically implies the type definition:
+
+   (type
+     (alias concat-module-elements-and-boxed-name)
+     (in-c-name pointer-to-c-name)
+     (out-c-name pointer-to-pointer-to-c-name)
+     (inout-c-name pointer-to-c-name))
+
+   Ex:
+    (type (alias GdkPixmap)
+          (in-c-name GdkPixmap*)
+          (out-c-name GdkPixmap**)
+          (inout-c-name GdkPixmap*))
+
+   ===
+
+   (struct struct-name
+     (in-module modname)
+     (c-name c-name)
+     (field (type-and-name type-alias-of-struct-field
+   name-of-struct-field) (access access-rule)))
+
+   Ex:
+    (struct Rectangle
+      (in-module (Gdk))
+      (c-name GdkRectangle)
+      (field (type-and-name gint16 x) (access readwrite))
+      (field (type-and-name gint16 y) (access readwrite))
+      (field (type-and-name guint16 width) (access readwrite))
+      (field (type-and-name guint16 height) (access readwrite)))
+
+   Implies GdkRectangle type alias:
+
+    (type (alias GdkRectangle)
+          (in-c-name GdkRectangle*)
+          (out-c-name GdkRectangle*) ;; note - not the same as boxed
+   types
+          (inout-c-name GdkRectangle*))
+
+   ===
+
+   (user-function name
+     (in-module module)
+     (c-name c-typedef-name)
+     ;; return-type and parameters as for (function)
+   )
+
+   Ex:
+
+    (user-function PrintFunc
+       (in-module (Gtk))
+       (parameter in (type-and-name gpointer func_data))
+       (parameter in (type-and-name gchar* str)))
+
+   ===
+
+   (typedef new-name
+     (in-module module)
+     (c-name c-full-name)
+     (orig-type alias-of-orig-type))
+
+   Ex:
+
+    (typedef Type
+      (in-module (Gtk))
+      (c-name GtkType)
+      (orig-type guint))
+
Index: pkg/pygtk/branches/upstream/current/codegen/h2def.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/h2def.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/h2def.py	(revision 4)
@@ -0,0 +1,536 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# Search through a header file looking for function prototypes.
+# For each prototype, generate a scheme style definition.
+# GPL'ed
+# Toby D. Reeves <toby@max.rl.plh.af.mil>
+#
+# Modified by James Henstridge <james@daa.com.au> to output stuff in
+# Havoc's new defs format.  Info on this format can be seen at:
+#   http://www.gnome.org/mailing-lists/archives/gtk-devel-list/2000-January/0085.shtml
+# Updated to be PEP-8 compatible and refactored to use OOP
+
+import getopt
+import os
+import re
+import string
+import sys
+
+import defsparser
+
+# ------------------ Create typecodes from typenames ---------
+
+_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
+_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
+_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
+
+def to_upper_str(name):
+    """Converts a typename to the equivalent upercase and underscores
+    name.  This is used to form the type conversion macros and enum/flag
+    name variables"""
+    name = _upperstr_pat1.sub(r'\1_\2', name)
+    name = _upperstr_pat2.sub(r'\1_\2', name)
+    name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
+    return string.upper(name)
+
+def typecode(typename):
+    """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
+    return string.replace(to_upper_str(typename), '_', '_TYPE_', 1)
+
+
+# ------------------ Find object definitions -----------------
+
+def strip_comments(buf):
+    parts = []
+    lastpos = 0
+    while 1:
+        pos = string.find(buf, '/*', lastpos)
+        if pos >= 0:
+            parts.append(buf[lastpos:pos])
+            pos = string.find(buf, '*/', pos)
+            if pos >= 0:
+                lastpos = pos + 2
+            else:
+                break
+        else:
+            parts.append(buf[lastpos:])
+            break
+    return string.join(parts, '')
+
+obj_name_pat = "[A-Z][a-z]*[A-Z][A-Za-z0-9]*"
+
+split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)')
+
+def find_obj_defs(buf, objdefs=[]):
+    """
+    Try to find object definitions in header files.
+    """
+
+    # filter out comments from buffer.
+    buf = strip_comments(buf)
+
+    maybeobjdefs = []  # contains all possible objects from file
+
+    # first find all structures that look like they may represent a GtkObject
+    pat = re.compile("struct _(" + obj_name_pat + ")\s*{\s*" +
+                     "(" + obj_name_pat + ")\s+", re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = pat.search(buf, pos)
+        if not m: break
+        maybeobjdefs.append((m.group(1), m.group(2)))
+        pos = m.end()
+
+    # handle typedef struct { ... } style struct defs.
+    pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" +
+                     "(" + obj_name_pat + ")\s+[^}]*}\s*" +
+                     "(" + obj_name_pat + ")\s*;", re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = pat.search(buf, pos)
+        if not m: break
+        maybeobjdefs.append((m.group(2), m.group(2)))
+        pos = m.end()
+
+    # now find all structures that look like they might represent a class:
+    pat = re.compile("struct _(" + obj_name_pat + ")Class\s*{\s*" +
+                     "(" + obj_name_pat + ")Class\s+", re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = pat.search(buf, pos)
+        if not m: break
+        t = (m.group(1), m.group(2))
+        # if we find an object structure together with a corresponding
+        # class structure, then we have probably found a GtkObject subclass.
+        if t in maybeobjdefs:
+            objdefs.append(t)
+        pos = m.end()
+
+    pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" +
+                     "(" + obj_name_pat + ")Class\s+[^}]*}\s*" +
+                     "(" + obj_name_pat + ")Class\s*;", re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = pat.search(buf, pos)
+        if not m: break
+        t = (m.group(2), m.group(1))
+        # if we find an object structure together with a corresponding
+        # class structure, then we have probably found a GtkObject subclass.
+        if t in maybeobjdefs:
+            objdefs.append(t)
+        pos = m.end()
+
+    # now find all structures that look like they might represent
+    # a class inherited from GTypeInterface:
+    pat = re.compile("struct _(" + obj_name_pat + ")Class\s*{\s*" +
+                     "GTypeInterface\s+", re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = pat.search(buf, pos)
+        if not m: break
+        t = (m.group(1), '')
+        t2 = (m.group(1)+'Class', 'GTypeInterface')
+        # if we find an object structure together with a corresponding
+        # class structure, then we have probably found a GtkObject subclass.
+        if t2 in maybeobjdefs:
+            objdefs.append(t)
+        pos = m.end()
+
+    # now find all structures that look like they might represent
+    # an Iface inherited from GTypeInterface:
+    pat = re.compile("struct _(" + obj_name_pat + ")Iface\s*{\s*" +
+                     "GTypeInterface\s+", re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = pat.search(buf, pos)
+        if not m: break
+        t = (m.group(1), '')
+        t2 = (m.group(1)+'Iface', 'GTypeInterface')
+        # if we find an object structure together with a corresponding
+        # class structure, then we have probably found a GtkObject subclass.
+        if t2 in maybeobjdefs:
+            objdefs.append(t)
+        pos = m.end()
+
+def sort_obj_defs(objdefs):
+    objdefs.sort()  # not strictly needed, but looks nice
+    pos = 0
+    while pos < len(objdefs):
+        klass,parent = objdefs[pos]
+        for i in range(pos+1, len(objdefs)):
+            # parent below subclass ... reorder
+            if objdefs[i][0] == parent:
+                objdefs.insert(i+1, objdefs[pos])
+                del objdefs[pos]
+                break
+        else:
+            pos = pos + 1
+    return objdefs
+
+# ------------------ Find enum definitions -----------------
+
+def find_enum_defs(buf, enums=[]):
+    # strip comments
+    # bulk comments
+    buf = strip_comments(buf)
+
+    buf = re.sub('\n', ' ', buf)
+
+    enum_pat = re.compile(r'enum\s*{([^}]*)}\s*([A-Z][A-Za-z]*)(\s|;)')
+    splitter = re.compile(r'\s*,\s', re.MULTILINE)
+    pos = 0
+    while pos < len(buf):
+        m = enum_pat.search(buf, pos)
+        if not m: break
+
+        name = m.group(2)
+        vals = m.group(1)
+        isflags = string.find(vals, '<<') >= 0
+        entries = []
+        for val in splitter.split(vals):
+            if not string.strip(val): continue
+            entries.append(string.split(val)[0])
+        if name != 'GdkCursorType':
+            enums.append((name, isflags, entries))
+
+        pos = m.end()
+
+# ------------------ Find function definitions -----------------
+
+def clean_func(buf):
+    """
+    Ideally would make buf have a single prototype on each line.
+    Actually just cuts out a good deal of junk, but leaves lines
+    where a regex can figure prototypes out.
+    """
+    # bulk comments
+    buf = strip_comments(buf)
+
+    # compact continued lines
+    pat = re.compile(r"""\\\n""", re.MULTILINE)
+    buf = pat.sub('', buf)
+
+    # Preprocess directives
+    pat = re.compile(r"""^[#].*?$""", re.MULTILINE)
+    buf = pat.sub('', buf)
+
+    #typedefs, stucts, and enums
+    pat = re.compile(r"""^(typedef|struct|enum)(\s|.|\n)*?;\s*""",
+                     re.MULTILINE)
+    buf = pat.sub('', buf)
+
+    #strip DECLS macros
+    pat = re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS""", re.MULTILINE)
+    buf = pat.sub('', buf)
+
+    #extern "C"
+    pat = re.compile(r"""^\s*(extern)\s+\"C\"\s+{""", re.MULTILINE)
+    buf = pat.sub('', buf)
+
+    #multiple whitespace
+    pat = re.compile(r"""\s+""", re.MULTILINE)
+    buf = pat.sub(' ', buf)
+
+    #clean up line ends
+    pat = re.compile(r""";\s*""", re.MULTILINE)
+    buf = pat.sub('\n', buf)
+    buf = buf.lstrip()
+
+    #associate *, &, and [] with type instead of variable
+    #pat = re.compile(r'\s+([*|&]+)\s*(\w+)')
+    pat = re.compile(r' \s* ([*|&]+) \s* (\w+)', re.VERBOSE)
+    buf = pat.sub(r'\1 \2', buf)
+    pat = re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE)
+    buf = pat.sub(r'[] \1', buf)
+
+    # make return types that are const work.
+    buf = string.replace(buf, 'G_CONST_RETURN ', 'const-')
+    buf = string.replace(buf, 'const ', 'const-')
+
+    return buf
+
+proto_pat=re.compile(r"""
+(?P<ret>(-|\w|\&|\*)+\s*)  # return type
+\s+                   # skip whitespace
+(?P<func>\w+)\s*[(]   # match the function name until the opening (
+\s*(?P<args>.*?)\s*[)]     # group the function arguments
+""", re.IGNORECASE|re.VERBOSE)
+#"""
+arg_split_pat = re.compile("\s*,\s*")
+
+get_type_pat = re.compile(r'(const-)?([A-Za-z0-9]+)\*?\s+')
+pointer_pat = re.compile('.*\*$')
+func_new_pat = re.compile('(\w+)_new$')
+
+class DefsWriter:
+    def __init__(self, fp=None, prefix=None, verbose=False,
+                 defsfilter=None):
+        if not fp:
+            fp = sys.stdout
+
+        self.fp = fp
+        self.prefix = prefix
+        self.verbose = verbose
+
+        self._enums = {}
+        self._objects = {}
+        self._functions = {}
+        if defsfilter:
+            filter = defsparser.DefsParser(defsfilter)
+            filter.startParsing()
+            for func in filter.functions + filter.methods.values():
+                self._functions[func.c_name] = func
+            for obj in filter.objects + filter.boxes + filter.interfaces:
+                self._objects[obj.c_name] = func
+            for obj in filter.enums:
+                self._enums[obj.c_name] = func
+
+    def write_def(self, deffile):
+        buf = open(deffile).read()
+
+        self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile))
+        self._define_func(buf)
+        self.fp.write('\n')
+
+    def write_enum_defs(self, enums, fp=None):
+        if not fp:
+            fp = self.fp
+
+        fp.write(';; Enumerations and flags ...\n\n')
+        trans = string.maketrans(string.uppercase + '_',
+                                 string.lowercase + '-')
+        filter = self._enums
+        for cname, isflags, entries in enums:
+            if filter:
+                if cname in filter:
+                    continue
+            name = cname
+            module = None
+            m = split_prefix_pat.match(cname)
+            if m:
+                module = m.group(1)
+                name = m.group(2)
+            if isflags:
+                fp.write('(define-flags ' + name + '\n')
+            else:
+                fp.write('(define-enum ' + name + '\n')
+            if module:
+                fp.write('  (in-module "' + module + '")\n')
+            fp.write('  (c-name "' + cname + '")\n')
+            fp.write('  (gtype-id "' + typecode(cname) + '")\n')
+            prefix = entries[0]
+            for ent in entries:
+                # shorten prefix til we get a match ...
+                # and handle GDK_FONT_FONT, GDK_FONT_FONTSET case
+                while ent[:len(prefix)] != prefix or len(prefix) >= len(ent):
+                    prefix = prefix[:-1]
+            prefix_len = len(prefix)
+            fp.write('  (values\n')
+            for ent in entries:
+                fp.write('    \'("%s" "%s")\n' %
+                         (string.translate(ent[prefix_len:], trans), ent))
+            fp.write('  )\n')
+            fp.write(')\n\n')
+
+    def write_obj_defs(self, objdefs, fp=None):
+        if not fp:
+            fp = self.fp
+
+        fp.write(';; -*- scheme -*-\n')
+        fp.write('; object definitions ...\n')
+
+        filter = self._objects
+        for klass, parent in objdefs:
+            if filter:
+                if klass in filter:
+                    continue
+            m = split_prefix_pat.match(klass)
+            cmodule = None
+            cname = klass
+            if m:
+                cmodule = m.group(1)
+                cname = m.group(2)
+            fp.write('(define-object ' + cname + '\n')
+            if cmodule:
+                fp.write('  (in-module "' + cmodule + '")\n')
+            if parent:
+                fp.write('  (parent "' + parent + '")\n')
+            fp.write('  (c-name "' + klass + '")\n')
+            fp.write('  (gtype-id "' + typecode(klass) + '")\n')
+            # should do something about accessible fields
+            fp.write(')\n\n')
+
+    def _define_func(self, buf):
+        buf = clean_func(buf)
+        buf = string.split(buf,'\n')
+        filter = self._functions
+        for p in buf:
+            if not p:
+                continue
+            m = proto_pat.match(p)
+            if m == None:
+                if self.verbose:
+                    sys.stderr.write('No match:|%s|\n' % p)
+                continue
+            func = m.group('func')
+            if func[0] == '_':
+                continue
+            if filter:
+                if func in filter:
+                    continue
+            ret = m.group('ret')
+            args = m.group('args')
+            args = arg_split_pat.split(args)
+            for i in range(len(args)):
+                spaces = string.count(args[i], ' ')
+                if spaces > 1:
+                    args[i] = string.replace(args[i], ' ', '-', spaces - 1)
+
+            self._write_func(func, ret, args)
+
+    def _write_func(self, name, ret, args):
+        if len(args) >= 1:
+            # methods must have at least one argument
+            munged_name = name.replace('_', '')
+            m = get_type_pat.match(args[0])
+            if m:
+                obj = m.group(2)
+                if munged_name[:len(obj)] == obj.lower():
+                    self._write_method(obj, name, ret, args)
+                    return
+
+        if self.prefix:
+            l = len(self.prefix)
+            if name[:l] == self.prefix and name[l] == '_':
+                fname = name[l+1:]
+            else:
+                fname = name
+        else:
+            fname = name
+
+        # it is either a constructor or normal function
+        self.fp.write('(define-function ' + fname + '\n')
+        self.fp.write('  (c-name "' + name + '")\n')
+
+        # Hmmm... Let's asume that a constructor function name
+        # ends with '_new' and it returns a pointer.
+        m = func_new_pat.match(name)
+        if pointer_pat.match(ret) and m:
+            cname = ''
+            for s in m.group(1).split ('_'):
+                cname += s.title()
+            if cname != '':
+                self.fp.write('  (is-constructor-of "' + cname + '")\n')
+
+        self._write_return(ret)
+        self._write_arguments(args)
+
+    def _write_method(self, obj, name, ret, args):
+        regex = string.join(map(lambda x: x+'_?', string.lower(obj)),'')
+        mname = re.sub(regex, '', name, 1)
+        if self.prefix:
+            l = len(self.prefix) + 1
+            if mname[:l] == self.prefix and mname[l+1] == '_':
+                mname = mname[l+1:]
+        self.fp.write('(define-method ' + mname + '\n')
+        self.fp.write('  (of-object "' + obj + '")\n')
+        self.fp.write('  (c-name "' + name + '")\n')
+        self._write_return(ret)
+        self._write_arguments(args[1:])
+
+    def _write_return(self, ret):
+        if ret != 'void':
+            self.fp.write('  (return-type "' + ret + '")\n')
+        else:
+            self.fp.write('  (return-type "none")\n')
+
+    def _write_arguments(self, args):
+        is_varargs = 0
+        has_args = len(args) > 0
+        for arg in args:
+            if arg == '...':
+                is_varargs = 1
+            elif arg in ('void', 'void '):
+                has_args = 0
+        if has_args:
+            self.fp.write('  (parameters\n')
+            for arg in args:
+                if arg != '...':
+                    tupleArg = tuple(string.split(arg))
+                    if len(tupleArg) == 2:
+                        self.fp.write('    \'("%s" "%s")\n' % tupleArg)
+            self.fp.write('  )\n')
+        if is_varargs:
+            self.fp.write('  (varargs #t)\n')
+        self.fp.write(')\n\n')
+
+# ------------------ Main function -----------------
+
+def main(args):
+    verbose = False
+    onlyenums = False
+    onlyobjdefs = False
+    separate = False
+    modulename = None
+    defsfilter = None
+    opts, args = getopt.getopt(args[1:], 'vs:m:f:',
+                               ['onlyenums', 'onlyobjdefs',
+                                'modulename=', 'separate=',
+                                'defsfilter='])
+    for o, v in opts:
+        if o == '-v':
+            verbose = True
+        if o == '--onlyenums':
+            onlyenums = True
+        if o == '--onlyobjdefs':
+            onlyobjdefs = True
+        if o in ('-s', '--separate'):
+            separate = v
+        if o in ('-m', '--modulename'):
+            modulename = v
+        if o in ('-f', '--defsfilter'):
+            defsfilter = v
+
+    if not args[0:1]:
+        print 'Must specify at least one input file name'
+        return -1
+
+    # read all the object definitions in
+    objdefs = []
+    enums = []
+    for filename in args:
+        buf = open(filename).read()
+        find_obj_defs(buf, objdefs)
+        find_enum_defs(buf, enums)
+    objdefs = sort_obj_defs(objdefs)
+
+    if separate:
+        methods = file(separate + '.defs', 'w')
+        types = file(separate + '-types.defs', 'w')
+
+        dw = DefsWriter(methods, prefix=modulename, verbose=verbose,
+                        defsfilter=defsfilter)
+        dw.write_obj_defs(objdefs, types)
+        dw.write_enum_defs(enums, types)
+        print "Wrote %s-types.defs" % separate
+
+        for filename in args:
+            dw.write_def(filename)
+        print "Wrote %s.defs" % separate
+    else:
+        dw = DefsWriter(prefix=modulename, verbose=verbose,
+                        defsfilter=defsfilter)
+
+        if onlyenums:
+            dw.write_enum_defs(enums)
+        elif onlyobjdefs:
+            dw.write_obj_defs(objdefs)
+        else:
+            dw.write_obj_defs(objdefs)
+            dw.write_enum_defs(enums)
+
+            for filename in args:
+                dw.write_def(filename)
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
Index: pkg/pygtk/branches/upstream/current/codegen/Makefile.in
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/Makefile.in	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/Makefile.in	(revision 4)
@@ -0,0 +1,444 @@
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+subdir = codegen
+DIST_COMMON = $(codegen_PYTHON) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/pygtk-codegen-2.0.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = pygtk-codegen-2.0
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)"
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+codegenPYTHON_INSTALL = $(INSTALL_DATA)
+py_compile = $(top_srcdir)/py-compile
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+ATK_CFLAGS = @ATK_CFLAGS@
+ATK_LIBS = @ATK_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ATK_FALSE = @BUILD_ATK_FALSE@
+BUILD_ATK_TRUE = @BUILD_ATK_TRUE@
+BUILD_GTKUNIXPRINT_FALSE = @BUILD_GTKUNIXPRINT_FALSE@
+BUILD_GTKUNIXPRINT_TRUE = @BUILD_GTKUNIXPRINT_TRUE@
+BUILD_GTK_FALSE = @BUILD_GTK_FALSE@
+BUILD_GTK_TRUE = @BUILD_GTK_TRUE@
+BUILD_LIBGLADE_FALSE = @BUILD_LIBGLADE_FALSE@
+BUILD_LIBGLADE_TRUE = @BUILD_LIBGLADE_TRUE@
+BUILD_PANGOCAIRO_FALSE = @BUILD_PANGOCAIRO_FALSE@
+BUILD_PANGOCAIRO_TRUE = @BUILD_PANGOCAIRO_TRUE@
+BUILD_PANGO_FALSE = @BUILD_PANGO_FALSE@
+BUILD_PANGO_TRUE = @BUILD_PANGO_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DOCS_FALSE = @ENABLE_DOCS_FALSE@
+ENABLE_DOCS_TRUE = @ENABLE_DOCS_TRUE@
+EXEEXT = @EXEEXT@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GTK210_CFLAGS = @GTK210_CFLAGS@
+GTK210_LIBS = @GTK210_LIBS@
+GTKUNIXPRINT_CFLAGS = @GTKUNIXPRINT_CFLAGS@
+GTKUNIXPRINT_LIBS = @GTKUNIXPRINT_LIBS@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+HAVE_GTK_2_10 = @HAVE_GTK_2_10@
+HAVE_GTK_2_10_FALSE = @HAVE_GTK_2_10_FALSE@
+HAVE_GTK_2_10_TRUE = @HAVE_GTK_2_10_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBGLADE_CFLAGS = @LIBGLADE_CFLAGS@
+LIBGLADE_LIBS = @LIBGLADE_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OS_WIN32_FALSE = @OS_WIN32_FALSE@
+OS_WIN32_TRUE = @OS_WIN32_TRUE@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@
+PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@
+PANGO_CFLAGS = @PANGO_CFLAGS@
+PANGO_LIBS = @PANGO_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@
+PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_DATADIR = @PYGOBJECT_DATADIR@
+PYGOBJECT_FIXXREF = @PYGOBJECT_FIXXREF@
+PYGOBJECT_INCLUDEDIR = @PYGOBJECT_INCLUDEDIR@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYGOBJECT_PYGDOCS = @PYGOBJECT_PYGDOCS@
+PYGTK_CODEGEN_DEFINES = @PYGTK_CODEGEN_DEFINES@
+PYGTK_MAJOR_VERSION = @PYGTK_MAJOR_VERSION@
+PYGTK_MICRO_VERSION = @PYGTK_MICRO_VERSION@
+PYGTK_MINOR_VERSION = @PYGTK_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+PLATFORM_VERSION = 2.0
+bin_SCRIPTS = pygtk-codegen-$(PLATFORM_VERSION)
+codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
+codegen_PYTHON = \
+	__init__.py \
+	argtypes.py \
+	reversewrapper.py \
+	codegen.py \
+	definitions.py \
+	defsparser.py \
+	docextract.py \
+	docgen.py \
+	h2def.py \
+	createdefs.py \
+	mergedefs.py \
+	mkskel.py \
+	override.py \
+	scmexpr.py
+
+EXTRA_DIST = README.defs pygtk-codegen-$(PLATFORM_VERSION).in
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  codegen/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  codegen/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+pygtk-codegen-2.0: $(top_builddir)/config.status $(srcdir)/pygtk-codegen-2.0.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f $$d$$p; then \
+	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	    echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	    $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-codegenPYTHON: $(codegen_PYTHON)
+	@$(NORMAL_INSTALL)
+	test -z "$(codegendir)" || $(mkdir_p) "$(DESTDIR)$(codegendir)"
+	@list='$(codegen_PYTHON)'; dlist=''; for p in $$list; do\
+	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+	  if test -f $$b$$p; then \
+	    d=`echo $$p | sed -e 's,^.*/,,'`; \
+	    dlist="$$dlist $$d"; \
+	    echo " $(codegenPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(codegendir)/$$d'"; \
+	    $(codegenPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(codegendir)/$$d"; \
+	  else :; fi; \
+	done; \
+	test -z "$$dlist" || \
+	PYTHON=$(PYTHON) $(py_compile) --basedir "$(DESTDIR)$(codegendir)" $$dlist
+
+uninstall-codegenPYTHON:
+	@$(NORMAL_UNINSTALL)
+	@list='$(codegen_PYTHON)'; dlist=''; for p in $$list; do\
+	  d=`echo $$p | sed -e 's,^.*/,,'`; \
+	  rm -f "$(DESTDIR)$(codegendir)/$$d"; \
+	  rm -f "$(DESTDIR)$(codegendir)/$${d}c"; \
+	  rm -f "$(DESTDIR)$(codegendir)/$${d}o"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-codegenPYTHON
+
+install-exec-am: install-binSCRIPTS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-codegenPYTHON \
+	uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binSCRIPTS install-codegenPYTHON install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-binSCRIPTS uninstall-codegenPYTHON uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: pkg/pygtk/branches/upstream/current/codegen/argtypes.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/argtypes.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/argtypes.py	(revision 4)
@@ -0,0 +1,1027 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import string
+import keyword
+import struct
+
+py_ssize_t_clean = False
+
+class ArgTypeError(Exception):
+    pass
+
+class ArgTypeNotFoundError(ArgTypeError):
+    pass
+
+class ArgTypeConfigurationError(ArgTypeError):
+    pass
+
+
+class VarList:
+    """Nicely format a C variable list"""
+    def __init__(self):
+        self.vars = {}
+    def add(self, ctype, name):
+        if self.vars.has_key(ctype):
+            self.vars[ctype] = self.vars[ctype] + (name,)
+        else:
+            self.vars[ctype] = (name,)
+    def __str__(self):
+        ret = []
+        for type in self.vars.keys():
+            ret.append('    ')
+            ret.append(type)
+            ret.append(' ')
+            ret.append(string.join(self.vars[type], ', '))
+            ret.append(';\n')
+        if ret:
+            ret.append('\n')
+            return string.join(ret, '')
+        return ''
+
+class WrapperInfo:
+    """A class that holds information about variable defs, code
+    snippets, etcd for use in writing out the function/method
+    wrapper."""
+    def __init__(self):
+        self.varlist = VarList()
+        self.parsestr = ''
+        self.parselist = ['', 'kwlist']
+        self.codebefore = []
+        self.codeafter = []
+        self.arglist = []
+        self.kwlist = []
+    def get_parselist(self):
+        return string.join(self.parselist, ', ')
+    def get_codebefore(self):
+        return string.join(self.codebefore, '')
+    def get_codeafter(self):
+        return string.join(self.codeafter, '')
+    def get_arglist(self):
+        return string.join(self.arglist, ', ')
+    def get_varlist(self):
+        return str(self.varlist)
+    def get_kwlist(self):
+        ret = '    static char *kwlist[] = { %s };\n' % \
+              string.join(self.kwlist + [ 'NULL' ], ', ')
+        if not self.get_varlist():
+            ret = ret + '\n'
+        return ret
+
+    def add_parselist(self, codes, parseargs, keywords):
+        self.parsestr = self.parsestr + codes
+        for arg in parseargs:
+            self.parselist.append(arg)
+        for kw in keywords:
+            if keyword.iskeyword(kw):
+                kw = kw + '_'
+            self.kwlist.append('"%s"' % kw)
+
+class ArgType:
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        """Add code to the WrapperInfo instance to handle
+        parameter."""
+        raise RuntimeError, "write_param not implemented for %s" % \
+              self.__class__.__name__
+    def write_return(self, ptype, ownsreturn, info):
+        """Adds a variable named ret of the return type to
+        info.varlist, and add any required code to info.codeafter to
+        convert the return value to a python object."""
+        raise RuntimeError, "write_return not implemented for %s" % \
+              self.__class__.__name__
+
+class NoneArg(ArgType):
+    def write_return(self, ptype, ownsreturn, info):
+        info.codeafter.append('    Py_INCREF(Py_None);\n' +
+                              '    return Py_None;')
+
+class StringArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            if pdflt != 'NULL': pdflt = '"' + pdflt + '"'
+            info.varlist.add('char', '*' + pname + ' = ' + pdflt)
+        else:
+            info.varlist.add('char', '*' + pname)
+        info.arglist.append(pname)
+        if pnull:
+            info.add_parselist('z', ['&' + pname], [pname])
+        else:
+            info.add_parselist('s', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        if ownsreturn:
+            # have to free result ...
+            info.varlist.add('gchar', '*ret')
+            info.codeafter.append('    if (ret) {\n' +
+                                  '        PyObject *py_ret = PyString_FromString(ret);\n' +
+                                  '        g_free(ret);\n' +
+                                  '        return py_ret;\n' +
+                                  '    }\n' +
+                                  '    Py_INCREF(Py_None);\n' +
+                                  '    return Py_None;')
+        else:
+            info.varlist.add('const gchar', '*ret')
+            info.codeafter.append('    if (ret)\n' +
+                                  '        return PyString_FromString(ret);\n'+
+                                  '    Py_INCREF(Py_None);\n' +
+                                  '    return Py_None;')
+
+class UCharArg(ArgType):
+    # allows strings with embedded NULLs.
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('guchar', '*' + pname + ' = "' + pdflt + '"')
+        else:
+            info.varlist.add('guchar', '*' + pname)
+        if py_ssize_t_clean:
+            info.varlist.add('Py_ssize_t', pname + '_len')
+        else:
+            info.varlist.add('int', pname + '_len')
+        info.arglist.append(pname)
+        if pnull:
+            info.add_parselist('z#', ['&' + pname, '&' + pname + '_len'],
+                               [pname])
+        else:
+            info.add_parselist('s#', ['&' + pname, '&' + pname + '_len'],
+                               [pname])
+
+class CharArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('char', pname + " = '" + pdflt + "'")
+        else:
+            info.varlist.add('char', pname)
+        info.arglist.append(pname)
+        info.add_parselist('c', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('gchar', 'ret')
+        info.codeafter.append('    return PyString_FromStringAndSize(&ret, 1);')
+class GUniCharArg(ArgType):
+    ret_tmpl = ('#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2\n'
+                '    if (ret > 0xffff) {\n'
+                '        PyErr_SetString(PyExc_RuntimeError, "returned character can not be represented in 16-bit unicode");\n'
+                '        return NULL;\n'
+                '    }\n'
+                '#endif\n'
+                '    py_ret = (Py_UNICODE)ret;\n'
+                '    return PyUnicode_FromUnicode(&py_ret, 1);\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('gunichar', pname + " = '" + pdflt + "'")
+        else:
+            info.varlist.add('gunichar', pname)
+        info.arglist.append(pname)
+        info.add_parselist('O&', ['pyg_pyobj_to_unichar_conv', '&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('gunichar', 'ret')
+        info.varlist.add('Py_UNICODE', 'py_ret')
+        info.codeafter.append(self.ret_tmpl)
+
+
+class IntArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('int', pname + ' = ' + pdflt)
+        else:
+            info.varlist.add('int', pname)
+        info.arglist.append(pname)
+        info.add_parselist('i', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('int', 'ret')
+        info.codeafter.append('    return PyInt_FromLong(ret);')
+
+class UIntArg(ArgType):
+    dflt = ('    if (py_%(name)s) {\n'
+            '        if (PyLong_Check(py_%(name)s))\n'
+            '            %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n'
+            '        else if (PyInt_Check(py_%(name)s))\n'
+            '            %(name)s = PyInt_AsLong(py_%(name)s);\n'
+            '        else\n'
+            '            PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n'
+            '        if (PyErr_Occurred())\n'
+            '            return NULL;\n'
+            '    }\n')
+    before = ('    if (PyLong_Check(py_%(name)s))\n'
+              '        %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n'
+              '    else if (PyInt_Check(py_%(name)s))\n'
+              '        %(name)s = PyInt_AsLong(py_%(name)s);\n'
+              '    else\n'
+              '        PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n'
+              '    if (PyErr_Occurred())\n'
+              '        return NULL;\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if not pdflt:
+            pdflt = '0';
+
+        info.varlist.add(ptype, pname + ' = ' + pdflt)
+        info.codebefore.append(self.dflt % {'name':pname})
+        info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
+        info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add(ptype, 'ret')
+        info.codeafter.append('    return PyLong_FromUnsignedLong(ret);')
+
+class SizeArg(ArgType):
+
+    if struct.calcsize('P') <= struct.calcsize('l'):
+        llp64 = True
+    else:
+        llp64 = False
+
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add(ptype, pname + ' = ' + pdflt)
+        else:
+            info.varlist.add(ptype, pname)
+        info.arglist.append(pname)
+        if self.llp64:
+            info.add_parselist('k', ['&' + pname], [pname])
+        else:
+            info.add_parselist('K', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add(ptype, 'ret')
+        if self.llp64:
+            info.codeafter.append('    return PyLong_FromUnsignedLongLong(ret);\n')
+        else:
+            info.codeafter.append('    return PyLong_FromUnsignedLong(ret);\n')
+
+class SSizeArg(ArgType):
+
+    if struct.calcsize('P') <= struct.calcsize('l'):
+        llp64 = True
+    else:
+        llp64 = False
+
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add(ptype, pname + ' = ' + pdflt)
+        else:
+            info.varlist.add(ptype, pname)
+        info.arglist.append(pname)
+        if self.llp64:
+            info.add_parselist('l', ['&' + pname], [pname])
+        else:
+            info.add_parselist('L', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add(ptype, 'ret')
+        if self.llp64:
+            info.codeafter.append('    return PyLong_FromLongLong(ret);\n')
+        else:
+            info.codeafter.append('    return PyLong_FromLong(ret);\n')
+
+class LongArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add(ptype, pname + ' = ' + pdflt)
+        else:
+            info.varlist.add(ptype, pname)
+        info.arglist.append(pname)
+        info.add_parselist('l', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add(ptype, 'ret')
+        info.codeafter.append('    return PyInt_FromLong(ret);\n')
+
+class BoolArg(IntArg):
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('int', 'ret')
+        info.codeafter.append('    return PyBool_FromLong(ret);\n')
+
+class TimeTArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('time_t', pname + ' = ' + pdflt)
+        else:
+            info.varlist.add('time_t', pname)
+        info.arglist.append(pname)
+        info.add_parselist('i', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('time_t', 'ret')
+        info.codeafter.append('    return PyInt_FromLong(ret);')
+
+class ULongArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('unsigned long', pname + ' = ' + pdflt)
+        else:
+            info.varlist.add('unsigned long', pname)
+        info.arglist.append(pname)
+        info.add_parselist('k', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add(ptype, 'ret')
+        info.codeafter.append('    return PyLong_FromUnsignedLong(ret);\n')
+
+class UInt32Arg(ULongArg):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        ULongArg.write_param(self, ptype, pname, pdflt, pnull, info)
+        ## if sizeof(unsigned long) > sizeof(unsigned int), we need to
+        ## check the value is within guint32 range
+        if struct.calcsize('L') > struct.calcsize('I'):
+            info.codebefore.append((
+                '    if (%(pname)s > G_MAXUINT32) {\n'
+                '        PyErr_SetString(PyExc_ValueError,\n'
+                '                        "Value out of range in conversion of"\n'
+                '                        " %(pname)s parameter to unsigned 32 bit integer");\n'
+                '        return NULL;\n'
+                '    }\n') % vars())
+
+class Int64Arg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('gint64', pname + ' = ' + pdflt)
+        else:
+            info.varlist.add('gint64', pname)
+        info.arglist.append(pname)
+        info.add_parselist('L', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('gint64', 'ret')
+        info.codeafter.append('    return PyLong_FromLongLong(ret);')
+
+class UInt64Arg(ArgType):
+    dflt = '    if (py_%(name)s)\n' \
+           '        %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
+    before = '    %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('guint64', pname + ' = ' + pdflt)
+            info.codebefore.append(self.dflt % {'name':pname})
+        else:
+            info.varlist.add('guint64', pname)
+            info.codebefore.append(self.before % {'name':pname})
+        info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
+        info.arglist.append(pname)
+        info.add_parselist('O!', ['&PyLong_Type', '&py_' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('guint64', 'ret')
+        info.codeafter.append('    return PyLong_FromUnsignedLongLong(ret);')
+
+
+class DoubleArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('double', pname + ' = ' + pdflt)
+        else:
+            info.varlist.add('double', pname)
+        info.arglist.append(pname)
+        info.add_parselist('d', ['&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('double', 'ret')
+        info.codeafter.append('    return PyFloat_FromDouble(ret);')
+
+class FileArg(ArgType):
+    nulldflt = ('    if (py_%(name)s == Py_None)\n'
+                '        %(name)s = NULL;\n'
+                '    else if (py_%(name)s && PyFile_Check(py_%(name)s)\n'
+                '        %s = PyFile_AsFile(py_%(name)s);\n'
+                '    else if (py_%(name)s) {\n'
+                '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n'
+                '        return NULL;\n'
+                '    }')
+    null = ('    if (py_%(name)s && PyFile_Check(py_%(name)s)\n'
+            '        %(name)s = PyFile_AsFile(py_%(name)s);\n'
+            '    else if (py_%(name)s != Py_None) {\n'
+            '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n'
+            '        return NULL;\n'
+            '    }\n')
+    dflt = ('    if (py_%(name)s)\n'
+            '        %(name)s = PyFile_AsFile(py_%(name)s);\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            if pdflt:
+                info.varlist.add('FILE', '*' + pname + ' = ' + pdflt)
+                info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+                info.codebefore.append(self.nulldflt % {'name':pname})
+            else:
+                info.varlist.add('FILE', '*' + pname + ' = NULL')
+                info.varlist.add('PyObject', '*py_' + pname)
+                info.codebefore.append(self.null & {'name':pname})
+            info.arglist.appned(pname)
+            info.add_parselist('O', ['&py_' + pname], [pname])
+        else:
+            if pdflt:
+                info.varlist.add('FILE', '*' + pname + ' = ' + pdflt)
+                info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+                info.codebefore.append(self.dflt % {'name':pname})
+                info.arglist.append(pname)
+            else:
+                info.varlist.add('PyObject', '*' + pname)
+                info.arglist.append('PyFile_AsFile(' + pname + ')')
+            info.add_parselist('O!', ['&PyFile_Type', '&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('FILE', '*ret')
+        info.codeafter.append('    if (ret)\n' +
+                              '        return PyFile_FromFile(ret, "", "", fclose);\n' +
+                              '    Py_INCREF(Py_None);\n' +
+                              '    return Py_None;')
+
+class EnumArg(ArgType):
+    enum = ('    if (pyg_enum_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n'
+            '        return NULL;\n')
+    def __init__(self, enumname, typecode):
+        self.enumname = enumname
+        self.typecode = typecode
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add(self.enumname, pname + ' = ' + pdflt)
+        else:
+            info.varlist.add(self.enumname, pname)
+        info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+        info.codebefore.append(self.enum % { 'typecode': self.typecode,
+                                             'name': pname})
+        info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname]);
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('gint', 'ret')
+        info.codeafter.append('    return pyg_enum_from_gtype(%s, ret);' % self.typecode)
+
+class FlagsArg(ArgType):
+    flag = ('    if (%(default)spyg_flags_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n'
+            '        return NULL;\n')
+    def __init__(self, flagname, typecode):
+        self.flagname = flagname
+        self.typecode = typecode
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add(self.flagname, pname + ' = ' + pdflt)
+            default = "py_%s && " % (pname,)
+        else:
+            info.varlist.add(self.flagname, pname)
+            default = ""
+        info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+        info.codebefore.append(self.flag % {'default':default,
+                                            'typecode':self.typecode,
+                                            'name':pname})
+        info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('guint', 'ret')
+        info.codeafter.append('    return pyg_flags_from_gtype(%s, ret);' % self.typecode)
+
+class ObjectArg(ArgType):
+    # should change these checks to more typesafe versions that check
+    # a little further down in the class heirachy.
+    nulldflt = ('    if ((PyObject *)py_%(name)s == Py_None)\n'
+                '        %(name)s = NULL;\n'
+                '    else if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n'
+                '        %(name)s = %(cast)s(py_%(name)s->obj);\n'
+                '    else if (py_%(name)s) {\n'
+                '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
+                '        return NULL;\n'
+                '    }\n')
+    null = ('    if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n'
+            '        %(name)s = %(cast)s(py_%(name)s->obj);\n'
+            '    else if ((PyObject *)py_%(name)s != Py_None) {\n'
+            '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
+            '        return NULL;\n'
+            '    }\n')
+    dflt = '    if (py_%(name)s)\n' \
+           '        %(name)s = %(cast)s(py_%(name)s->obj);\n'
+    def __init__(self, objname, parent, typecode):
+        self.objname = objname
+        self.cast = string.replace(typecode, '_TYPE_', '_', 1)
+        self.parent = parent
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            if pdflt:
+                info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt)
+                info.varlist.add('PyGObject', '*py_' + pname + ' = NULL')
+                info.codebefore.append(self.nulldflt % {'name':pname,
+                                                        'cast':self.cast,
+                                                        'type':self.objname})
+            else:
+                info.varlist.add(self.objname, '*' + pname + ' = NULL')
+                info.varlist.add('PyGObject', '*py_' + pname)
+                info.codebefore.append(self.null % {'name':pname,
+                                                    'cast':self.cast,
+                                                    'type':self.objname})
+            if ptype.endswith('*'):
+                typename = ptype[:-1]
+                try:
+                    const, typename = typename.split('const-')
+                except ValueError:
+                    const = ''
+                if typename != ptype:
+                    info.arglist.append('(%s *) %s' % (ptype[:-1], pname))
+                else:
+                    info.arglist.append(pname)
+
+            info.add_parselist('O', ['&py_' + pname], [pname])
+        else:
+            if pdflt:
+                info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt)
+                info.varlist.add('PyGObject', '*py_' + pname + ' = NULL')
+                info.codebefore.append(self.dflt % {'name':pname,
+                                                    'cast':self.cast})
+                info.arglist.append(pname)
+                info.add_parselist('O!', ['&Py%s_Type' % self.objname,
+                                         '&py_' + pname], [pname])
+            else:
+                info.varlist.add('PyGObject', '*' + pname)
+                info.arglist.append('%s(%s->obj)' % (self.cast, pname))
+                info.add_parselist('O!', ['&Py%s_Type' % self.objname,
+                                          '&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        if ptype.endswith('*'):
+            typename = ptype[:-1]
+            try:
+                const, typename = typename.split('const-')
+            except ValueError:
+                const = ''
+        info.varlist.add(typename, '*ret')
+        if ownsreturn:
+            info.varlist.add('PyObject', '*py_ret')
+            info.codeafter.append('    py_ret = pygobject_new((GObject *)ret);\n'
+                                  '    if (ret != NULL)\n'
+                                  '        g_object_unref(ret);\n'
+                                  '    return py_ret;')
+        else:
+            info.codeafter.append('    /* pygobject_new handles NULL checking */\n' +
+                                  '    return pygobject_new((GObject *)ret);')
+
+class BoxedArg(ArgType):
+    # haven't done support for default args.  Is it needed?
+    check = ('    if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n'
+             '        %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n'
+             '    else {\n'
+             '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n'
+             '        return NULL;\n'
+             '    }\n')
+    null = ('    if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n'
+            '        %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n'
+            '    else if (py_%(name)s != Py_None) {\n'
+            '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n'
+            '        return NULL;\n'
+            '    }\n')
+    def __init__(self, ptype, typecode):
+        self.typename = ptype
+        self.typecode = typecode
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            info.varlist.add(self.typename, '*' + pname + ' = NULL')
+            info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+            info.codebefore.append(self.null % {'name':  pname,
+                                                'typename': self.typename,
+                                                'typecode': self.typecode})
+        else:
+            info.varlist.add(self.typename, '*' + pname + ' = NULL')
+            info.varlist.add('PyObject', '*py_' + pname)
+            info.codebefore.append(self.check % {'name':  pname,
+                                                 'typename': self.typename,
+                                                 'typecode': self.typecode})
+        if ptype[-1] == '*':
+            typename = ptype[:-1]
+            if typename[:6] == 'const-': typename = typename[6:]
+            if typename != self.typename:
+                info.arglist.append('(%s *)%s' % (ptype[:-1], pname))
+            else:
+                info.arglist.append(pname)
+        else:
+            info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname])
+    ret_tmpl = '    /* pyg_boxed_new handles NULL checking */\n' \
+               '    return pyg_boxed_new(%(typecode)s, %(ret)s, %(copy)s, TRUE);'
+    def write_return(self, ptype, ownsreturn, info):
+        if ptype[-1] == '*':
+            info.varlist.add(self.typename, '*ret')
+            ret = 'ret'
+        else:
+            info.varlist.add(self.typename, 'ret')
+            ret = '&ret'
+            ownsreturn = 0 # of course it can't own a ref to a local var ...
+        info.codeafter.append(self.ret_tmpl %
+                              { 'typecode': self.typecode,
+                                'ret': ret,
+                                'copy': ownsreturn and 'FALSE' or 'TRUE'})
+
+class CustomBoxedArg(ArgType):
+    # haven't done support for default args.  Is it needed?
+    null = ('    if (%(check)s(py_%(name)s))\n'
+            '        %(name)s = %(get)s(py_%(name)s);\n'
+            '    else if (py_%(name)s != Py_None) {\n'
+            '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
+            '        return NULL;\n'
+            '    }\n')
+    def __init__(self, ptype, pytype, getter, new):
+        self.pytype = pytype
+        self.getter = getter
+        self.checker = 'Py' + ptype + '_Check'
+        self.new = new
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            info.varlist.add(ptype[:-1], '*' + pname + ' = NULL')
+            info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+            info.codebefore.append(self.null % {'name':  pname,
+                                                'get':   self.getter,
+                                                'check': self.checker,
+                                                'type':  ptype[:-1]})
+            info.arglist.append(pname)
+            info.add_parselist('O', ['&py_' + pname], [pname])
+        else:
+            info.varlist.add('PyObject', '*' + pname)
+            info.arglist.append(self.getter + '(' + pname + ')')
+            info.add_parselist('O!', ['&' + self.pytype, '&' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add(ptype[:-1], '*ret')
+        info.codeafter.append('    if (ret)\n' +
+                              '        return ' + self.new + '(ret);\n' +
+                              '    Py_INCREF(Py_None);\n' +
+                              '    return Py_None;')
+
+class PointerArg(ArgType):
+    # haven't done support for default args.  Is it needed?
+    check = ('    if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n'
+             '        %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n'
+             '    else {\n'
+             '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n'
+             '        return NULL;\n'
+             '    }\n')
+    null = ('    if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n'
+            '        %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n'
+            '    else if (py_%(name)s != Py_None) {\n'
+            '        PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n'
+            '        return NULL;\n'
+            '    }\n')
+    def __init__(self, ptype, typecode):
+        self.typename = ptype
+        self.typecode = typecode
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            info.varlist.add(self.typename, '*' + pname + ' = NULL')
+            info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+            info.codebefore.append(self.null % {'name':  pname,
+                                                'typename': self.typename,
+                                                'typecode': self.typecode})
+        else:
+            info.varlist.add(self.typename, '*' + pname + ' = NULL')
+            info.varlist.add('PyObject', '*py_' + pname)
+            info.codebefore.append(self.check % {'name':  pname,
+                                                 'typename': self.typename,
+                                                 'typecode': self.typecode})
+        info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        if ptype[-1] == '*':
+            info.varlist.add(self.typename, '*ret')
+            info.codeafter.append('    /* pyg_pointer_new handles NULL checking */\n' +
+                                  '    return pyg_pointer_new(' + self.typecode + ', ret);')
+        else:
+            info.varlist.add(self.typename, 'ret')
+            info.codeafter.append('    /* pyg_pointer_new handles NULL checking */\n' +
+                                  '    return pyg_pointer_new(' + self.typecode + ', &ret);')
+
+class AtomArg(IntArg):
+    dflt = '    if (py_%(name)s) {\n' \
+           '        %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n' \
+           '        if (PyErr_Occurred())\n' \
+           '            return NULL;\n' \
+           '    }\n'
+    atom = ('    %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n'
+            '    if (PyErr_Occurred())\n'
+            '        return NULL;\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pdflt:
+            info.varlist.add('GdkAtom', pname + ' = ' + pdflt)
+            info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+            info.codebefore.append(self.dflt % {'name': pname})
+        else:
+            info.varlist.add('GdkAtom', pname)
+            info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+            info.codebefore.append(self.atom % {'name': pname})
+        info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('GdkAtom', 'ret')
+        info.varlist.add('PyObject *', 'py_ret')
+        info.varlist.add('gchar *', 'name')
+        info.codeafter.append('    name = gdk_atom_name(ret);\n'
+                              '    py_ret = PyString_FromString(name);\n'
+                              '    g_free(name);\n'
+                              '    return py_ret;')
+
+class GTypeArg(ArgType):
+    gtype = ('    if ((%(name)s = pyg_type_from_object(py_%(name)s)) == 0)\n'
+             '        return NULL;\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        info.varlist.add('GType', pname)
+        info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+        info.codebefore.append(self.gtype % {'name': pname})
+        info.arglist.append(pname)
+        info.add_parselist('O', ['&py_' + pname], [pname])
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('GType', 'ret')
+        info.codeafter.append('    return pyg_type_wrapper_new(ret);')
+
+# simple GError handler.
+class GErrorArg(ArgType):
+    handleerror = ('    if (pyg_error_check(&%(name)s))\n'
+                   '        return NULL;\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        info.varlist.add('GError', '*' + pname + ' = NULL')
+        info.arglist.append('&' + pname)
+        info.codeafter.append(self.handleerror % { 'name': pname })
+
+class GtkTreePathArg(ArgType):
+    # haven't done support for default args.  Is it needed?
+    normal = ('    %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n'
+              '    if (!%(name)s) {\n'
+              '        PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n'
+              '        return NULL;\n'
+              '    }\n')
+    null = ('    if (py_%(name)s != Py_None) {\n'
+            '        %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n'
+            '        if (!%(name)s) {\n'
+            '            PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n'
+            '            return NULL;\n'
+            '        }\n'
+            '    }\n')
+    freepath = ('    if (%(name)s)\n'
+                '        gtk_tree_path_free(%(name)s);\n')
+    def __init__(self):
+        pass
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            info.varlist.add('GtkTreePath', '*' + pname + ' = NULL')
+            info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+            info.codebefore.append(self.null % {'name':  pname})
+            info.arglist.append(pname)
+            info.add_parselist('O', ['&py_' + pname], [pname])
+        else:
+            info.varlist.add('GtkTreePath', '*' + pname)
+            info.varlist.add('PyObject', '*py_' + pname)
+            info.codebefore.append(self.normal % {'name': pname})
+            info.arglist.append(pname)
+            info.add_parselist('O', ['&py_' + pname], [pname])
+        info.codeafter.append(self.freepath % {'name': pname})
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('GtkTreePath', '*ret')
+        if ownsreturn:
+            info.codeafter.append('    if (ret) {\n'
+                                  '        PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n'
+                                  '        gtk_tree_path_free(ret);\n'
+                                  '        return py_ret;\n'
+                                  '    }\n'
+                                  '    Py_INCREF(Py_None);\n'
+                                  '    return Py_None;')
+        else:
+            info.codeafter.append('    if (ret) {\n'
+                                  '        PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n'
+                                  '        return py_ret;\n'
+                                  '    }\n'
+                                  '    Py_INCREF(Py_None);\n'
+                                  '    return Py_None;')
+
+class GdkRectanglePtrArg(ArgType):
+    normal = ('    if (!pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s))\n'
+              '        return NULL;\n')
+    null =   ('    if (py_%(name)s == Py_None)\n'
+              '        %(name)s = NULL;\n'
+              '    else if (pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s_rect))\n'
+              '        %(name)s = &%(name)s_rect;\n'
+              '    else\n'
+              '            return NULL;\n')
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        if pnull:
+            info.varlist.add('GdkRectangle', pname + '_rect = { 0, 0, 0, 0 }')
+            info.varlist.add('GdkRectangle', '*' + pname)
+            info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+            info.add_parselist('O', ['&py_' + pname], [pname])
+            info.arglist.append(pname)
+            info.codebefore.append(self.null % {'name':  pname})
+        else:
+            info.varlist.add('GdkRectangle', pname + ' = { 0, 0, 0, 0 }')
+            info.varlist.add('PyObject', '*py_' + pname)
+            info.add_parselist('O', ['&py_' + pname], [pname])
+            info.arglist.append('&' + pname)
+            info.codebefore.append(self.normal % {'name':  pname})
+
+class GdkRectangleArg(ArgType):
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add('GdkRectangle', 'ret')
+        info.codeafter.append('    return pyg_boxed_new(GDK_TYPE_RECTANGLE, &ret, TRUE, TRUE);')
+
+class PyObjectArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        info.varlist.add('PyObject', '*' + pname)
+        info.add_parselist('O', ['&' + pname], [pname])
+        info.arglist.append(pname)
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add("PyObject", "*ret")
+        if ownsreturn:
+            info.codeafter.append('    if (ret) {\n'
+                                  '       return ret;\n'
+                                  '    }\n'
+                                  '    Py_INCREF(Py_None);\n'
+                                  '    return Py_None;')
+        else:
+            info.codeafter.append('    if (!ret) ret = Py_None;\n'
+                                  '    Py_INCREF(ret);\n'
+                                  '    return ret;')
+
+class CairoArg(ArgType):
+    def write_param(self, ptype, pname, pdflt, pnull, info):
+        info.varlist.add('PycairoContext', '*' + pname)
+        info.add_parselist('O!', ['&PycairoContext_Type', '&' + pname], [pname])
+        info.arglist.append('%s->ctx' % pname)
+    def write_return(self, ptype, ownsreturn, info):
+        info.varlist.add("cairo_t", "*ret")
+        if ownsreturn:
+            info.codeafter.append('    return PycairoContext_FromContext(ret, NULL, NULL);')
+        else:
+            info.codeafter.append('    cairo_reference(ret);\n'
+                                  '    return PycairoContext_FromContext(ret, NULL, NULL);')
+
+
+class ArgMatcher:
+    def __init__(self):
+        self.argtypes = {}
+        self.reverse_argtypes = {}
+        self.reverse_rettypes = {}
+
+    def register(self, ptype, handler, overwrite=False):
+        if not overwrite and ptype in self.argtypes:
+            return
+        self.argtypes[ptype] = handler
+    def register_reverse(self, ptype, handler):
+        self.reverse_argtypes[ptype] = handler
+    def register_reverse_ret(self, ptype, handler):
+        self.reverse_rettypes[ptype] = handler
+
+    def register_enum(self, ptype, typecode):
+        if typecode is None:
+            self.register(ptype, IntArg())
+        else:
+            self.register(ptype, EnumArg(ptype, typecode))
+    def register_flag(self, ptype, typecode):
+        if typecode is None:
+            self.register(ptype, IntArg())
+        else:
+            self.register(ptype, FlagsArg(ptype, typecode))
+    def register_object(self, ptype, parent, typecode):
+        oa = ObjectArg(ptype, parent, typecode)
+        self.register(ptype, oa)  # in case I forget the * in the .defs
+        self.register(ptype+'*', oa)
+        self.register('const-'+ptype+'*', oa)
+        if ptype == 'GdkPixmap':
+            # hack to handle GdkBitmap synonym.
+            self.register('GdkBitmap', oa)
+            self.register('GdkBitmap*', oa)
+    def register_boxed(self, ptype, typecode):
+        if self.argtypes.has_key(ptype): return
+        arg = BoxedArg(ptype, typecode)
+        self.register(ptype, arg)
+        self.register(ptype+'*', arg)
+        self.register('const-'+ptype+'*', arg)
+    def register_custom_boxed(self, ptype, pytype, getter, new):
+        arg = CustomBoxedArg(ptype, pytype, getter, new)
+        self.register(ptype+'*', arg)
+        self.register('const-'+ptype+'*', arg)
+    def register_pointer(self, ptype, typecode):
+        arg = PointerArg(ptype, typecode)
+        self.register(ptype, arg)
+        self.register(ptype+'*', arg)
+        self.register('const-'+ptype+'*', arg)
+
+    def get(self, ptype):
+        try:
+            return self.argtypes[ptype]
+        except KeyError:
+            if ptype[:8] == 'GdkEvent' and ptype[-1] == '*':
+                return self.argtypes['GdkEvent*']
+            raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
+    def _get_reverse_common(self, ptype, registry):
+        props = dict(c_type=ptype)
+        try:
+            return registry[ptype], props
+        except KeyError:
+            try:
+                handler = self.argtypes[ptype]
+            except KeyError:
+                if ptype.startswith('GdkEvent') and ptype.endswith('*'):
+                    handler = self.argtypes['GdkEvent*']
+                else:
+                    raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
+            if isinstance(handler, ObjectArg):
+                return registry['GObject*'], props
+            elif isinstance(handler, EnumArg):
+                props['typecode'] = handler.typecode
+                props['enumname'] = handler.enumname
+                return registry['GEnum'], props
+            elif isinstance(handler, FlagsArg):
+                props['typecode'] = handler.typecode
+                props['flagname'] = handler.flagname
+                return registry['GFlags'], props
+            elif isinstance(handler, BoxedArg):
+                props['typecode'] = handler.typecode
+                props['typename'] = handler.typename
+                return registry['GBoxed'], props
+            else:
+                raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
+    def get_reverse(self, ptype):
+        return self._get_reverse_common(ptype, self.reverse_argtypes)
+    def get_reverse_ret(self, ptype):
+        return self._get_reverse_common(ptype, self.reverse_rettypes)
+
+    def object_is_a(self, otype, parent):
+        if otype == None: return 0
+        if otype == parent: return 1
+        if not self.argtypes.has_key(otype): return 0
+        return self.object_is_a(self.get(otype).parent, parent)
+
+matcher = ArgMatcher()
+
+arg = NoneArg()
+matcher.register(None, arg)
+matcher.register('none', arg)
+
+arg = StringArg()
+matcher.register('char*', arg)
+matcher.register('gchar*', arg)
+matcher.register('const-char*', arg)
+matcher.register('char-const*', arg)
+matcher.register('const-gchar*', arg)
+matcher.register('gchar-const*', arg)
+matcher.register('string', arg)
+matcher.register('static_string', arg)
+
+arg = UCharArg()
+matcher.register('unsigned-char*', arg)
+matcher.register('const-guchar*', arg)
+matcher.register('const-guint8*', arg)
+matcher.register('guchar*', arg)
+
+arg = CharArg()
+matcher.register('char', arg)
+matcher.register('gchar', arg)
+matcher.register('guchar', arg)
+
+arg = GUniCharArg()
+matcher.register('gunichar', arg)
+
+arg = IntArg()
+matcher.register('int', arg)
+matcher.register('gint', arg)
+matcher.register('short', arg)
+matcher.register('gshort', arg)
+matcher.register('gushort', arg)
+matcher.register('gsize', SizeArg())
+matcher.register('gssize', SSizeArg())
+matcher.register('guint8', arg)
+matcher.register('gint8', arg)
+matcher.register('guint16', arg)
+matcher.register('gint16', arg)
+matcher.register('gint32', arg)
+matcher.register('GTime', arg)
+
+arg = LongArg()
+matcher.register('long', arg)
+matcher.register('glong', arg)
+
+arg = UIntArg()
+matcher.register('guint', arg)
+
+arg = BoolArg()
+matcher.register('gboolean', arg)
+
+arg = TimeTArg()
+matcher.register('time_t', arg)
+
+matcher.register('guint32', UInt32Arg())
+
+arg = ULongArg()
+matcher.register('gulong', arg)
+
+arg = Int64Arg()
+matcher.register('gint64', arg)
+matcher.register('long-long', arg)
+
+arg = UInt64Arg()
+matcher.register('guint64', arg)
+matcher.register('unsigned-long-long', arg)
+
+arg = DoubleArg()
+matcher.register('double', arg)
+matcher.register('gdouble', arg)
+matcher.register('float', arg)
+matcher.register('gfloat', arg)
+
+arg = FileArg()
+matcher.register('FILE*', arg)
+
+# enums, flags, objects
+
+matcher.register('GdkAtom', AtomArg())
+
+matcher.register('GType', GTypeArg())
+matcher.register('GtkType', GTypeArg())
+
+matcher.register('GError**', GErrorArg())
+matcher.register('GtkTreePath*', GtkTreePathArg())
+matcher.register('GdkRectangle*', GdkRectanglePtrArg())
+matcher.register('GtkAllocation*', GdkRectanglePtrArg())
+matcher.register('GdkRectangle', GdkRectangleArg())
+matcher.register('PyObject*', PyObjectArg())
+
+matcher.register('GdkNativeWindow', ULongArg())
+
+matcher.register_object('GObject', None, 'G_TYPE_OBJECT')
+
+del arg
+
+matcher.register('cairo_t*', CairoArg())
Index: pkg/pygtk/branches/upstream/current/codegen/defsparser.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/defsparser.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/defsparser.py	(revision 4)
@@ -0,0 +1,153 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import os, sys
+import scmexpr
+from definitions import BoxedDef, EnumDef, FlagsDef, FunctionDef, \
+     InterfaceDef, MethodDef, ObjectDef, PointerDef, VirtualDef
+
+include_path = ['.']
+
+class IncludeParser(scmexpr.Parser):
+    """A simple parser that follows include statements automatically"""
+    def include(self, input_filename):
+        global include_path
+        if os.path.isabs(input_filename):
+            filename = input_filename
+            # set self.filename to the include name, to handle recursive includes
+            oldfile = self.filename
+            self.filename = filename
+            self.startParsing()
+            self.filename = oldfile
+        else:
+            inc_path = [os.path.dirname(self.filename)] + include_path
+            for filename in [os.path.join(path_entry, input_filename)
+                             for path_entry in inc_path]:
+                if not os.path.exists(filename):
+                    continue
+                # set self.filename to the include name, to handle recursive includes
+                oldfile = self.filename
+                self.filename = filename
+                self.startParsing()
+                self.filename = oldfile
+                break
+            else:
+                raise IOError("%s not found in include path %s" % (input_filename, inc_path))
+
+class DefsParser(IncludeParser):
+    def __init__(self, arg, defines={}):
+        IncludeParser.__init__(self, arg)
+        self.objects = []
+        self.interfaces = []
+        self.enums = []      # enums and flags
+        self.boxes = []      # boxed types
+        self.pointers = []   # pointer types
+        self.functions = []  # functions and methods
+        self.virtuals = []   # virtual methods
+        self.c_name = {}     # hash of c names of functions
+        self.methods = {}    # hash of methods of particular objects
+        self.defines = defines      # -Dfoo=bar options, as dictionary
+
+    def define_object(self, *args):
+        odef = apply(ObjectDef, args)
+        self.objects.append(odef)
+        self.c_name[odef.c_name] = odef
+    def define_interface(self, *args):
+        idef = apply(InterfaceDef, args)
+        self.interfaces.append(idef)
+        self.c_name[idef.c_name] = idef
+    def define_enum(self, *args):
+        edef = apply(EnumDef, args)
+        self.enums.append(edef)
+        self.c_name[edef.c_name] = edef
+    def define_flags(self, *args):
+        fdef = apply(FlagsDef, args)
+        self.enums.append(fdef)
+        self.c_name[fdef.c_name] = fdef
+    def define_boxed(self, *args):
+        bdef = apply(BoxedDef, args)
+        self.boxes.append(bdef)
+        self.c_name[bdef.c_name] = bdef
+    def define_pointer(self, *args):
+        pdef = apply(PointerDef, args)
+        self.pointers.append(pdef)
+        self.c_name[pdef.c_name] = pdef
+    def define_function(self, *args):
+        fdef = apply(FunctionDef, args)
+        self.functions.append(fdef)
+        self.c_name[fdef.c_name] = fdef
+    def define_method(self, *args):
+        mdef = apply(MethodDef, args)
+        self.functions.append(mdef)
+        self.c_name[mdef.c_name] = mdef
+    def define_virtual(self, *args):
+        vdef = apply(VirtualDef, args)
+        self.virtuals.append(vdef)
+    def merge(self, old, parmerge):
+        for obj in self.objects:
+            if old.c_name.has_key(obj.c_name):
+                obj.merge(old.c_name[obj.c_name])
+        for f in self.functions:
+            if old.c_name.has_key(f.c_name):
+                f.merge(old.c_name[f.c_name], parmerge)
+
+    def printMissing(self, old):
+        for obj in self.objects:
+            if not old.c_name.has_key(obj.c_name):
+                obj.write_defs()
+        for f in self.functions:
+            if not old.c_name.has_key(f.c_name):
+                f.write_defs()
+
+    def write_defs(self, fp=sys.stdout):
+        for obj in self.objects:
+            obj.write_defs(fp)
+        for enum in self.enums:
+            enum.write_defs(fp)
+        for boxed in self.boxes:
+            boxed.write_defs(fp)
+        for pointer in self.pointers:
+            pointer.write_defs(fp)
+        for func in self.functions:
+            func.write_defs(fp)
+
+    def find_object(self, c_name):
+        for obj in self.objects:
+            if obj.c_name == c_name:
+                return obj
+        else:
+            raise ValueError('object %r not found' % c_name)
+
+    def find_constructor(self, obj, overrides):
+        for func in self.functions:
+            if isinstance(func, FunctionDef) and \
+               func.is_constructor_of == obj.c_name and \
+               not overrides.is_ignored(func.c_name):
+                return func
+
+    def find_methods(self, obj):
+        objname = obj.c_name
+        return filter(lambda func, on=objname: isinstance(func, MethodDef) and
+                      func.of_object == on, self.functions)
+
+    def find_virtuals(self, obj):
+        objname = obj.c_name
+        retval = filter(lambda func, on=objname: isinstance(func, VirtualDef) and
+                        func.of_object == on, self.virtuals)
+        return retval
+
+    def find_functions(self):
+        return filter(lambda func: isinstance(func, FunctionDef) and
+                      not func.is_constructor_of, self.functions)
+
+    def ifdef(self, *args):
+        if args[0] in self.defines:
+            for arg in args[1:]:
+                #print >> sys.stderr, "-----> Handling conditional definition (%s): %s" % (args[0], arg)
+                self.handle(arg)
+        else:
+            pass
+            #print >> sys.stderr, "-----> Conditional %s is not true" % (args[0],)
+
+    def ifndef(self, *args):
+        if args[0] not in self.defines:
+            for arg in args[1:]:
+                self.handle(arg)
Index: pkg/pygtk/branches/upstream/current/codegen/__init__.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/__init__.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/__init__.py	(revision 4)
@@ -0,0 +1,15 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+__all__ = [
+    'argtypes',
+    'codegen',
+    'definitions',
+    'defsparser',
+    'docextract',
+    'docgen',
+    'h2def',
+    'mergedefs',
+    'mkskel',
+    'override',
+    'scmexpr'
+]
Index: pkg/pygtk/branches/upstream/current/codegen/docgen.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/docgen.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/docgen.py	(revision 4)
@@ -0,0 +1,751 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import sys, os, string, re, getopt
+
+import defsparser
+import definitions
+import override
+import docextract
+
+class Node:
+    def __init__(self, name, interfaces=[]):
+        self.name = name
+        self.interfaces = interfaces
+        self.subclasses = []
+    def add_child(self, node):
+        self.subclasses.append(node)
+
+def build_object_tree(parser):
+    # reorder objects so that parent classes come first ...
+    objects = parser.objects[:]
+    pos = 0
+    while pos < len(objects):
+        parent = objects[pos].parent
+        for i in range(pos+1, len(objects)):
+            if objects[i].c_name == parent:
+                objects.insert(i+1, objects[pos])
+                del objects[pos]
+                break
+        else:
+            pos = pos + 1
+
+    root = Node(None)
+    nodes = { None: root }
+    for obj_def in objects:
+        parent_node = nodes[obj_def.parent]
+        node = Node(obj_def.c_name, obj_def.implements)
+        parent_node.add_child(node)
+        nodes[node.name] = node
+
+    if parser.interfaces:
+        interfaces = Node('gobject.GInterface')
+        root.add_child(interfaces)
+        nodes[interfaces.name] = interfaces
+        for obj_def in parser.interfaces:
+            node = Node(obj_def.c_name)
+            interfaces.add_child(node)
+            nodes[node.name] = node
+
+    if parser.boxes:
+        boxed = Node('gobject.GBoxed')
+        root.add_child(boxed)
+        nodes[boxed.name] = boxed
+        for obj_def in parser.boxes:
+            node = Node(obj_def.c_name)
+            boxed.add_child(node)
+            nodes[node.name] = node
+
+    if parser.pointers:
+        pointers = Node('gobject.GPointer')
+        root.add_child(pointers)
+        nodes[pointers.name] = pointers
+        for obj_def in parser.pointers:
+            node = Node(obj_def.c_name)
+            pointers.add_child(node)
+            nodes[node.name] = node
+
+    return root
+
+class DocWriter:
+    def __init__(self):
+        # parse the defs file
+        self.parser = defsparser.DefsParser(())
+        self.overrides = override.Overrides()
+        self.classmap = {}
+        self.docs = {}
+
+    def add_sourcedirs(self, source_dirs):
+        self.docs = docextract.extract(source_dirs, self.docs)
+    def add_tmpldirs(self, tmpl_dirs):
+        self.docs = docextract.extract_tmpl(tmpl_dirs, self.docs)
+
+    def add_docs(self, defs_file, overrides_file, module_name):
+        '''parse information about a given defs file'''
+        self.parser.filename = defs_file
+        self.parser.startParsing(defs_file)
+        if overrides_file:
+            self.overrides.handle_file(overrides_file)
+
+        for obj in self.parser.objects:
+            if not self.classmap.has_key(obj.c_name):
+                self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name)
+        for obj in self.parser.interfaces:
+            if not self.classmap.has_key(obj.c_name):
+                self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name)
+        for obj in self.parser.boxes:
+            if not self.classmap.has_key(obj.c_name):
+                self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name)
+        for obj in self.parser.pointers:
+            if not self.classmap.has_key(obj.c_name):
+                self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name)
+
+    def pyname(self, name):
+        return self.classmap.get(name, name)
+
+    def __compare(self, obja, objb):
+        return cmp(self.pyname(obja.c_name), self.pyname(objb.c_name))
+    def output_docs(self, output_prefix):
+        files = []
+
+        # class hierarchy
+        hierarchy = build_object_tree(self.parser)
+        filename = self.create_filename('hierarchy', output_prefix)
+        fp = open(filename, 'w')
+        self.write_full_hierarchy(hierarchy, fp)
+        fp.close()
+
+        obj_defs = self.parser.objects + self.parser.interfaces + \
+                   self.parser.boxes + self.parser.pointers
+        obj_defs.sort(self.__compare)
+        for obj_def in obj_defs:
+            filename = self.create_filename(obj_def.c_name, output_prefix)
+            fp = open(filename, 'w')
+            if isinstance(obj_def, definitions.ObjectDef):
+                self.output_object_docs(obj_def, fp)
+            elif isinstance(obj_def, definitions.InterfaceDef):
+                self.output_interface_docs(obj_def, fp)
+            elif isinstance(obj_def, definitions.BoxedDef):
+                self.output_boxed_docs(obj_def, fp)
+            elif isinstance(obj_def, definitions.PointerDef):
+                self.output_boxed_docs(obj_def, fp)
+            fp.close()
+            files.append((os.path.basename(filename), obj_def))
+
+        if files:
+            filename = self.create_toc_filename(output_prefix)
+            fp = open(filename, 'w')
+            self.output_toc(files, fp)
+            fp.close()
+
+    def output_object_docs(self, obj_def, fp=sys.stdout):
+        self.write_class_header(obj_def.c_name, fp)
+
+        self.write_heading('Synopsis', fp)
+        self.write_synopsis(obj_def, fp)
+        self.close_section(fp)
+
+        # construct the inheritence hierarchy ...
+        ancestry = [ (obj_def.c_name, obj_def.implements) ]
+        try:
+            parent = obj_def.parent
+            while parent != None:
+                if parent == 'GObject':
+                    ancestry.append(('GObject', []))
+                    parent = None
+                else:
+                    parent_def = self.parser.find_object(parent)
+                    ancestry.append((parent_def.c_name, parent_def.implements))
+                    parent = parent_def.parent
+        except ValueError:
+            pass
+        ancestry.reverse()
+        self.write_heading('Ancestry', fp)
+        self.write_hierarchy(obj_def.c_name, ancestry, fp)
+        self.close_section(fp)
+
+        constructor = self.parser.find_constructor(obj_def, self.overrides)
+        if constructor:
+            self.write_heading('Constructor', fp)
+            self.write_constructor(constructor,
+                                   self.docs.get(constructor.c_name, None),
+                                   fp)
+            self.close_section(fp)
+
+        methods = self.parser.find_methods(obj_def)
+        methods = filter(lambda meth, self=self:
+                         not self.overrides.is_ignored(meth.c_name), methods)
+        if methods:
+            self.write_heading('Methods', fp)
+            for method in methods:
+                self.write_method(method, self.docs.get(method.c_name, None), fp)
+            self.close_section(fp)
+
+        self.write_class_footer(obj_def.c_name, fp)
+
+    def output_interface_docs(self, int_def, fp=sys.stdout):
+        self.write_class_header(int_def.c_name, fp)
+
+        self.write_heading('Synopsis', fp)
+        self.write_synopsis(int_def, fp)
+        self.close_section(fp)
+
+        methods = self.parser.find_methods(int_def)
+        methods = filter(lambda meth, self=self:
+                         not self.overrides.is_ignored(meth.c_name), methods)
+        if methods:
+            self.write_heading('Methods', fp)
+            for method in methods:
+                self.write_method(method, self.docs.get(method.c_name, None), fp)
+            self.close_section(fp)
+
+        self.write_class_footer(int_def.c_name, fp)
+
+    def output_boxed_docs(self, box_def, fp=sys.stdout):
+        self.write_class_header(box_def.c_name, fp)
+
+        self.write_heading('Synopsis', fp)
+        self.write_synopsis(box_def, fp)
+        self.close_section(fp)
+
+        constructor = self.parser.find_constructor(box_def, self.overrides)
+        if constructor:
+            self.write_heading('Constructor', fp)
+            self.write_constructor(constructor,
+                                   self.docs.get(constructor.c_name, None),
+                                   fp)
+            self.close_section(fp)
+
+        methods = self.parser.find_methods(box_def)
+        methods = filter(lambda meth, self=self:
+                         not self.overrides.is_ignored(meth.c_name), methods)
+        if methods:
+            self.write_heading('Methods', fp)
+            for method in methods:
+                self.write_method(method, self.docs.get(method.c_name, None), fp)
+            self.close_section(fp)
+
+        self.write_class_footer(box_def.c_name, fp)
+
+    def output_toc(self, files, fp=sys.stdout):
+        fp.write('TOC\n\n')
+        for filename, obj_def in files:
+            fp.write(obj_def.c_name + ' - ' + filename + '\n')
+
+    # override the following to create a more complex output format
+    def create_filename(self, obj_name, output_prefix):
+        '''Create output filename for this particular object'''
+        return output_prefix + '-' + string.lower(obj_name) + '.txt'
+    def create_toc_filename(self, output_prefix):
+        return self.create_filename(self, 'docs', output_prefix)
+
+    def write_full_hierarchy(self, hierarchy, fp):
+        def handle_node(node, fp, indent=''):
+            for child in node.subclasses:
+                fp.write(indent + node.name)
+                if node.interfaces:
+                    fp.write(' (implements ')
+                    fp.write(string.join(node.interfaces, ', '))
+                    fp.write(')\n')
+                else:
+                    fp.write('\n')
+                handle_node(child, fp, indent + '  ')
+        handle_node(hierarchy, fp)
+
+    # these need to handle default args ...
+    def create_constructor_prototype(self, func_def):
+        return func_def.is_constructor_of + '(' + \
+               string.join(map(lambda x: x[1], func_def.params), ', ') + \
+               ')'
+    def create_function_prototype(self, func_def):
+        return func_def.name + '(' + \
+               string.join(map(lambda x: x[1], func_def.params), ', ') + \
+               ')'
+    def create_method_prototype(self, meth_def):
+        return meth_def.of_object + '.' + \
+               meth_def.name + '(' + \
+               string.join(map(lambda x: x[1], meth_def.params), ', ') + \
+               ')'
+
+    def write_class_header(self, obj_name, fp):
+        fp.write('Class %s\n' % obj_name)
+        fp.write('======%s\n\n' % ('=' * len(obj_name)))
+    def write_class_footer(self, obj_name, fp):
+        pass
+    def write_heading(self, text, fp):
+        fp.write('\n' + text + '\n' + ('-' * len(text)) + '\n')
+    def close_section(self, fp):
+        pass
+    def write_synopsis(self, obj_def, fp):
+        fp.write('class %s' % obj_def.c_name)
+        if isinstance(obj_def, definitions.ObjectDef):
+            bases = []
+            if obj_def.parent: bases.append(obj_def.parent)
+            bases = bases = obj_def.implements
+            if bases:
+                fp.write('(%s)' % string.join(bases, ', '))
+        fp.write(':\n')
+
+        constructor = self.parser.find_constructor(obj_def, self.overrides)
+        if constructor:
+            prototype = self.create_constructor_prototype(constructor)
+            fp.write('    def %s\n' % prototype)
+        methods = self.parser.find_methods(obj_def)
+        methods = filter(lambda meth, self=self:
+                         not self.overrides.is_ignored(meth.c_name), methods)
+        for meth in methods:
+            prototype = self.create_method_prototype(meth)
+            fp.write('    def %s\n' % prototype)
+
+    def write_hierarchy(self, obj_name, ancestry, fp):
+        indent = ''
+        for name, interfaces in ancestry:
+            fp.write(indent + '+-- ' + name)
+            if interfaces:
+                fp.write(' (implements ')
+                fp.write(string.join(interfaces, ', '))
+                fp.write(')\n')
+            else:
+                fp.write('\n')
+            indent = indent + '  '
+        fp.write('\n')
+    def write_constructor(self, func_def, func_doc, fp):
+        prototype = self.create_constructor_prototype(func_def)
+        fp.write(prototype + '\n\n')
+        for type, name, dflt, null in func_def.params:
+            if func_doc:
+                descr = func_doc.get_param_description(name)
+            else:
+                descr = 'a ' + type
+            fp.write('  ' + name + ': ' + descr + '\n')
+        if func_def.ret and func_def.ret != 'none':
+            if func_doc and func_doc.ret:
+                descr = func_doc.ret
+            else:
+                descr = 'a ' + func_def.ret
+            fp.write('  Returns: ' + descr + '\n')
+        if func_doc and func_doc.description:
+            fp.write(func_doc.description)
+        fp.write('\n\n\n')
+    def write_method(self, meth_def, func_doc, fp):
+        prototype = self.create_method_prototype(meth_def)
+        fp.write(prototype + '\n\n')
+        for type, name, dflt, null in meth_def.params:
+            if func_doc:
+                descr = func_doc.get_param_description(name)
+            else:
+                descr = 'a ' + type
+            fp.write('  ' + name + ': ' + descr + '\n')
+        if meth_def.ret and meth_def.ret != 'none':
+            if func_doc and func_doc.ret:
+                descr = func_doc.ret
+            else:
+                descr = 'a ' + meth_def.ret
+            fp.write('  Returns: ' + descr + '\n')
+        if func_doc and func_doc.description:
+            fp.write('\n')
+            fp.write(func_doc.description)
+        fp.write('\n\n')
+
+class DocbookDocWriter(DocWriter):
+    def __init__(self, use_xml=0):
+        DocWriter.__init__(self)
+        self.use_xml = use_xml
+
+    def create_filename(self, obj_name, output_prefix):
+        '''Create output filename for this particular object'''
+        stem = output_prefix + '-' + string.lower(obj_name)
+        if self.use_xml:
+            return stem + '.xml'
+        else:
+            return stem + '.sgml'
+    def create_toc_filename(self, output_prefix):
+        if self.use_xml:
+            return self.create_filename('classes', output_prefix)
+        else:
+            return self.create_filename('docs', output_prefix)
+
+    # make string -> reference translation func
+    __transtable = [ '-' ] * 256
+    for digit in '0123456789':
+        __transtable[ord(digit)] = digit
+    for letter in 'abcdefghijklmnopqrstuvwxyz':
+        __transtable[ord(letter)] = letter
+        __transtable[ord(string.upper(letter))] = letter
+    __transtable = string.join(__transtable, '')
+
+    def make_class_ref(self, obj_name):
+        return 'class-' + string.translate(obj_name, self.__transtable)
+    def make_method_ref(self, meth_def):
+        return 'method-' + string.translate(meth_def.of_object,
+                                            self.__transtable) + \
+            '--' + string.translate(meth_def.name, self.__transtable)
+
+    __function_pat = re.compile(r'(\w+)\s*\(\)')
+    def __format_function(self, match):
+        info = self.parser.c_name.get(match.group(1), None)
+        if info:
+            if isinstance(info, defsparser.FunctionDef):
+                if info.is_constructor_of is not None:
+                    # should have a link here
+                    return '<function>%s()</function>' % \
+                           self.pyname(info.is_constructor_of)
+                else:
+                    return '<function>' + info.name + '()</function>'
+            if isinstance(info, defsparser.MethodDef):
+                return '<link linkend="' + self.make_method_ref(info) + \
+                       '"><function>' + self.pyname(info.of_object) + '.' + \
+                       info.name + '()</function></link>'
+        # fall through through
+        return '<function>' + match.group(1) + '()</function>'
+    __parameter_pat = re.compile(r'\@(\w+)')
+    def __format_param(self, match):
+        return '<parameter>' + match.group(1) + '</parameter>'
+    __constant_pat = re.compile(r'\%(-?\w+)')
+    def __format_const(self, match):
+        return '<literal>' + match.group(1) + '</literal>'
+    __symbol_pat = re.compile(r'#([\w-]+)')
+    def __format_symbol(self, match):
+        info = self.parser.c_name.get(match.group(1), None)
+        if info:
+            if isinstance(info, defsparser.FunctionDef):
+                if info.is_constructor_of is not None:
+                    # should have a link here
+                    return '<methodname>' + self.pyname(info.is_constructor_of) + \
+                           '</methodname>'
+                else:
+                    return '<function>' + info.name + '</function>'
+            if isinstance(info, defsparser.MethodDef):
+                return '<link linkend="' + self.make_method_ref(info) + \
+                       '"><methodname>' + self.pyname(info.of_object) + '.' + \
+                       info.name + '</methodname></link>'
+            if isinstance(info, defsparser.ObjectDef) or \
+                   isinstance(info, defsparser.InterfaceDef) or \
+                   isinstance(info, defsparser.BoxedDef) or \
+                   isinstance(info, defsparser.PointerDef):
+                return '<link linkend="' + self.make_class_ref(info.c_name) + \
+                       '"><classname>' + self.pyname(info.c_name) + \
+                       '</classname></link>'
+        # fall through through
+        return '<literal>' + match.group(1) + '</literal>'
+
+    def reformat_text(self, text, singleline=0):
+        # replace special strings ...
+        text = self.__function_pat.sub(self.__format_function, text)
+        text = self.__parameter_pat.sub(self.__format_param, text)
+        text = self.__constant_pat.sub(self.__format_const, text)
+        text = self.__symbol_pat.sub(self.__format_symbol, text)
+
+        # don't bother with <para> expansion for single line text.
+        if singleline: return text
+
+        lines = string.split(string.strip(text), '\n')
+        for index in range(len(lines)):
+            if string.strip(lines[index]) == '':
+                lines[index] = '</para>\n<para>'
+                continue
+        lines.insert(0, '<para>')
+        lines.append('</para>')
+        return string.join(lines, '\n')
+
+    # write out hierarchy
+    def write_full_hierarchy(self, hierarchy, fp):
+        def handle_node(node, fp, indent=''):
+            if node.name:
+                fp.write('%s<link linkend="%s">%s</link>' %
+                         (indent, self.make_class_ref(node.name),
+                          self.pyname(node.name)))
+                if node.interfaces:
+                    fp.write(' (implements ')
+                    for i in range(len(node.interfaces)):
+                        fp.write('<link linkend="%s">%s</link>' %
+                                 (self.make_class_ref(node.interfaces[i]),
+                                  self.pyname(node.interfaces[i])))
+                        if i != len(node.interfaces) - 1:
+                            fp.write(', ')
+                    fp.write(')\n')
+                else:
+                    fp.write('\n')
+
+                indent = indent + '  '
+            node.subclasses.sort(lambda a,b:
+                                 cmp(self.pyname(a.name), self.pyname(b.name)))
+            for child in node.subclasses:
+                handle_node(child, fp, indent)
+        if self.use_xml:
+            fp.write('<?xml version="1.0" standalone="no"?>\n')
+            fp.write('<!DOCTYPE synopsis PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"\n')
+            fp.write('    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">\n')
+        fp.write('<synopsis>')
+        handle_node(hierarchy, fp)
+        fp.write('</synopsis>\n')
+
+    # these need to handle default args ...
+    def create_constructor_prototype(self, func_def):
+        sgml = [ '<constructorsynopsis language="python">\n']
+        sgml.append('    <methodname>__init__</methodname>\n')
+        for type, name, dflt, null in func_def.params:
+            sgml.append('    <methodparam><parameter>')
+            sgml.append(name)
+            sgml.append('</parameter>')
+            if dflt:
+                sgml.append('<initializer>')
+                sgml.append(dflt)
+                sgml.append('</initializer>')
+            sgml.append('</methodparam>\n')
+        if not func_def.params:
+            sgml.append('    <methodparam></methodparam>')
+        sgml.append('  </constructorsynopsis>')
+        return string.join(sgml, '')
+    def create_function_prototype(self, func_def):
+        sgml = [ '<funcsynopsis language="python">\n    <funcprototype>\n']
+        sgml.append('      <funcdef><function>')
+        sgml.append(func_def.name)
+        sgml.append('</function></funcdef>\n')
+        for type, name, dflt, null in func_def.params:
+            sgml.append('      <paramdef><parameter>')
+            sgml.append(name)
+            sgml.append('</parameter>')
+            if dflt:
+                sgml.append('<initializer>')
+                sgml.append(dflt)
+                sgml.append('</initializer>')
+            sgml.append('</paramdef>\n')
+        if not func_def.params:
+            sgml.append('      <paramdef></paramdef')
+        sgml.append('    </funcprototype>\n  </funcsynopsis>')
+        return string.join(sgml, '')
+    def create_method_prototype(self, meth_def, addlink=0):
+        sgml = [ '<methodsynopsis language="python">\n']
+        sgml.append('    <methodname>')
+        if addlink:
+            sgml.append('<link linkend="%s">' % self.make_method_ref(meth_def))
+        sgml.append(self.pyname(meth_def.name))
+        if addlink:
+            sgml.append('</link>')
+        sgml.append('</methodname>\n')
+        for type, name, dflt, null in meth_def.params:
+            sgml.append('    <methodparam><parameter>')
+            sgml.append(name)
+            sgml.append('</parameter>')
+            if dflt:
+                sgml.append('<initializer>')
+                sgml.append(dflt)
+                sgml.append('</initializer>')
+            sgml.append('</methodparam>\n')
+        if not meth_def.params:
+            sgml.append('    <methodparam></methodparam>')
+        sgml.append('  </methodsynopsis>')
+        return string.join(sgml, '')
+
+    def write_class_header(self, obj_name, fp):
+        if self.use_xml:
+            fp.write('<?xml version="1.0" standalone="no"?>\n')
+            fp.write('<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"\n')
+            fp.write('    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">\n')
+        fp.write('<refentry id="' + self.make_class_ref(obj_name) + '">\n')
+        fp.write('  <refmeta>\n')
+        fp.write('    <refentrytitle>%s</refentrytitle>\n'
+                 % self.pyname(obj_name))
+        fp.write('    <manvolnum>3</manvolnum>\n')
+        fp.write('    <refmiscinfo>PyGTK Docs</refmiscinfo>\n')
+        fp.write('  </refmeta>\n\n')
+        fp.write('  <refnamediv>\n')
+        fp.write('    <refname>%s</refname><refpurpose></refpurpose>\n'
+                 % self.pyname(obj_name))
+        fp.write('  </refnamediv>\n\n')
+    def write_class_footer(self, obj_name, fp):
+        fp.write('</refentry>\n')
+    def write_heading(self, text, fp):
+        fp.write('  <refsect1>\n')
+        fp.write('    <title>' + text + '</title>\n\n')
+    def close_section(self, fp):
+        fp.write('  </refsect1>\n')
+
+    def write_synopsis(self, obj_def, fp):
+        fp.write('<classsynopsis language="python">\n')
+        fp.write('  <ooclass><classname>%s</classname></ooclass>\n'
+                 % self.pyname(obj_def.c_name))
+        if isinstance(obj_def, definitions.ObjectDef):
+            if obj_def.parent:
+                fp.write('  <ooclass><classname><link linkend="%s">%s'
+                         '</link></classname></ooclass>\n'
+                         % (self.make_class_ref(obj_def.parent),
+                            self.pyname(obj_def.parent)))
+            for base in obj_def.implements:
+                fp.write('  <ooclass><classname><link linkend="%s">%s'
+                         '</link></classname></ooclass>\n'
+                         % (self.make_class_ref(base), self.pyname(base)))
+        elif isinstance(obj_def, definitions.InterfaceDef):
+            fp.write('  <ooclass><classname>gobject.GInterface'
+                     '</classname></ooclass>\n')
+        elif isinstance(obj_def, definitions.BoxedDef):
+            fp.write('  <ooclass><classname>gobject.GBoxed'
+                     '</classname></ooclass>\n')
+        elif isinstance(obj_def, definitions.PointerDef):
+            fp.write('  <ooclass><classname>gobject.GPointer'
+                     '</classname></ooclass>\n')
+
+        constructor = self.parser.find_constructor(obj_def, self.overrides)
+        if constructor:
+            fp.write('%s\n' % self.create_constructor_prototype(constructor))
+        methods = self.parser.find_methods(obj_def)
+        methods = filter(lambda meth, self=self:
+                         not self.overrides.is_ignored(meth.c_name), methods)
+        for meth in methods:
+            fp.write('%s\n' % self.create_method_prototype(meth, addlink=1))
+        fp.write('</classsynopsis>\n\n')
+
+    def write_hierarchy(self, obj_name, ancestry, fp):
+        fp.write('<synopsis>')
+        indent = ''
+        for name, interfaces in ancestry:
+            fp.write(indent + '+-- <link linkend="' +
+                     self.make_class_ref(name) + '">'+ self.pyname(name) + '</link>')
+            if interfaces:
+                fp.write(' (implements ')
+                for i in range(len(interfaces)):
+                    fp.write('<link linkend="%s">%s</link>' %
+                             (self.make_class_ref(interfaces[i]),
+                              self.pyname(interfaces[i])))
+                    if i != len(interfaces) - 1:
+                        fp.write(', ')
+                fp.write(')\n')
+            else:
+                fp.write('\n')
+            indent = indent + '  '
+        fp.write('</synopsis>\n\n')
+
+    def write_params(self, params, ret, func_doc, fp):
+        if not params and (not ret or ret == 'none'):
+            return
+        fp.write('  <variablelist>\n')
+        for type, name, dflt, null in params:
+            if func_doc:
+                descr = string.strip(func_doc.get_param_description(name))
+            else:
+                descr = 'a ' + type
+            fp.write('    <varlistentry>\n')
+            fp.write('      <term><parameter>%s</parameter>&nbsp;:</term>\n' % name)
+            fp.write('      <listitem><simpara>%s</simpara></listitem>\n' %
+                     self.reformat_text(descr, singleline=1))
+            fp.write('    </varlistentry>\n')
+        if ret and ret != 'none':
+            if func_doc and func_doc.ret:
+                descr = string.strip(func_doc.ret)
+            else:
+                descr = 'a ' + ret
+            fp.write('    <varlistentry>\n')
+            fp.write('      <term><emphasis>Returns</emphasis>&nbsp;:</term>\n')
+            fp.write('      <listitem><simpara>%s</simpara></listitem>\n' %
+                     self.reformat_text(descr, singleline=1))
+            fp.write('    </varlistentry>\n')
+        fp.write('  </variablelist>\n')
+
+    def write_constructor(self, func_def, func_doc, fp):
+        prototype = self.create_constructor_prototype(func_def)
+        fp.write('<programlisting>%s</programlisting>\n' % prototype)
+        self.write_params(func_def.params, func_def.ret, func_doc, fp)
+
+        if func_doc and func_doc.description:
+            fp.write(self.reformat_text(func_doc.description))
+        fp.write('\n\n\n')
+
+    def write_method(self, meth_def, func_doc, fp):
+        fp.write('  <refsect2 id="' + self.make_method_ref(meth_def) + '">\n')
+        fp.write('    <title>' + self.pyname(meth_def.of_object) + '.' +
+                 meth_def.name + '</title>\n\n')
+        prototype = self.create_method_prototype(meth_def)
+        fp.write('<programlisting>%s</programlisting>\n' % prototype)
+        self.write_params(meth_def.params, meth_def.ret, func_doc, fp)
+        if func_doc and func_doc.description:
+            fp.write(self.reformat_text(func_doc.description))
+        fp.write('  </refsect2>\n\n\n')
+
+    def output_toc(self, files, fp=sys.stdout):
+        if self.use_xml:
+            fp.write('<?xml version="1.0" standalone="no"?>\n')
+            fp.write('<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"\n')
+            fp.write('    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">\n')
+            #for filename, obj_def in files:
+            #    fp.write('  <!ENTITY ' + string.translate(obj_def.c_name,
+            #                                              self.__transtable) +
+            #             ' SYSTEM "' + filename + '" >\n')
+            #fp.write(']>\n\n')
+
+            #fp.write('<reference id="class-reference">\n')
+            #fp.write('  <title>Class Documentation</title>\n')
+            #for filename, obj_def in files:
+            #    fp.write('&' + string.translate(obj_def.c_name,
+            #                                    self.__transtable) + ';\n')
+            #fp.write('</reference>\n')
+
+            fp.write('<reference id="class-reference" xmlns:xi="http://www.w3.org/2001/XInclude">\n')
+            fp.write('  <title>Class Reference</title>\n')
+            for filename, obj_def in files:
+                fp.write('  <xi:include href="%s"/>\n' % filename)
+            fp.write('</reference>\n')
+        else:
+            fp.write('<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1.2//EN" [\n')
+            for filename, obj_def in files:
+                fp.write('  <!ENTITY ' + string.translate(obj_def.c_name,
+                                                          self.__transtable) +
+                         ' SYSTEM "' + filename + '" >\n')
+            fp.write(']>\n\n')
+
+            fp.write('<book id="index">\n\n')
+            fp.write('  <bookinfo>\n')
+            fp.write('    <title>PyGTK Docs</title>\n')
+            fp.write('    <authorgroup>\n')
+            fp.write('      <author>\n')
+            fp.write('        <firstname>James</firstname>\n')
+            fp.write('        <surname>Henstridge</surname>\n')
+            fp.write('      </author>\n')
+            fp.write('    </authorgroup>\n')
+            fp.write('  </bookinfo>\n\n')
+
+            fp.write('  <chapter id="class-hierarchy">\n')
+            fp.write('    <title>Class Hierarchy</title>\n')
+            fp.write('    <para>Not done yet</para>\n')
+            fp.write('  </chapter>\n\n')
+
+            fp.write('  <reference id="class-reference">\n')
+            fp.write('    <title>Class Documentation</title>\n')
+            for filename, obj_def in files:
+                fp.write('&' + string.translate(obj_def.c_name,
+                                                self.__transtable) + ';\n')
+
+            fp.write('  </reference>\n')
+            fp.write('</book>\n')
+
+if __name__ == '__main__':
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "d:s:o:",
+                                   ["defs-file=", "override=", "source-dir=",
+                                    "output-prefix="])
+    except getopt.error, e:
+        sys.stderr.write('docgen.py: %s\n' % e)
+        sys.stderr.write(
+            'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n')
+        sys.exit(1)
+    defs_file = None
+    overrides_file = None
+    source_dirs = []
+    output_prefix = 'docs'
+    for opt, arg in opts:
+        if opt in ('-d', '--defs-file'):
+            defs_file = arg
+        if opt in ('--override',):
+            overrides_file = arg
+        elif opt in ('-s', '--source-dir'):
+            source_dirs.append(arg)
+        elif opt in ('-o', '--output-prefix'):
+            output_prefix = arg
+    if len(args) != 0 or not defs_file:
+        sys.stderr.write(
+            'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n')
+        sys.exit(1)
+
+    d = DocbookDocWriter()
+    d.add_sourcedirs(source_dirs)
+    d.add_docs(defs_file, overrides_file, 'gtk')
+    d.output_docs(output_prefix)
Index: pkg/pygtk/branches/upstream/current/codegen/docextract.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/docextract.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/docextract.py	(revision 4)
@@ -0,0 +1,185 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+'''Simple module for extracting GNOME style doc comments from C
+sources, so I can use them for other purposes.'''
+
+import sys, os, string, re
+
+__all__ = ['extract']
+
+class FunctionDoc:
+    def __init__(self):
+        self.name = None
+        self.params = []
+        self.description = ''
+        self.ret = ''
+    def set_name(self, name):
+        self.name = name
+    def add_param(self, name, description):
+        if name == '...':
+            name = 'Varargs'
+        self.params.append((name, description))
+    def append_to_last_param(self, extra):
+        self.params[-1] = (self.params[-1][0], self.params[-1][1] + extra)
+    def append_to_named_param(self, name, extra):
+        for i in range(len(self.params)):
+            if self.params[i][0] == name:
+                self.params[i] = (name, self.params[i][1] + extra)
+                return
+        # fall through to adding extra parameter ...
+        self.add_param(name, extra)
+    def append_description(self, extra):
+        self.description = self.description + extra
+    def append_return(self, extra):
+        self.ret = self.ret + extra
+
+    def get_param_description(self, name):
+        for param, description in self.params:
+            if param == name:
+                return description
+        else:
+            return ''
+
+comment_start_pat = re.compile(r'^\s*/\*\*\s')
+comment_end_pat = re.compile(r'^\s*\*+/')
+comment_line_lead = re.compile(r'^\s*\*\s*')
+funcname_pat = re.compile(r'^(\w+)\s*:?')
+return_pat = re.compile(r'^(returns:|return\s+value:|returns\s*)(.*\n?)$',
+                        re.IGNORECASE)
+param_pat = re.compile(r'^@(\S+)\s*:(.*\n?)$')
+
+def parse_file(fp, doc_dict):
+    line = fp.readline()
+    in_comment_block = 0
+    while line:
+        if not in_comment_block:
+            if comment_start_pat.match(line):
+                in_comment_block = 1
+                cur_doc = FunctionDoc()
+                in_description = 0
+                in_return = 0
+            line = fp.readline()
+            continue
+
+        # we are inside a comment block ...
+        if comment_end_pat.match(line):
+            if not cur_doc.name:
+                sys.stderr.write("no function name found in doc comment\n")
+            else:
+                doc_dict[cur_doc.name] = cur_doc
+            in_comment_block = 0
+            line = fp.readline()
+            continue
+
+        # inside a comment block, and not the end of the block ...
+        line = comment_line_lead.sub('', line)
+        if not line: line = '\n'
+
+        if not cur_doc.name:
+            match = funcname_pat.match(line)
+            if match:
+                cur_doc.set_name(match.group(1))
+        elif in_return:
+            match = return_pat.match(line)
+            if match:
+                # assume the last return statement was really part of the
+                # description
+                return_start = match.group(1)
+                cur_doc.ret = match.group(2)
+                cur_doc.description = cur_doc.description + return_start + \
+                                      cur_doc.ret
+            else:
+                cur_doc.append_return(line)
+        elif in_description:
+            if line[:12] == 'Description:':
+                line = line[12:]
+            match = return_pat.match(line)
+            if match:
+                in_return = 1
+                return_start = match.group(1)
+                cur_doc.append_return(match.group(2))
+            else:
+                cur_doc.append_description(line)
+        elif line == '\n':
+            # end of parameters
+            in_description = 1
+        else:
+            match = param_pat.match(line)
+            if match:
+                param = match.group(1)
+                desc = match.group(2)
+                if param == 'returns':
+                    cur_doc.ret = desc
+                else:
+                    cur_doc.add_param(param, desc)
+            else:
+                # must be continuation
+                try:
+                    if param == 'returns':
+                        cur_doc.append_return(line)
+                    else:
+                        cur_doc.append_to_last_param(line)
+                except:
+                    sys.stderr.write('something weird while reading param\n')
+        line = fp.readline()
+
+def parse_dir(dir, doc_dict):
+    for file in os.listdir(dir):
+        if file in ('.', '..'): continue
+        path = os.path.join(dir, file)
+        if os.path.isdir(path):
+            parse_dir(path, doc_dict)
+        if len(file) > 2 and file[-2:] == '.c':
+            parse_file(open(path, 'r'), doc_dict)
+
+def extract(dirs, doc_dict=None):
+    if not doc_dict: doc_dict = {}
+    for dir in dirs:
+        parse_dir(dir, doc_dict)
+    return doc_dict
+
+tmpl_section_pat = re.compile(r'^<!-- ##### (\w+) (\w+) ##### -->$')
+def parse_tmpl(fp, doc_dict):
+    cur_doc = None
+
+    line = fp.readline()
+    while line:
+        match = tmpl_section_pat.match(line)
+        if match:
+            cur_doc = None  # new input shouldn't affect the old doc dict
+            sect_type = match.group(1)
+            sect_name = match.group(2)
+
+            if sect_type == 'FUNCTION':
+                cur_doc = doc_dict.get(sect_name)
+                if not cur_doc:
+                    cur_doc = FunctionDoc()
+                    cur_doc.set_name(sect_name)
+                    doc_dict[sect_name] = cur_doc
+        elif line == '<!-- # Unused Parameters # -->\n':
+            cur_doc = None # don't worry about unused params.
+        elif cur_doc:
+            if line[:10] == '@Returns: ':
+                if string.strip(line[10:]):
+                    cur_doc.append_return(line[10:])
+            elif line[0] == '@':
+                pos = string.find(line, ':')
+                if pos >= 0:
+                    cur_doc.append_to_named_param(line[1:pos], line[pos+1:])
+                else:
+                    cur_doc.append_description(line)
+            else:
+                cur_doc.append_description(line)
+
+        line = fp.readline()
+
+def extract_tmpl(dirs, doc_dict=None):
+    if not doc_dict: doc_dict = {}
+    for dir in dirs:
+        for file in os.listdir(dir):
+            if file in ('.', '..'): continue
+            path = os.path.join(dir, file)
+            if os.path.isdir(path):
+                continue
+            if len(file) > 2 and file[-2:] == '.sgml':
+                parse_tmpl(open(path, 'r'), doc_dict)
+    return doc_dict
Index: pkg/pygtk/branches/upstream/current/codegen/mergedefs.py
===================================================================
--- pkg/pygtk/branches/upstream/current/codegen/mergedefs.py	(revision 4)
+++ pkg/pygtk/branches/upstream/current/codegen/mergedefs.py	(revision 4)
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import optparse
+
+import defsparser
+
+parser = optparse.OptionParser(
+    usage="usage: %prog [options] generated-defs old-defs")
+parser.add_option("-p", "--merge-parameters",
+                  help="Merge changes in function/methods parameter lists",
+                  action="store_true", dest="parmerge", default=False)
+(options, args) = parser.parse_args()
+
+if len(args) != 2:
+    parser.error("wrong number of arguments")
+
+newp = defsparser.DefsParser(args[0])
+oldp = defsparser.DefsParser(args[1])
+
+newp.startParsing()
+oldp.startParsing()
+
+newp.merge(oldp, options.parmerge)
+
+newp.write_defs()
Index: pkg/pygtk/branches/upstream/current/TODO
===================================================================
--- pkg/pygtk/branches/upstream/current/TODO	(revision 4)
+++ pkg/pygtk/branches/upstream/current/TODO	(revision 4)
@@ -0,0 +1,12 @@
+This list is out of date.  Query bugzilla.gnome.org for an up to date
+list.
+
+Things to do for the gtk 2.0 based release
+
+- fix up threading to work with GObject/GSignal/GClosure.  See the
+  THREADS file for more info on what is required.
+
+- Implement a new PyGtkTreeModel GObject type that can be the base for
+  new tree models defined in Python.  Need to look at how the
+  GtkTreeIter->tree_node lifetime is handled, as it doesn't look like
+  anything is called to let us know that that data should be unrefed.
Index: pkg/pygtk/branches/upstream/current/atkmodule.c
===================================================================
--- pkg/pygtk/branches/upstream/current/atkmodule.c	(revision 4)
+++ pkg/pygtk/branches/upstream/current/atkmodule.c	(revision 4)
@@ -0,0 +1,48 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   atkmodule.c: module wrapping the ATK library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* include this first, before NO_IMPORT_PYGOBJECT is defined */
+#include <pygobject.h>
+
+void pyatk_register_classes (PyObject *d);
+void pyatk_add_constants(PyObject *module, const gchar *strip_prefix);
+void _pyatk_register_boxed_types(void);	
+
+extern PyMethodDef pyatk_functions[];
+
+DL_EXPORT(void)
+initatk(void)
+{
+    PyObject *m, *d;
+	
+    init_pygobject ();
+
+    m = Py_InitModule ("atk", pyatk_functions);
+    d = PyModule_GetDict (m);
+    _pyatk_register_boxed_types();	
+    pyatk_register_classes (d);
+    pyatk_add_constants(m, "ATK_");    
+}
Index: pkg/pygtk/branches/upstream/current/Makefile.am
===================================================================
--- pkg/pygtk/branches/upstream/current/Makefile.am	(revision 4)
+++ pkg/pygtk/branches/upstream/current/Makefile.am	(revision 4)
@@ -0,0 +1,128 @@
+AUTOMAKE_OPTIONS = 1.7
+
+if BUILD_GTK
+  GTK_SUBDIR = gtk
+endif
+
+SUBDIRS = codegen . $(GTK_SUBDIR) examples tests docs
+
+PLATFORM_VERSION = 2.0
+
+CLEANFILES = 
+EXTRA_DIST = 				\
+	ChangeLog.pre-2-0		\
+	ChangeLog.pre-2-6		\
+	config.h.win32 			\
+	MANIFEST.in 			\
+	MAPPING 			\
+	pygtk.spec 			\
+	pygtk.spec.in 			\
+	pygtk-$(PLATFORM_VERSION).pc.in \
+	pygtk_postinstall.py 		\
+	PKG-INFO 			\
+	PKG-INFO.in 			\
+	setup.py 			\
+	THREADS
+
+INCLUDES = 				\
+	$(PYTHON_INCLUDES) 		\
+	$(PYGOBJECT_CFLAGS)		\
+	$(GLIB_CFLAGS)			\
+	-I$(srcdir)/gtk
+
+# pkg-config files
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA =
+pkgconfig_DATA += pygtk-$(PLATFORM_VERSION).pc
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA =
+
+# python
+pyexec_LTLIBRARIES =
+noinst_PYTHON = ltihooks.py
+
+# pygtk scripts
+pkgpythondir = $(pyexecdir)/gtk-2.0
+
+# pygtk extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpyexec_LTLIBRARIES =
+
+# linker flags
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+# atk module
+ATK_DEFS = atk.defs atk-types.defs
+ATK_OVERRIDES = atk.override atkrectangle.override
+CLEANFILES += atk.c
+EXTRA_DIST += $(ATK_DEFS) $(ATK_OVERRIDES)
+atk.c: $(ATK_DEFS) $(ATK_OVERRIDES)
+atk_la_CFLAGS = $(ATK_CFLAGS)
+atk_la_LIBADD = $(ATK_LIBS)
+atk_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initatk
+atk_la_SOURCES = atkmodule.c
+nodist_atk_la_SOURCES = atk.c
+if BUILD_ATK
+pkgpyexec_LTLIBRARIES += atk.la
+defs_DATA += $(ATK_DEFS)
+endif
+
+# pango module
+PANGO_DEFS = pango.defs pango-types.defs
+CLEANFILES += pango.c
+EXTRA_DIST += $(PANGO_DEFS) pango.override
+pango.c: $(PANGO_DEFS) pango.override
+pango_la_CFLAGS = $(PANGO_CFLAGS)
+pango_la_LIBADD = $(PANGO_LIBS)
+pango_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initpango
+pango_la_SOURCES = pangomodule.c
+nodist_pango_la_SOURCES = pango.c
+if BUILD_PANGO
+pkgpyexec_LTLIBRARIES += pango.la
+defs_DATA += $(PANGO_DEFS)
+endif
+
+# pangocairo module
+PANGOCAIRO_DEFS = pangocairo.defs pangocairo.override
+CLEANFILES += pangocairo.c
+EXTRA_DIST += $(PANGOCAIRO_DEFS) pangocairo.override
+pangocairo.c: $(PANGOCAIRO_DEFS) pangocairo.override
+pangocairo_la_CFLAGS = $(PYCAIRO_CFLAGS) $(PANGOCAIRO_CFLAGS)
+pangocairo_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initpangocairo
+pangocairo_la_LIBADD = $(PANGOCAIRO_LIBS)
+pangocairo_la_SOURCES = pangocairomodule.c
+nodist_pangocairo_la_SOURCES = pangocairo.c
+if BUILD_PANGOCAIRO
+pkgpyexec_LTLIBRARIES += pangocairo.la
+defs_DATA += $(PANGOCAIRO_DEFS)
+endif
+
+# code generator
+.defs.c:
+	(cd $(srcdir)\
+	 && $(PYTHON) codegen/codegen.py \
+	    --py_ssize_t-clean \
+	    --register pango-types.defs \
+	    --register atk-types.defs \
+	    --register gtk/gtk-base-types.defs \
+	    --override $*.override \
+	    --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
+	&& cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
+	&& rm -f $(*D)/gen-$(*F).c
+
+snap:
+	$(MAKE) dist distdir=$(PACKAGE)-SNAP-`date +"%Y%m%d"`
+
+doc-dist:
+	mkdir pygtk
+	cp -r docs/html/*.html pygtk
+	cp -r docs/html/*.sgml pygtk
+	cp -r docs/html/*.devhelp pygtk
+	cp -r $(PYGOBJECT_PYGDOCS)/style.css pygtk
+	tar cfz $(PACKAGE)-docs.tar.gz pygtk
+	rm -fr pygtk
Index: pkg/pygtk/branches/upstream/current/missing
===================================================================
--- pkg/pygtk/branches/upstream/current/missing	(revision 4)
+++ pkg/pygtk/branches/upstream/current/missing	(revision 4)
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2003-09-02.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: pkg/pygtk/branches/upstream/current/PKG-INFO
===================================================================
--- pkg/pygtk/branches/upstream/current/PKG-INFO	(revision 4)
+++ pkg/pygtk/branches/upstream/current/PKG-INFO	(revision 4)
@@ -0,0 +1,25 @@
+Metadata-Version: 1.0
+Name: PyGTK
+Version: 2.10.4
+Summary: Python bindings for GTK
+Home-page: http://www.pygtk.org/
+Author: James Henstridge
+Author-email: james@daa.com.au
+Maintainer: Johan Dahlin
+Maintainer-email: johan@gnome.org
+License: GNU LGPL
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygtk/2.10/pygtk-2.10.4.tar.gz
+Description: PyGTK allows you to write full featured GTK programs in
+        Python.  It is targetted at GTK 2.x, and can be used in
+        conjunction with gnome-python to write Gnome applications.
+Platform: POSIX, Windows
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: X11 Applications :: GTK
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
+Classifier: Operating System :: POSIX
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
Index: pkg/pygtk/branches/upstream/current/aclocal.m4
===================================================================
--- pkg/pygtk/branches/upstream/current/aclocal.m4	(revision 4)
+++ pkg/pygtk/branches/upstream/current/aclocal.m4	(revision 4)
@@ -0,0 +1,8000 @@
+# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Configure paths for GLIB
+# Owen Taylor     1997-2001
+
+dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or 
+dnl gthread is specified in MODULES, pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GLIB_2_0],
+[dnl 
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
+		    , enable_glibtest=yes)
+
+  pkg_config_args=glib-2.0
+  for module in . $4
+  do
+      case "$module" in
+         gmodule) 
+             pkg_config_args="$pkg_config_args gmodule-2.0"
+         ;;
+         gmodule-no-export) 
+             pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
+         ;;
+         gobject) 
+             pkg_config_args="$pkg_config_args gobject-2.0"
+         ;;
+         gthread) 
+             pkg_config_args="$pkg_config_args gthread-2.0"
+         ;;
+      esac
+  done
+
+  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+  no_glib=""
+
+  if test x$PKG_CONFIG != xno ; then
+    if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
+      :
+    else
+      echo *** pkg-config too old; version 0.7 or better required.
+      no_glib=yes
+      PKG_CONFIG=no
+    fi
+  else
+    no_glib=yes
+  fi
+
+  min_glib_version=ifelse([$1], ,2.0.0,$1)
+  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+
+  if test x$PKG_CONFIG != xno ; then
+    ## don't try to run the test against uninstalled libtool libs
+    if $PKG_CONFIG --uninstalled $pkg_config_args; then
+	  echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+	  enable_glibtest=no
+    fi
+
+    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+	  :
+    else
+	  no_glib=yes
+    fi
+  fi
+
+  if test x"$no_glib" = x ; then
+    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+
+    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x$enable_glibtest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GLIB_CFLAGS"
+      LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+      rm -f conf.glibtest
+      AC_TRY_RUN([
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.glibtest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_glib_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_glib_version");
+     exit(1);
+   }
+
+  if ((glib_major_version != $glib_config_major_version) ||
+      (glib_minor_version != $glib_config_minor_version) ||
+      (glib_micro_version != $glib_config_micro_version))
+    {
+      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
+             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+             glib_major_version, glib_minor_version, glib_micro_version);
+      printf ("*** was found! If pkg-config was correct, then it is best\n");
+      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+      printf("*** required on your system.\n");
+      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+      printf("*** to point to the correct configuration files\n");
+    } 
+  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+	   (glib_minor_version != GLIB_MINOR_VERSION) ||
+           (glib_micro_version != GLIB_MICRO_VERSION))
+    {
+      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+      printf("*** library (version %d.%d.%d)\n",
+	     glib_major_version, glib_minor_version, glib_micro_version);
+    }
+  else
+    {
+      if ((glib_major_version > major) ||
+        ((glib_major_version == major) && (glib_minor_version > minor)) ||
+        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+      {
+        return 0;
+       }
+     else
+      {
+        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+               glib_major_version, glib_minor_version, glib_micro_version);
+        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+	       major, minor, micro);
+        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
+        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+      }
+    }
+  return 1;
+}
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_glib" = x ; then
+     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test "$PKG_CONFIG" = "no" ; then
+       echo "*** A new enough version of pkg-config was not found."
+       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+     else
+       if test -f conf.glibtest ; then
+        :
+       else
+          echo "*** Could not run GLIB test program, checking why..."
+          ac_save_CFLAGS="$CFLAGS"
+          ac_save_LIBS="$LIBS"
+          CFLAGS="$CFLAGS $GLIB_CFLAGS"
+          LIBS="$LIBS $GLIB_LIBS"
+          AC_TRY_LINK([
+#include <glib.h>
+#include <stdio.h>
+],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GLIB_CFLAGS=""
+     GLIB_LIBS=""
+     GLIB_GENMARSHAL=""
+     GOBJECT_QUERY=""
+     GLIB_MKENUMS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(GLIB_CFLAGS)
+  AC_SUBST(GLIB_LIBS)
+  AC_SUBST(GLIB_GENMARSHAL)
+  AC_SUBST(GOBJECT_QUERY)
+  AC_SUBST(GLIB_MKENUMS)
+  rm -f conf.glibtest
+])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# ------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ---------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# ----------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 DLLs
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+# set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix3*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ------------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# -------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF
+
+# Report which library types will actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+        ;;
+      *)
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  interix3*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker. We must also pass each convience library through
+	    # to the system linker between allextract/defaultextract.
+	    # The C++ compiler will combine linker options so we
+	    # cannot just pass the convience library names through
+	    # without $wl.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_lin